![]() |
Midnight Sun Firmware
|
Public Member Functions | |
def | __init__ (self, **kwargs) |
def | pack (self) |
def | datagram_type_id (self) |
def | node_ids (self) |
def | data (self) |
def | datagram_type_id (self, value) |
def | node_ids (self, nodes) |
def | data (self, value) |
Private Member Functions | |
def | _unpack (cls, datagram_bytearray, arbitration_id) |
def | _unpack_nodeids (self, raw_nodes) |
def | _pack_nodeids (self, raw_nodes) |
Static Private Member Functions | |
def | _check_kwargs (**kwargs) |
def | _convert_from_bytearray (in_bytearray, size) |
def | _convert_to_bytearray (in_value, size) |
Private Attributes | |
_datagram_type_id | |
_node_ids | |
_data | |
Custom CAN-datagram class
def __init__ | ( | self, | |
** | kwargs | ||
) |
Initialize datagram class
|
staticprivate |
This function checks that all args passed in are correct
|
staticprivate |
Helper function to get little endian value from byte array
|
staticprivate |
Helper function to get a little endian byte array from a value
|
private |
This function takes in an ordered list and outputs a bytearray of node ids
|
private |
This function returns an instance fo the class by unpacking a bytearray
|
private |
This function takes in the raw bytearray of node ids and returns an ordered list
def data | ( | self | ) |
This function describe the datagram node ids
def data | ( | self, | |
value | |||
) |
This function sets the datagram data
def datagram_type_id | ( | self | ) |
This function describes the datagram id
def datagram_type_id | ( | self, | |
value | |||
) |
This function sets the datagram type
def node_ids | ( | self | ) |
This function assigns the datagram id
def node_ids | ( | self, | |
nodes | |||
) |
This function sets the datagram node ids
def pack | ( | self | ) |
This function packs a new bytearray based on set data