ovl.connections.serial_connection module

class ovl.connections.serial_connection.SerialConnection(port: Union[int, str], baudrate: int = 9600, *args, **kwargs)[source]

Bases: ovl.connections.connection.Connection

Serial connection is a Connection used to send and receive on a Serial bus like various USB cables.

SerialConnection is implemented under the hood using Pyserial and it is a package requirement for using SerialConnection, make sure it is installed by executing in console:

pip install pyserial

close()[source]
receive(*args, **kwargs)[source]

Used to receive information from an external source, receive represents incoming information, usually over-network but not exclusively Receive can be used to send a request in order to receive for example HttpConnection send an http request and returns the response data

Parameters:
  • args – any additional arguments for the specific connection object
  • kwargs – any additional keyword arguments for the specific connection object
Returns:

send(data, *args, **kwargs)[source]

Used to send information to an external source, send represents outgoing information, usually over-network but not exclusively

Parameters:data – the data to be sent, a common use is sending the directions from direction objects after

object detection :param args: any additional arguments for the specific connection object :param kwargs: any additional keyword arguments for the specific connection object :return: