class documentation

class tagPOCmd: (source)

Constructor: tagPOCmd.unpack(data)

View In Hierarchy

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
def unpack(cls, data: bytes) -> tagPOCmd: (source)

Unpacks a bytes sequence into a tagPOCmd object.

Parameters
data:bytesThe bytes to unpack, expected to be 4 bytes (1 uint8, 1 uint16, 1 uint8).
Returns
tagPOCmdA tagPOCmd object.
Raises
struct.errorIf the input bytes are not the expected size (4 bytes).
def pack(self) -> bytes: (source)

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
bytesA bytes object representing the packed data (1 + 2 + 1 = 4 bytes).

Undocumented

Undocumented

Undocumented