Main MRPT website > C++ reference for MRPT 1.5.7
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 1017 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 1025 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 142 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 152 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 191 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 160 of file cmt3.cpp.

References freq, m_period, and m_skip.

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

Member Data Documentation

◆ m_outputMode

CmtOutputMode CmtDeviceMode2::m_outputMode

Definition at line 1018 of file cmtdef.h.

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

◆ m_outputSettings

CmtOutputSettings CmtDeviceMode2::m_outputSettings

Definition at line 1019 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.5.7 Git: 8277875f6 Mon Jun 11 02:47:32 2018 +0200 at lun oct 28 01:50:49 CET 2019