class documentation

class tagPTPWithLCmd: (source)

Constructor: tagPTPWithLCmd.unpack(data)

View In Hierarchy

Represents a PTP command including an additional 'l' parameter.

Class Method unpack Unpacks a bytes sequence into a tagPTPWithLCmd object.
Method pack Packs the tagPTPWithLCmd object into a bytes sequence.
Class Variable l Undocumented
Class Variable ptpMode Undocumented
Class Variable r Undocumented
Class Variable x Undocumented
Class Variable y Undocumented
Class Variable z Undocumented
def unpack(cls, data: bytes) -> tagPTPWithLCmd: (source)

Unpacks a bytes sequence into a tagPTPWithLCmd object.

Parameters
data:bytesThe bytes to unpack, expected to be 41 bytes (1 uint8 + 5 doubles).
Returns
tagPTPWithLCmdA tagPTPWithLCmd object.
Raises
struct.errorIf the input bytes are not the expected size (41 bytes).
ValueErrorIf the unpacked byte value for ptpMode does not correspond to a valid PTPMode enum member.
def pack(self) -> bytes: (source)

Packs the tagPTPWithLCmd object into a bytes sequence.

Packs the ptpMode (PTPMode value as uint8) and the x, y, z, r, l (floats) into a byte string. Uses little-endian byte order.

Returns
bytesA bytes object representing the packed data (1 byte + 5 * 8 bytes = 41 bytes).

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented