serial_device
frog.hardware.serial_device
¤
Provides a base class for serial devices.
Attributes¤
Classes¤
SerialDevice(port, baudrate)
¤
Bases: AbstractDevice
A base class for serial devices.
Note that it is not sufficient for a device type class to inherit from this class alone: it must also inherit from a device base class. When doing so, this class must be listed before any other parent classes, otherwise the ABC won't be able to find this class's implementation of close() and will complain about missing functions.
Create a new serial device.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port
|
str
|
Description/name of serial port |
required |
baudrate
|
int
|
Baud rate of port |
required |
Source code in src/frog/hardware/serial_device.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
|
Attributes¤
serial = _create_serial(port, baudrate, refresh=False)
instance-attribute
¤
Underlying serial device.
Functions¤
close()
¤
Close the connection to the device.
Source code in src/frog/hardware/serial_device.py
157 158 159 |
|