The ConfigPacket is used to cumunicate configuration instructions with the uC all availible instructions are defined in the ConfigMainHeader and ConfigSubHeader.
More...
|
def | __init__ (self, header, config_header, value=0, time=0) |
|
def | __str__ (self) |
|
def | config_header (self) |
| getter method for the sub instruction config_header attribute More...
|
|
def | from_bytearray (self, byte_array) |
| constructs a ConfigPacket from a bytearray More...
|
|
def | set_config_header (self, config_header) |
| setter method for the sub instruction config_header attribute More...
|
|
def | set_header (self, header) |
| setter method for the header attribute More...
|
|
def | set_value (self, value) |
| setter method for the value attribute More...
|
|
def | to_bytearray (self) |
| method to convert the packet to a bytearray in the correct format of <header><exec_time><config_header> More...
|
|
def | value (self) |
| getter method for the value attribute More...
|
|
def | __init__ (self) |
|
def | check_and_log (self) |
| check_and_log logs the packet if the header is in the logging lists More...
|
|
def | from_bytearray (cls, byte_array) |
| method to construct a packet from a bytearray depending on the header the correct packet type is returned More...
|
|
def | header (self) |
| getter method for the header attribute More...
|
|
def | set_exec_time (self, time) |
| setter method for the execution time attribute More...
|
|
def | set_header (self, header) |
| setter method for the header attribute More...
|
|
def | time (self) |
| getter method for the time attribute More...
|
|
def | to_bytearray (self) |
| placeholder for converting the package to a bytearray More...
|
|
The ConfigPacket is used to cumunicate configuration instructions with the uC all availible instructions are defined in the ConfigMainHeader and ConfigSubHeader.
Definition at line 375 of file packet.py.
◆ __init__()
def __init__ |
( |
|
self, |
|
|
|
header, |
|
|
|
config_header, |
|
|
|
value = 0 , |
|
|
|
time = 0 |
|
) |
| |
◆ __str__()
◆ config_header()
def config_header |
( |
|
self | ) |
|
getter method for the sub instruction config_header attribute
- Returns
- : the config_sub_header
Definition at line 392 of file packet.py.
◆ from_bytearray()
def from_bytearray |
( |
|
self, |
|
|
|
byte_array |
|
) |
| |
constructs a ConfigPacket from a bytearray
- Parameters
-
byte_array | 9 byte bytearray to construct the Packet from |
- Returns
- : ConfigPacket @raise Exception: if package construction fails
Reimplemented from Packet.
Definition at line 435 of file packet.py.
◆ set_config_header()
def set_config_header |
( |
|
self, |
|
|
|
config_header |
|
) |
| |
setter method for the sub instruction config_header attribute
- Parameters
-
config_header | (ConfigSubHeader or uint8) the config_sub_header |
Definition at line 407 of file packet.py.
◆ set_header()
def set_header |
( |
|
self, |
|
|
|
header |
|
) |
| |
setter method for the header attribute
- Parameters
-
header | (ConfigMainHeader or uint8) the header of the packet |
Reimplemented from Packet.
Definition at line 398 of file packet.py.
◆ set_value()
def set_value |
( |
|
self, |
|
|
|
value |
|
) |
| |
setter method for the value attribute
- Parameters
-
Definition at line 416 of file packet.py.
◆ to_bytearray()
method to convert the packet to a bytearray in the correct format of <header><exec_time><config_header>
- Returns
- : the packet as a bytearray
Reimplemented from Packet.
Definition at line 425 of file packet.py.
◆ value()
getter method for the value attribute
- Returns
- : the value
Definition at line 386 of file packet.py.
The documentation for this class was generated from the following file: