basic_robotics.interfaces.comms_object module
Base Class for Communications Bridges in Basic-Robotics.
- class basic_robotics.interfaces.comms_object.CommsObject(name: str = 'CommObj', type: str = 'UDP')[source]
Bases:
objectBase Class for a variety of communications types with standard interfaces.
- __init__(name: str = 'CommObj', type: str = 'UDP') CommsObject[source]
Create a new CommsObject.
- getRxSuccess() bool[source]
Get success of last data receiving attempt.
- Returns:
bool – data read success
- getTxSuccess() bool[source]
Get success of last data writing attempt.
- Returns:
bool – data write success
- sendData(data) bool[source]
Send data.
- Parameters:
data – data to be sent
- Returns:
bool – message send success
- setName(name: str) None[source]
Set the name of the object.
- Parameters:
name (str) – Name of the Comms Object