|
ping-python
A python implementation of the Blue Robotics Ping messaging protocol and a device API for the Blue Robotics Ping1D echosounder.
|


Public Member Functions | |
| def | __init__ |
| Messge constructor. More... | |
| def | packMsgData |
| Pack object attributes into self.msgData (bytearray) More... | |
| def | unpackMsgData |
| Unpack a bytearray into object attributes. | |
| def | calculateChecksum |
| Calculate the checksum from the internal bytearray self.msgData. | |
| def | updateChecksum |
| Update the object checksum value. More... | |
| def | verifyChecksum |
| Verify that the object checksum attribute is equal to the checksum calculated according to the internal bytearray self.msgData. | |
| def | getPayloadFormat |
| Get the python struct formatting string for the message payload. More... | |
| def | __repr__ |
| Dump object into string representation. More... | |
Public Attributes | |
| message_id | |
| The message id. | |
| request_id | |
| The request id for request messages. | |
| payload_length | |
| Number of bytes in the message payload. | |
| dst_device_id | |
| The message destination. | |
| src_device_id | |
| The message source. | |
| checksum | |
| The message checksum. | |
| msgData | |
| The raw data buffer for this message update with packMsgData() | |
| name | |
| The name of this message. | |
| payload_format | |
| The struct formatting string for the message payload. | |
| payload_field_names | |
| The field names of this message. | |
Static Public Attributes | |
| tuple | start_1 = ord("B") |
| header start byte 1 | |
| tuple | start_2 = ord("R") |
| header start byte 2 | |
| string | header_format = "BBHHBB" |
| header struct format | |
| string | checksum_format = "H" |
| checksum struct format | |
| string | endianess = "<" |
| data endianness for struct formatting | |
| tuple | header_field_names |
| names of the header fields More... | |
| int | headerLength = 8 |
| number of bytes in a header | |
| int | checksumLength = 2 |
| number of bytes in a checksum | |
| def Ping.PingMessage.PingMessage.__init__ | ( | self, | |
id = 0, |
|||
msgData = None |
|||
| ) |
Messge constructor.
request:
| def Ping.PingMessage.PingMessage.__repr__ | ( | self | ) |
Dump object into string representation.
| def Ping.PingMessage.PingMessage.getPayloadFormat | ( | self | ) |
Get the python struct formatting string for the message payload.
| def Ping.PingMessage.PingMessage.packMsgData | ( | self | ) |
Pack object attributes into self.msgData (bytearray)
| def Ping.PingMessage.PingMessage.updateChecksum | ( | self | ) |
Update the object checksum value.
|
static |
1.8.6