class documentation

class tagTRIGCmd: (source)

Constructor: tagTRIGCmd.unpack(data)

View In Hierarchy

Represents a TRIG (Trigger) command.

Class Method unpack Unpacks a bytes sequence into a tagTRIGCmd object.
Method pack Packs the tagTRIGCmd object into a bytes sequence.
Class Variable address Undocumented
Class Variable condition Undocumented
Class Variable mode Undocumented
Class Variable threshold Undocumented
def unpack(cls, data: bytes) -> tagTRIGCmd: (source)

Unpacks a bytes sequence into a tagTRIGCmd object.

Parameters
data:bytesThe bytes to unpack, expected to be 5 bytes (3 uint8s + 1 uint16).
Returns
tagTRIGCmdA tagTRIGCmd object.
Raises
struct.errorIf the input bytes are not the expected size (5 bytes).
ValueErrorIf the unpacked byte values for mode or condition do not correspond to valid enum members.
def pack(self) -> bytes: (source)

Packs the tagTRIGCmd object into a bytes sequence.

Packs the address (uint8), mode (TriggerMode value as uint8), condition (TriggerCondition value as uint8), and threshold (uint16) into a byte string. Uses little-endian byte order.

Returns
bytesA bytes object representing the packed data (1 + 1 + 1 + 2 = 5 bytes).

Undocumented

Undocumented

Undocumented

threshold: int = (source)

Undocumented