Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Member Functions | Public Attributes
CmtDeviceMode2 Struct Reference

Detailed Description

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

Definition at line 1051 of file cmtdef.h.

#include <xSens_MT3/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
 

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

Definition at line 1060 of file cmtdef.h.

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.

Definition at line 151 of file cmt3.cpp.

References m_period, and m_skip.

◆ 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.

Definition at line 161 of file cmt3.cpp.

References m_period, and m_skip.

Referenced by xsens::Cmt3::getDeviceMode().

◆ operator==()

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

Check if all fields of the two structures are equal.

Definition at line 201 of file cmt3.cpp.

References m_outputMode, m_outputSettings, m_period, and m_skip.

◆ 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.

Definition at line 170 of file cmt3.cpp.

References m_period, and m_skip.

Referenced by xsens::Cmt3::setDeviceMode().

Member Data Documentation

◆ m_outputMode

CmtOutputMode CmtDeviceMode2::m_outputMode

Definition at line 1053 of file cmtdef.h.

Referenced by xsens::Cmt3::getDeviceMode(), operator==(), and xsens::Cmt3::setDeviceMode().

◆ m_outputSettings

CmtOutputSettings CmtDeviceMode2::m_outputSettings

Definition at line 1054 of file cmtdef.h.

Referenced by xsens::Cmt3::getDeviceMode(), operator==(), and xsens::Cmt3::setDeviceMode().

◆ m_period

uint16_t CmtDeviceMode2::m_period

◆ m_skip

uint16_t CmtDeviceMode2::m_skip



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019