InertialChannel
InertialChannel
InertialChannel

Represents a single "channel" or data descriptors that can make up an Inertial Device's message format

Functions
InertialChannel
InertialChannel(
InertialTypes::ChannelField channelField,
const SampleRate &sampleRate
)

Creates an InertialChannel object.

Parameters
channelField

The InertialTypes::ChannelField for the channel.

sampleRate
const SampleRate&

The SampleRate for the channel.

Variables
m_channelField
InertialTypes::ChannelField m_channelField

The InertialTypes::ChannelField for this channel.

m_sampleRate
SampleRate m_sampleRate

The SampleRate of the inertial channel.

Functions
channelField
InertialTypes::ChannelField channelField() const

Gets the InertialTypes::ChannelField for this channel.

Returns

An InertialTypes::ChannelField that is set for this channel.

sampleRate
const SampleRate& sampleRate() const

Gets the SampleRate set for this channel.

Returns

The SampleRate that is set for this channel.

rateDecimation
uint16 rateDecimation(
uint16 sampleRateBase
) const

Gets the rate decimation that is used to determine the sample rate (sample rate = sampleratebase / rate decimation).

Returns

The rate decimation that is used to determine the sample rate

validateSampleRate
const SampleRate& validateSampleRate(
uint16 sampleRateBase
)

Validates the sample rate of the InertialChannel object, updating it to a supported rate if necessary.  This function will be called before an InertialChannel is set on the InertialNode.  You can call it yourself if you want to update the channel yourself to determine the true SampleRate that will be applied.

Parameters
sampleRateBase
uint16

The sample rate base to use for validating the sample rate (see InertialNode::getDataRateBase).

Returns

A SampleRate used for reference to determine what the InertialChannel's SampleRate got updated to, if at all.

validateSampleRate
const SampleRate& validateSampleRate(
InertialNode &node
)

Validates the sample rate of the InertialChannel object, updating it to a supported rate if necessary.  This function will be called before an InertialChannel is set on the InertialNode.  You can call it yourself if you want to update the channel yourself to determine the true SampleRate that will be applied.

Parameters
node

The InertialNode to validate the InertialChannel's sample rate for.

Returns

A SampleRate used for reference to determine what the InertialChannel's SampleRate got updated to, if at all.

fieldDescriptor
uint8 fieldDescriptor() const

Gets the field descriptor byte of the Inertial Channel.

Returns

The field descriptor byte of the Inertial Channel.

descriptorSet
uint8 descriptorSet() const

Gets the descriptor set byte of the Inertial Channel.

Returns

The descriptor set byte of the Inertial Channel.

Types
InertialChannels

typedef for a vector of InertialChannel objects