InertialPacket
InertialPacket
InertialDataPacket

A class that contains packet information about an Inertial packet

Types
Response State
MIP_ACK_NACK_ERROR_NONE

0  - No Error

MIP_ACK_NACK_ERROR_UNKNOWN_COMMAND

1  - Error: Unknown command was sent to the device

MIP_ACK_NACK_ERROR_CHECKSUM_INVALID

2  - Error: Invalid checksum was recieved by the device

MIP_ACK_NACK_ERROR_PARAMETER_INVALID

3  - Error: Invalid parameter was received by the device

MIP_ACK_NACK_ERROR_COMMAND_FAILED

4  - Error: The command has failed

MIP_ACK_NACK_ERROR_COMMAND_TIMEOUT

5  - Error: The command has timed out

MIP_ACK_NACK_ERROR_UNKNOWN_DESCRIPTOR_SET

6  - Error: Unknown descriptor set was recieved by the device

Payload

typedef for the bytes that make up a payload in a packet

Variables
m_descriptorSet
uint8 m_descriptorSet

The descriptor set (packet type) of the InertialPacket

m_payload
Payload m_payload

The payload bytes in the packet

Functions
payload
void payload(
const Bytes &bytes
)

Sets the payload bytes of the packet

Parameters
bytes
const Bytes&

The payload of the packet, as a vector of bytes

type

Sets the descriptor set of the InertialPacket

Parameters
set

The descriptor set value to set

isDataPacket
bool isDataPacket() const

Gets whether or not the packet is a data packet

Returns

true if the packet is a data packet, false otherwise

descriptorSet
uint8 descriptorSet() const

Gets the descriptor set of the InertialPacket

Returns

The descriptor set value of the packet

payload
const std::vector<uint8> payload() const

Gets the payload bytes of the packet

Returns

The payload of the packet, as a vector of bytes