Establish a serial connection with a connected USB device.
Definition at line 9 of file usb_serial.py.
def indoor_positioning.communication.usb_serial.USBSerial.__init__ |
( |
|
self, |
|
|
|
port, |
|
|
|
baudrate = 115200 |
|
) |
| |
Initialize class for serial connection.
:param port: String: USB port the device is connected to
:param baudrate (default=115200): Int: Baudrate to use for the communication with the USB device
Definition at line 11 of file usb_serial.py.
def indoor_positioning.communication.usb_serial.USBSerial.close |
( |
|
self | ) |
|
def indoor_positioning.communication.usb_serial.USBSerial.get_line |
( |
|
self, |
|
|
|
eol_character |
|
) |
| |
Return a single line from the serial messages with a custom end-of-line character.
:param eol_character: Bytes: character or sequence to use as end-of-line character.
:return: Bytes: the most recent line that has been sent via the serial connection
Definition at line 50 of file usb_serial.py.
def indoor_positioning.communication.usb_serial.USBSerial.open |
( |
|
self | ) |
|
def indoor_positioning.communication.usb_serial.USBSerial.send |
( |
|
self, |
|
|
|
msg |
|
) |
| |
Send serial message over the established connection.
:param msg: String: message to be sent over serial connection
Definition at line 40 of file usb_serial.py.
indoor_positioning.communication.usb_serial.USBSerial.baudrate |
indoor_positioning.communication.usb_serial.USBSerial.port |
indoor_positioning.communication.usb_serial.USBSerial.ser |
The documentation for this class was generated from the following file: