class documentation

class tagCPParams: (source)

Constructor: tagCPParams.unpack(data)

View In Hierarchy

Represents CP parameters.

Class Method unpack Unpacks a bytes sequence into a tagCPParams object.
Method pack Packs the tagCPParams object into a bytes sequence.
Class Variable acceleratio_or_period Undocumented
Class Variable junctionAcc Undocumented
Class Variable planAcc Undocumented
Class Variable realTimeTrack Undocumented
def unpack(cls, data: bytes) -> tagCPParams: (source)

Unpacks a bytes sequence into a tagCPParams object.

Parameters
data:bytesThe bytes to unpack, expected to be 25 bytes (3 doubles + 1 uint8).
Returns
tagCPParamsA tagCPParams object.
Raises
struct.errorIf the input bytes are not the expected size (25 bytes).
ValueErrorIf the unpacked byte value for realTimeTrack does not correspond to a valid RealTimeTrack enum member.
def pack(self) -> bytes: (source)

Packs the tagCPParams object into a bytes sequence.

Packs the three floats and the realTimeTrack (RealTimeTrack value as uint8) into a byte string. Uses little-endian byte order.

Returns
bytesA bytes object representing the packed data (3 * 8 bytes + 1 byte = 25 bytes).
acceleratio_or_period: float = (source)

Undocumented

junctionAcc: float = (source)

Undocumented

Undocumented

Undocumented