xsens_imu
Public Member Functions | Public Attributes | List of all members
CmtDeviceMode2 Struct Reference

A structure for storing device modes using period and skip factor (new default) More...

#include <cmtdef.h>

Public Member Functions

 CmtDeviceMode2 (const CmtOutputMode mode=CMT_DEFAULT_OUTPUT_MODE, const CmtOutputSettings settings=CMT_DEFAULT_OUTPUT_SETTINGS, const uint16_t period=CMT_DEFAULT_PERIOD, const uint16_t skip=CMT_DEFAULT_SKIP)
 default constructor, initializes to the given (default) MT settings More...
 
double getRealSampleFrequency (void) const
 Return the real sample frequency in Hz. More...
 
uint16_t getSampleFrequency (void) const
 Return the sample frequency in Hz. More...
 
void setSampleFrequency (uint16_t freq)
 Compute the period and skip factor from a sample frequency. More...
 
bool operator== (const CmtDeviceMode2 &dev) const
 Check if all fields of the two structures are equal. More...
 

Public Attributes

CmtOutputMode m_outputMode
 
CmtOutputSettings m_outputSettings
 
uint16_t m_period
 
uint16_t m_skip
 

Detailed Description

A structure for storing device modes using period and skip factor (new default)

Constructor & Destructor Documentation

◆ CmtDeviceMode2()

CmtDeviceMode2::CmtDeviceMode2 ( const CmtOutputMode  mode = CMT_DEFAULT_OUTPUT_MODE,
const CmtOutputSettings  settings = CMT_DEFAULT_OUTPUT_SETTINGS,
const uint16_t  period = CMT_DEFAULT_PERIOD,
const uint16_t  skip = CMT_DEFAULT_SKIP 
)
inline

default constructor, initializes to the given (default) MT settings

Member Function Documentation

◆ getRealSampleFrequency()

double CmtDeviceMode2::getRealSampleFrequency ( void  ) const

Return the real sample frequency in Hz.

This may be up to 2Hz different from the value that is set.

◆ getSampleFrequency()

uint16_t CmtDeviceMode2::getSampleFrequency ( void  ) const

Return the sample frequency in Hz.

This may be up to 2Hz different from the value that is set.

◆ operator==()

bool CmtDeviceMode2::operator== ( const CmtDeviceMode2 dev) const

Check if all fields of the two structures are equal.

◆ setSampleFrequency()

void CmtDeviceMode2::setSampleFrequency ( uint16_t  freq)

Compute the period and skip factor from a sample frequency.

This function does the reverse of the getPeriodAndSkipFactor function, storing the value in the m_period and m_skip field.

Member Data Documentation

◆ m_outputMode

CmtOutputMode CmtDeviceMode2::m_outputMode

◆ m_outputSettings

CmtOutputSettings CmtDeviceMode2::m_outputSettings

◆ m_period

uint16_t CmtDeviceMode2::m_period

◆ m_skip

uint16_t CmtDeviceMode2::m_skip

The documentation for this struct was generated from the following files: