Inertial_Commands
Inertial_Commands

Contains helper functions for Inertial Commands

Types
InertialCmdSelector

The possible command function selectors for Inertial commands

cmd_setCurrent

0x01 - Use new settings as the current settings

cmd_getCurrent

0x02 - Read back the current settings

cmd_saveCurrentAsStartup

0x03 - Save the current settings as the startup settings

cmd_loadSavedToCurrent

0x04 - Load the saved startup settings as the current settings

cmd_resetCurrentToDefault

0x05 - Reset the current settings to the factory default settings

Functions
parseData_singleBool
static bool parseData_singleBool(
const GenericInertialCommandResponse &response
)

Parses the data for a single boolean flag response.

Parameters
response

The GenericInertialCommandResponse that contains the data to be parsed.

Returns

The boolean parsed from the response.

parseData_GetDeviceInfo
static void parseData_GetDeviceInfo(
const GenericInertialCommandResponse &response,
InertialDeviceInfo &result
)

Parses the data from a GetDeviceInfo response.

Parameters
response

The GenericInertialCommandResponse that contains the data to be parsed.

result

Holds the InertialDeviceInfo result.

parseData_GetDeviceDescriptorSets
static void parseData_GetDeviceDescriptorSets(
const GenericInertialCommandResponse &response,
std::vector<uint16&result
)

Parses the data from a GetDeviceDescriptorSets response.

Parameters
response

The GenericInertialCommandResponse that contains the data to be parsed.

result
std::vector<uint16>&

Holds the descriptor sets result.

parseData_DataRateBase
static uint16 parseData_DataRateBase(
const GenericInertialCommandResponse &response
)

Parses the data from a DataRateBase response

Parameters
response

The GenericInertialCommandResponse that contains the data to be parsed

Returns

The data rate base parsed from the response

parseData_CommunicationMode
static uint8 parseData_CommunicationMode(
const GenericInertialCommandResponse &response
)

Parses the data from a CommunicationMode response

Parameters
response

The GenericInertialCommandResponse that contains the data to be parsed

Returns

The data rate base parsed from the response

parseData_MessageFormat
static InertialChannels parseData_MessageFormat(
const GenericInertialCommandResponse &response,
uint8 descSet,
uint16 sampleRateBase
)

Parses the data from a MessageFormat response

Parameters
response

The GenericInertialCommandResponse that contains the data to be parsed

descSet
uint8

The descriptor set byte for this specific MessageFormat command

sampleRateBase
uint16

The sample rate base for the device, used for determining sample rates.

Returns

An InertialChannels object containing the channels that are active in the current MessageFormat

parseData_ContinuousDataStream
static bool parseData_ContinuousDataStream(
const GenericInertialCommandResponse &response
)

Parses the data from a ContinuousDataStream response

Parameters
response

The GenericInertialCommandResponse that contains the data to be parsed

Returns

true if the data stream is enabled, false if it is disabled.

parseData_EulerAngles
static EulerAngles parseData_EulerAngles(
const GenericInertialCommandResponse &response
)

Parses the data from a command response containing just 3 Euler Angles (roll, pitch, yaw).

Parameters
response

The GenericInertialCommandResponse that contains the data to be parsed

Returns

The EulerAngles containing the result that is parsed.

parseData_PositionOffset
static PositionOffset parseData_PositionOffset(
const GenericInertialCommandResponse &response
)

Parses the data from a command response containing just 3 Position Offset values (x, y, z).

Parameters
response

The GenericInertialCommandResponse that contains the data to be parsed

Returns

The EulerAngles containing the result that is parsed.