class documentation
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 |
Undocumented |
| Class Variable | junction |
Undocumented |
| Class Variable | plan |
Undocumented |
| Class Variable | real |
Undocumented |
Unpacks a bytes sequence into a tagCPParams object.
| Parameters | |
data:bytes | The bytes to unpack, expected to be 25 bytes (3 doubles + 1 uint8). |
| Returns | |
tagCPParams | A tagCPParams object. |
| Raises | |
struct.error | If the input bytes are not the expected size (25 bytes). |
ValueError | If the unpacked byte value for realTimeTrack does not correspond to a valid RealTimeTrack enum member. |
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 | |
bytes | A bytes object representing the packed data (3 * 8 bytes + 1 byte = 25 bytes). |