class documentation
Represents a PO (Pulse Output) command.
| Class Method | unpack |
Unpacks a bytes sequence into a tagPOCmd object. |
| Method | pack |
Packs the tagPOCmd object into a bytes sequence. |
| Class Variable | address |
Undocumented |
| Class Variable | level |
Undocumented |
| Class Variable | ratio |
Undocumented |
Unpacks a bytes sequence into a tagPOCmd object.
| Parameters | |
data:bytes | The bytes to unpack, expected to be 4 bytes (1 uint8, 1 uint16, 1 uint8). |
| Returns | |
tagPOCmd | A tagPOCmd object. |
| Raises | |
struct.error | If the input bytes are not the expected size (4 bytes). |
Packs the tagPOCmd object into a bytes sequence.
Packs the ratio (uint8), address (uint16), and level (uint8) into a byte string. Uses little-endian byte order.
| Returns | |
bytes | A bytes object representing the packed data (1 + 2 + 1 = 4 bytes). |