class documentation

class tagPTPCommonParams: (source)

Constructor: tagPTPCommonParams.unpack(data)

View In Hierarchy

Represents common PTP parameters with velocity and acceleration ratios.

Class Method unpack Unpacks a bytes sequence into a tagPTPCommonParams object.
Method pack Packs the tagPTPCommonParams object into a bytes sequence.
Class Variable accelerationRatio Undocumented
Class Variable velocityRatio Undocumented

Unpacks a bytes sequence into a tagPTPCommonParams object.

Parameters
data:bytesThe bytes to unpack, expected to be 16 bytes (2 doubles).
Returns
tagPTPCommonParamsA tagPTPCommonParams object.
Raises
struct.errorIf the input bytes are not the expected size (16 bytes).
def pack(self) -> bytes: (source)

Packs the tagPTPCommonParams object into a bytes sequence.

Packs the velocityRatio and accelerationRatio (floats) into a byte string. Uses little-endian byte order.

Returns
bytesA bytes object representing the packed data (16 bytes).
accelerationRatio: float = (source)

Undocumented

velocityRatio: float = (source)

Undocumented