Main MRPT website > C++ reference for MRPT 1.5.7
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
xsens::Cmt3 Class Reference

Detailed Description

High-level communication class.

The class uses CMT level 2, but does not inherit from it. If software needs to access the level 2 components, it needs to be done through the getCmt2s() and getCmt2f() functions.

All device identification is done through device Ids in CMT level 3.

Definition at line 36 of file cmt3.h.

#include <xSens_MT3/cmt3.h>

Public Member Functions

 Cmt3 ()
 Default constructor, initializes all members to their default values. More...
 
 ~Cmt3 ()
 Destructor, de-initializes, frees memory allocated for buffers, etc. More...
 
XsensResultValue closePort (bool gotoConfigFirst=true)
 Close the communication port. More...
 
XsensResultValue getBatteryLevel (uint8_t &level)
 Get an Xbus Master's battery level. More...
 
XsensResultValue getBaudrate (uint32_t &baudrate)
 Get the baudrate used by a port. More...
 
XsensResultValue getBluetoothState (bool &enabled)
 Get the state of the bluetooth communication. More...
 
XsensResultValue getBusId (uint8_t &busId, const CmtDeviceId deviceId=CMT_DID_MASTER) const
 Retrieve the BusId of a device. More...
 
XsensResultValue getBusPowerState (bool &enabled)
 Get the state of the Xbus power. More...
 
Cmt2fgetCmt2f (void)
 Return a reference to the embedded Cmt2f (logfile) object. More...
 
Cmt2sgetCmt2s (void)
 Return a reference to the embedded Cmt2s (comm port) object. More...
 
XsensResultValue getConfiguration (CmtDeviceConfiguration &configuration)
 Get device configuration. More...
 
XsensResultValue getDataLength (uint32_t &length, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Retrieve data size. More...
 
uint32_t getDeviceCount (void) const
 Retrieve total device count. More...
 
XsensResultValue getDeviceId (const uint8_t busId, CmtDeviceId &deviceId) const
 Retrieve the DeviceId of a device given its Bus ID. More...
 
XsensResultValue getDeviceMode (CmtDeviceMode &mode, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Return device mode. More...
 
XsensResultValue getDeviceMode2 (CmtDeviceMode2 &mode, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Return device mode2. More...
 
XsensResultValue getEMtsData (void *buffer, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Retrieve the eMts data of the specified sensor(s). More...
 
XsensResultValue getErrorMode (uint16_t &mode, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Return the error mode of the device. More...
 
XsensResultValue getFirmwareRevision (CmtVersion &revision, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Return Firmware revision. More...
 
XsensResultValue getHeading (double &heading, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Return the heading offset. More...
 
XsensResultValue getLastResult (void) const
 < More...
 
XsensResultValue getHwError (CmtDeviceId &did) const
 < More...
 
void clearHwError (void)
 
XsensResultValue getLocationId (uint16_t &locationId, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Return the location ID of a sensor. More...
 
XsensResultValue getLogFileReadPosition (CmtFilePos &pos)
 Retrieve the read position of the log file. More...
 
XsensResultValue getLogFileSize (CmtFilePos &size)
 Retrieve the size of the open log file in bytes. More...
 
XsensResultValue getLogFileName (char *filename)
 Retrieve the name of the open log file or an empty string if no logfile is open. More...
 
XsensResultValue getLogFileName (wchar_t *filename)
 Retrieve the name of the open log file or an empty string if no logfile is open. More...
 
XsensResultValue getMagneticDeclination (double &declination, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Return the stored magnetic declination. More...
 
CmtDeviceId getMasterId (void)
 
uint16_t getMtCount (void) const
 Return the device Id of the first device (master). More...
 
XsensResultValue getMtDeviceId (const uint8_t index, CmtDeviceId &deviceId) const
 
XsensResultValue getPortNr (uint8_t &port) const
 Return the device Id of an MT device. More...
 
XsensResultValue getProductCode (char *productCode, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Return product code. More...
 
uint16_t getSampleFrequency (void)
 Return current sample frequency. More...
 
XsensResultValue getSerialBaudrate (uint32_t &baudrate)
 Return the baud rate used for serial communication. More...
 
XsensResultValue getSyncInSettings (CmtSyncInSettings &settings)
 Retrieve the inbound synchronization settings of the master MT device. More...
 
XsensResultValue getSyncInMode (uint16_t &mode)
 Retrieve the inbound synchronization mode of an MT device. More...
 
XsensResultValue getSyncInSkipFactor (uint16_t &skipFactor)
 Retrieve the inbound synchronization skip factor of an MT device. More...
 
XsensResultValue getSyncInOffset (uint32_t &offset)
 Retrieve the inbound synchronization offset of an MT device. More...
 
XsensResultValue getSyncMode (uint8_t &mode)
 Retrieve the sync mode of the Xbus Master. More...
 
XsensResultValue getSyncOutSettings (CmtSyncOutSettings &settings)
 Retrieve the outbound synchronization settings of the master MT device. More...
 
XsensResultValue getSyncOutMode (uint16_t &mode)
 Retrieve the outbound synchronization mode of an MT device. More...
 
XsensResultValue getSyncOutPulseWidth (uint32_t &pulseWidth)
 Retrieve the outbound synchronization pulse width of an MT device. More...
 
XsensResultValue getSyncOutSkipFactor (uint16_t &skipFactor)
 Retrieve the outbound synchronization skip factor of an MT device. More...
 
XsensResultValue getSyncOutOffset (uint32_t &offset)
 Retrieve the outbound synchronization offset of an MT device. More...
 
uint32_t getTimeoutConfig (void) const
 Return the configuration mode timeout. More...
 
uint32_t getTimeoutMeasurement (void) const
 Return the measurement mode timeout. More...
 
XsensResultValue getUtcTime (CmtUtcTime &utc, const CmtDeviceId deviceId)
 Return the UTC time of the last received sample. More...
 
XsensResultValue getXmOutputMode (uint8_t &mode)
 Return the dual-output mode of the XM. More...
 
XsensResultValue gotoConfig (void)
 Place all connected devices into Configuration Mode. More...
 
XsensResultValue gotoMeasurement (void)
 Place all connected devices into Measurement Mode. More...
 
XsensResultValue initBus (void)
 Perform an initBus request. More...
 
bool isLogging (void) const
 < More...
 
bool isPortOpen (void) const
 < More...
 
bool isXm (void) const
 Return whether the main device is an Xbus Master or not. More...
 
XsensResultValue openPort (const char *portName, const uint32_t baudRate=CMT_DEFAULT_BAUD_RATE)
 
XsensResultValue openPort (const uint32_t portNumber, const uint32_t baudRate=CMT_DEFAULT_BAUD_RATE)
 Open a communication channel to the given COM port number. More...
 
XsensResultValue peekLogMessageId (uint8_t &messageId)
 Open a communication channel to the given COM port number. More...
 
XsensResultValue readDataPacket (Packet *pack, bool acceptOther=false)
 Retrieve a data message. More...
 
XsensResultValue requestData (Packet *pack)
 
XsensResultValue reset (void)
 Request a data message and wait for it to arrive. More...
 
XsensResultValue resetOrientation (const CmtResetMethod method, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Perform an orientation reset on a device. More...
 
XsensResultValue restoreFactoryDefaults (const CmtDeviceId deviceId=CMT_DID_MASTER)
 Restore the device to factory default settings. More...
 
XsensResultValue setBaudrate (const uint32_t baudrate, bool reconnect=true)
 Set the baudrate and possibly reconnect. More...
 
XsensResultValue setBluetoothState (const bool enabled)
 Set the Bluetooth state of the Xbus Master. More...
 
XsensResultValue setBusPowerState (const bool enabled)
 Switch the Xbus Master bus power on or off. More...
 
XsensResultValue setDeviceMode (const CmtDeviceMode &mode, bool force, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Set the complete output mode of a device. More...
 
XsensResultValue setDeviceMode2 (const CmtDeviceMode2 &mode, bool force, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Set the complete output mode2 of a device. More...
 
XsensResultValue setErrorMode (const uint16_t mode)
 Set the error mode of the device. More...
 
XsensResultValue setGotoConfigTries (const uint16_t tries)
 Set the number of times the gotoConfig function will attempt a gotoConfig before failing. More...
 
XsensResultValue setHeading (const double heading, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Set the heading offset. More...
 
XsensResultValue setLocationId (uint16_t locationId, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Set the location ID of a sensor. More...
 
XsensResultValue setMagneticDeclination (const double declination, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Set the stored magnetic declination. More...
 
XsensResultValue setSyncInSettings (const CmtSyncInSettings &settings)
 Set the inbound synchronization settings of an MT device. More...
 
XsensResultValue setSyncInMode (const uint16_t mode)
 Set the inbound synchronization mode of an MT device. More...
 
XsensResultValue setSyncInSkipFactor (const uint16_t skipFactor)
 Set the inbound synchronization skip factor of an MT device. More...
 
XsensResultValue setSyncInOffset (const uint32_t offset)
 Set the inbound synchronization offset of an MT device. More...
 
XsensResultValue setSyncMode (const uint8_t mode)
 Set the sync mode of the Xbus Master. More...
 
XsensResultValue setSyncOutSettings (const CmtSyncOutSettings &settings)
 Set the outbound synchronization settings of an MT device. More...
 
XsensResultValue setSyncOutMode (const uint16_t mode)
 Set the outbound synchronization mode of an MT device. More...
 
XsensResultValue setSyncOutPulseWidth (const uint32_t pulseWidth)
 Set the outbound synchronization pulse width of an MT device. More...
 
XsensResultValue setSyncOutSkipFactor (const uint16_t skipFactor)
 Set the outbound synchronization skip factor of an MT device. More...
 
XsensResultValue setSyncOutOffset (const uint32_t offset)
 Set the outbound synchronization offset of an MT device. More...
 
XsensResultValue setTimeout (const uint32_t ms)
 
XsensResultValue setTimeoutConfig (const uint32_t timeout=CMT3_DEFAULT_TIMEOUT_CONF)
 Set the configuration mode timeout. More...
 
XsensResultValue setTimeoutMeasurement (const uint32_t timeout=CMT3_DEFAULT_TIMEOUT_MEAS)
 Set the measurement mode timeout. More...
 
XsensResultValue setXmOutputMode (const uint8_t mode)
 Set the dual-output mode of the XM. More...
 
XsensResultValue setXmPowerOff (void)
 Switch the connected Xbus Master. More...
 
XsensResultValue refreshCache (const bool file=false)
 Update device information stored on host PC. More...
 
XsensResultValue waitForDataMessage (Packet *pack)
 Wait for a data message to arrive. More...
 
XsensResultValue createLogFile (const char *filename, bool startLogging=false)
 Create a log file for incoming messages. More...
 
XsensResultValue createLogFile (const wchar_t *filename, bool startLogging=false)
 Create a log file for incoming messages. More...
 
XsensResultValue closeLogFile (bool del=false)
 Close an open log file. More...
 
bool isLogFileOpen (const char *filename) const
 Return whether or not(true or false) the supplied file is open. More...
 
bool isLogFileOpen (const wchar_t *filename) const
 Return whether or not(true or false) the supplied file is open. More...
 
XsensResultValue openLogFile (const char *filename)
 Open a log file for input. More...
 
XsensResultValue openLogFile (const wchar_t *filename)
 Open a log file for input. More...
 
XsensResultValue setDataSource (bool readFromFile)
 Set whether to read from comm port or file. More...
 
XsensResultValue setLogMode (bool active)
 Set the logging mode. More...
 
XsensResultValue resetLogFileReadPos (void)
 Restart reading from the start of the open log file. More...
 
XsensResultValue writeMessageToLogFile (const Message &msg)
 
XsensResultValue getAvailableScenarios (CmtScenario *scenarios, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Write the specified message to the open log file. More...
 
XsensResultValue getScenario (uint8_t &scenarioType, uint8_t &scenarioVersion, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Get the currently active scenario from a Motion Tracker. More...
 
XsensResultValue setScenario (const uint8_t scenarioType, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Specify the scenario to use in the sensor. More...
 
XsensResultValue getGravityMagnitude (double &magnitude, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Retrieve the currently used magnitude of the gravity vector. More...
 
XsensResultValue setGravityMagnitude (const double magnitude, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Set the currently used magnitude of the gravity vector. More...
 
XsensResultValue getGpsLeverArm (CmtVector &arm, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Get the currently used GPS lever arm. More...
 
XsensResultValue getGpsStatus (CmtGpsStatus &status, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Request the status of the GPS satellites in orbit. More...
 
XsensResultValue setGpsLeverArm (const CmtVector &arm, const CmtDeviceId deviceId=CMT_DID_MASTER)
 Set the currently used GPS lever arm. More...
 
XsensResultValue storeXkfState (const CmtDeviceId deviceId=CMT_DID_MASTER)
 Store important components of the XKF filter state to non-volatile memory. More...
 

Public Attributes

bool m_useRtc
 Indicates if the RTC should be computed or not (to save CPU time). More...
 
voidm_eMtsData [CMT_MAX_DEVICES_PER_PORT]
 Cached eMTS data. More...
 

Protected Member Functions

 Cmt3 (const Cmt3 &ref)
 This object cannot be copied, so this function is not implemented. More...
 
void fillRtc (Packet *pack)
 Internal function to compute the RTC value. More...
 
uint8_t getBusIdInternal (const CmtDeviceId devId) const
 Find a device Id in the list and return its busId. More...
 

Protected Attributes

Cmt2s m_serial
 The (optional) CMT level 2 serial object that this class operates on. More...
 
Cmt2f m_logFile
 The (optional) CMT level 2 logfile object that this class operates on. More...
 
double m_rtcMsPerSample
 ms per sample = 1000 / sample frequency. More...
 
uint16_t m_period
 The sample period of the port. More...
 
uint16_t m_skip
 The skip factor of the port. More...
 
TimeStamp m_rtcStart
 The start of the RTC counter, the time of arrival of sample 0. More...
 
uint32_t m_rtcCount
 The long sample counter (normal counter wraps at 64k). More...
 
CmtMtTimeStamp m_rtcLastSc
 The last received sample counter, used to determine wrap-around. More...
 
uint32_t m_baudrate
 The baudrate that was last set to be used by the port. More...
 
uint32_t m_timeoutConf
 The config mode timeout. More...
 
uint32_t m_timeoutMeas
 The measurement mode timeout. More...
 
XsensResultValue m_lastResult
 The last result of an operation. More...
 
uint16_t m_firstItem
 The index of the first formatting item. More...
 
uint16_t m_gotoConfigTries
 The number of times a goto config is attempted before the function fails. More...
 
bool m_measuring
 Keeps track of whether the connected device is measuring or being configured. More...
 
bool m_detailedScan
 Automatically scan for device details during open. Default is true (recommended). More...
 
bool m_readFromFile
 Indicates whether to read from the log file or from the serial port. More...
 
bool m_rtcInitialized
 Indicates if the rtc is initialised or not. More...
 
bool m_logging
 Indicates whether to write all received messages to the logfile or not, automatically set to true by createLogFile. More...
 
XsensResultValue m_lastHwError
 Contains the last error reported by hardware. More...
 
CmtDeviceId m_lastHwErrorDeviceId
 Contains the Device ID of the device that caused the last hardware error. More...
 
CmtDeviceConfiguration m_config
 The configuration of the connected devices. More...
 

Constructor & Destructor Documentation

◆ Cmt3() [1/2]

xsens::Cmt3::Cmt3 ( const Cmt3 ref)
protected

This object cannot be copied, so this function is not implemented.

◆ Cmt3() [2/2]

xsens::Cmt3::Cmt3 ( )

◆ ~Cmt3()

xsens::Cmt3::~Cmt3 ( )

Destructor, de-initializes, frees memory allocated for buffers, etc.

Definition at line 329 of file cmt3.cpp.

References xsens::Cmt2s::close(), xsens::Cmt2f::close(), CMT_MAX_DEVICES_PER_PORT, m_eMtsData, m_logFile, and m_serial.

Member Function Documentation

◆ clearHwError()

void xsens::Cmt3::clearHwError ( void  )
inline

Definition at line 105 of file cmt3.h.

References m_lastHwError, m_lastHwErrorDeviceId, and XRV_OK.

Referenced by Cmt3().

◆ closeLogFile()

XsensResultValue xsens::Cmt3::closeLogFile ( bool  del = false)

Close an open log file.

This function closes the logfile if it was open.

Parameters
delWhen set to true, the file will be deleted after closing if it is not read-only. This is mostly useful for temporary log-files.
See also
createLogFile isLogFileOpen openLogFile setLogMode

Definition at line 2708 of file cmt3.cpp.

References xsens::Cmt2f::close(), xsens::Cmt2f::closeAndDelete(), CMT3EXITLOG, CMT3LOG, xsens::Cmt2f::isOpen(), m_lastResult, m_logFile, m_logging, and XRV_NOFILEOPEN.

◆ closePort()

XsensResultValue xsens::Cmt3::closePort ( bool  gotoConfigFirst = true)

Close the communication port.

This function places the device in configuration mode and closes the communication port, ending all further communication with the device.

Definition at line 341 of file cmt3.cpp.

References xsens::Cmt2s::close(), CMT3EXITLOG, CMT3LOG, gotoConfig(), xsens::Cmt2f::isOpen(), m_lastResult, m_logFile, m_logging, m_measuring, m_readFromFile, m_serial, and XRV_OK.

Referenced by setBaudrate().

◆ createLogFile() [1/2]

XsensResultValue xsens::Cmt3::createLogFile ( const char *  filename,
bool  startLogging = false 
)

Create a log file for incoming messages.

This function creates a log file for recording incoming messages. The Cmt3 object must be connected to a communication port or the function will fail.

Parameters
filenameThe name of the file to use as a log file. A fully qualified (local) path+filename is recommended.
startLoggingWhen set to true (default), Cmt3 will immediately start logging incoming messages to the file, otherwise setLogMode must be called first before logging is started.
Remarks
If a writable file of the same name already exists in the target location, it will be overwritten without warning.
See also
closeLogFile isLogFileOpen openLogFile setLogMode
Note
This function is available in configuration AND in measurement mode.

Definition at line 2644 of file cmt3.cpp.

References xsens::Cmt2f::closeAndDelete(), CMT3EXITLOG, CMT3LOG, CMT_DID_BROADCAST, CMT_EMTS_SIZE, xsens::Cmt2f::create(), getConfiguration(), getEMtsData(), xsens::Cmt2s::isOpen(), xsens::Cmt2f::isOpen(), m_config, m_lastResult, m_logFile, m_logging, CmtDeviceConfiguration::m_numberOfDevices, m_serial, XRV_ALREADYOPEN, XRV_NOPORTOPEN, and XRV_OK.

◆ createLogFile() [2/2]

XsensResultValue xsens::Cmt3::createLogFile ( const wchar_t *  filename,
bool  startLogging = false 
)

Create a log file for incoming messages.

This function creates a log file for recording incoming messages. The Cmt3 object must be connected to a communication port or the function will fail.

Parameters
filenameThe name of the file to use as a log file. A fully qualified (local) path+filename is recommended.
startLoggingWhen set to true (default), Cmt3 will immediately start logging incoming messages to the file, otherwise setLogMode must be called first before logging is started.
Remarks
If a writable file of the same name already exists in the target location, it will be overwritten without warning.
See also
closeLogFile isLogFileOpen openLogFile setLogMode
Note
This function is available in configuration AND in measurement mode.

Definition at line 2676 of file cmt3.cpp.

References xsens::Cmt2f::closeAndDelete(), CMT3EXITLOG, CMT3LOG, CMT_DID_BROADCAST, CMT_EMTS_SIZE, xsens::Cmt2f::create(), getConfiguration(), getEMtsData(), xsens::Cmt2s::isOpen(), xsens::Cmt2f::isOpen(), m_config, m_lastResult, m_logFile, m_logging, CmtDeviceConfiguration::m_numberOfDevices, m_serial, XRV_ALREADYOPEN, XRV_NOPORTOPEN, and XRV_OK.

◆ fillRtc()

void xsens::Cmt3::fillRtc ( Packet pack)
protected

Internal function to compute the RTC value.

Definition at line 360 of file cmt3.cpp.

References xsens::Packet::getSampleCounter(), m_period, xsens::Packet::m_rtc, m_rtcCount, m_rtcInitialized, m_rtcLastSc, m_rtcMsPerSample, m_rtcStart, m_skip, and xsens::Packet::m_toa.

Referenced by readDataPacket(), and waitForDataMessage().

◆ getAvailableScenarios()

XsensResultValue xsens::Cmt3::getAvailableScenarios ( CmtScenario scenarios,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Write the specified message to the open log file.

This function can be used to add custom messages to a log file.

Note
A typical log file will only contain acknowledge messages, not request messages.
See also
createLogFile Retrieve a list of the available scenarios.

Use this function to retrieve a list of all scenarios available in a Motion Tracker. See the supplied documentation for more information about scenarios.

Parameters
scenariosA buffer for storing the available scenarios. The supplied buffer should be able to contain at least 6 scenarios, but for future devices a larger buffer is advised. Use CMT_MAX_SCENARIOS_IN_MT+1. The list is terminated by a scenario that has type 0.
Remarks
The type of any of the returned scenarios can be safely supplied to the setScenario function.
See also
getScenario setScenario
Note
This function is only available in configuration mode.

Definition at line 2875 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_DID_TYPEH_MASK, CMT_DID_TYPEH_MTI_MTX, CMT_DID_TYPEH_MTIG, CMT_LEN_SCENARIOLABEL, CMT_MAX_SCENARIOS_IN_MT, CMT_MID_REQAVAILABLESCENARIOS, deviceId, DO_DATA_REQUEST, xsens::Message::getDataBuffer(), xsens::Message::getDataByte(), CmtScenario::m_filterType, CmtScenario::m_label, m_lastResult, CmtScenario::m_type, CmtScenario::m_version, mrpt::system::os::memcpy(), and XRV_OK.

◆ getBatteryLevel()

XsensResultValue xsens::Cmt3::getBatteryLevel ( uint8_t level)

Get an Xbus Master's battery level.

The battery level is a value between 0 and 255 that indicates the voltage of the batteries. The scale is not linear and the values should not be used as an absolute voltage. The amount of time remaining for measurement given any battery level greatly depends on the type of batteries used, the number of sensors attached to the Xbus Master and the used output options.

Definition at line 401 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQBATLEVEL, DO_DATA_REQUEST_BID, m_lastResult, and XRV_OK.

◆ getBaudrate()

XsensResultValue xsens::Cmt3::getBaudrate ( uint32_t baudrate)

Get the baudrate used by a port.

This function returns the baud rate at which the port is currently connected. The function will return an error when no port is connected.

See also
getSerialBaudrate setSerialBaudrate setBaudrate

Definition at line 413 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, xsens::Cmt2s::isOpen(), m_baudrate, m_lastResult, m_serial, XRV_NOPORTOPEN, and XRV_OK.

◆ getBluetoothState()

XsensResultValue xsens::Cmt3::getBluetoothState ( bool &  enabled)

Get the state of the bluetooth communication.

This function tells whether the Bluetooth connection of the Xbus Master is on (1) or off (0).

Note
This function is only valid in configuration mode.

Definition at line 426 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQBTDISABLE, DO_DATA_REQUEST_BID, m_lastResult, and XRV_OK.

◆ getBusId()

XsensResultValue xsens::Cmt3::getBusId ( uint8_t busId,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
) const

Retrieve the BusId of a device.

The function checks its internal list for a match of deviceId. If it is found, the corresponding BusId is returned in busId. Otherwise, a 0 is placed in busId and XRV_NOTFOUND result is returned.

Definition at line 438 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_DID_MASTER, deviceId, m_config, CmtDeviceConfiguration::_devInfo::m_deviceId, CmtDeviceConfiguration::m_deviceInfo, m_lastResult, CmtDeviceConfiguration::m_masterDeviceId, CmtDeviceConfiguration::m_numberOfDevices, XRV_NOTFOUND, and XRV_OK.

◆ getBusIdInternal()

uint8_t xsens::Cmt3::getBusIdInternal ( const CmtDeviceId  devId) const
protected

Find a device Id in the list and return its busId.

CmtDeviceId 0= busId 0= broadcast. A CMT_BID_INVALID value is also possible and indicates that the devId was not found.

Definition at line 459 of file cmt3.cpp.

References CMT_BID_BROADCAST, CMT_BID_INVALID, CMT_BID_MASTER, CMT_DID_BROADCAST, CMT_DID_MASTER, m_config, CmtDeviceConfiguration::_devInfo::m_deviceId, CmtDeviceConfiguration::m_deviceInfo, CmtDeviceConfiguration::m_masterDeviceId, and CmtDeviceConfiguration::m_numberOfDevices.

Referenced by getDeviceMode2(), getEMtsData(), setDeviceMode2(), setGpsLeverArm(), and storeXkfState().

◆ getBusPowerState()

XsensResultValue xsens::Cmt3::getBusPowerState ( bool &  enabled)

Get the state of the Xbus power.

This function tells whether the Xbus of the connected Xbus Master is currently switched on (1) or not (0). When it is switched off, the attached MT devices have no power and communication with them is not possible. Before going to measurement mode, use setBusPowerState to restore power.

See also
setBusPowerState
Note
This function is only valid in configuration mode.

Definition at line 480 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_BUSPWR, DO_DATA_REQUEST_BID, m_lastResult, and XRV_OK.

◆ getCmt2f()

Cmt2f * xsens::Cmt3::getCmt2f ( void  )

Return a reference to the embedded Cmt2f (logfile) object.

Any manipulation of the object should be done through Cmt3. Cmt3's integrity is not guaranteed if the Cmt2f object is manipulated directly.

See also
refreshCache

Definition at line 491 of file cmt3.cpp.

References m_logFile.

◆ getCmt2s()

Cmt2s * xsens::Cmt3::getCmt2s ( void  )

Return a reference to the embedded Cmt2s (comm port) object.

Any manipulation of the object should be done through Cmt3. Cmt3's integrity is not guaranteed if the Cmt2s object is manipulated directly.

See also
refreshCache

Definition at line 497 of file cmt3.cpp.

References m_serial.

◆ getConfiguration()

XsensResultValue xsens::Cmt3::getConfiguration ( CmtDeviceConfiguration configuration)

◆ getDataLength()

XsensResultValue xsens::Cmt3::getDataLength ( uint32_t length,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Retrieve data size.

This function retrieves the number of bytes that are in a data message as sent by the given device.

Definition at line 550 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_REQDATALENGTH, deviceId, DO_DATA_REQUEST, m_lastResult, and XRV_OK.

◆ getDeviceCount()

uint32_t xsens::Cmt3::getDeviceCount ( void  ) const

Retrieve total device count.

This function retrieves the total number of connected (master + slave) devices or 0 if not connected.

Definition at line 562 of file cmt3.cpp.

References CMT3LOG, xsens::Cmt2s::isOpen(), xsens::Cmt2f::isOpen(), isXm(), m_config, m_logFile, CmtDeviceConfiguration::m_numberOfDevices, and m_serial.

◆ getDeviceId()

XsensResultValue xsens::Cmt3::getDeviceId ( const uint8_t  busId,
CmtDeviceId deviceId 
) const

Retrieve the DeviceId of a device given its Bus ID.

This function retrieves the DeviceId for the device with the given Bus ID. When no devices are connected, a 0 ID is supplied.

Definition at line 577 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, deviceId, m_config, CmtDeviceConfiguration::_devInfo::m_deviceId, CmtDeviceConfiguration::m_deviceInfo, m_lastResult, CmtDeviceConfiguration::m_masterDeviceId, CmtDeviceConfiguration::m_numberOfDevices, XRV_INVALIDID, and XRV_OK.

Referenced by getEMtsData(), gotoConfig(), readDataPacket(), setGpsLeverArm(), storeXkfState(), and waitForDataMessage().

◆ getDeviceMode()

XsensResultValue xsens::Cmt3::getDeviceMode ( CmtDeviceMode mode,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Return device mode.

This function retrieves the output-related settings of the device, such as the sample rate and output settings.

See also
setDeviceMode
Note
This function actually reads the device mode from the cached configuration, so it is available in measurement mode.
See also
refreshCache

Definition at line 595 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, deviceId, getDeviceMode2(), CmtDeviceMode2::getSampleFrequency(), CmtDeviceMode2::m_outputMode, CmtDeviceMode2::m_outputSettings, and XRV_OK.

◆ getDeviceMode2()

XsensResultValue xsens::Cmt3::getDeviceMode2 ( CmtDeviceMode2 mode,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Return device mode2.

This function retrieves the output-related settings of the device, such as the period, skip factor and output settings.

See also
setDeviceMode
Note
This function actually reads the device mode from the cached configuration, so it is available in measurement mode.
See also
refreshCache

Definition at line 613 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_INVALID, CMT_BID_MASTER, deviceId, getBusIdInternal(), m_config, CmtDeviceConfiguration::m_deviceInfo, m_lastResult, CmtDeviceConfiguration::_devInfo::m_outputMode, CmtDeviceConfiguration::_devInfo::m_outputSettings, m_period, m_skip, XRV_INVALIDID, and XRV_OK.

Referenced by getDeviceMode().

◆ getEMtsData()

XsensResultValue xsens::Cmt3::getEMtsData ( void buffer,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Retrieve the eMts data of the specified sensor(s).

This function can be used to read proprietary data from one or more Motion Trackers. This data is required by higher level functions in combination with Configuration data to convert Raw data into Calibrated and Orientation data. The eMTs data is quite large, but it is cached. The first request should be done in configuration mode, but following requests can be done in measurement mode. When requesting eMTS data for a single sensor, the buffer should be at least CMT_EMTS_SIZE bytes long. When using CMT_DID_BROADCAST, the eMTS data of all connected sensors is placed into the buffer sequentially. In the latter case, the buffer should be able to hold at least sensorcount * CMT_EMTS_SIZE bytes.

Definition at line 637 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_BROADCAST, CMT_BID_INVALID, CMT_BID_MASTER, CMT_EMTS_SIZE, CMT_MID_EMTSDATA, CMT_MID_ERROR, CMT_MID_REQEMTS, deviceId, getBusIdInternal(), xsens::Message::getDataBuffer(), xsens::Message::getDataByte(), xsens::Message::getDataSize(), getDeviceId(), xsens::Message::getMessageId(), xsens::Cmt2s::isOpen(), xsens::Cmt2f::isOpen(), isXm(), m_config, CmtDeviceConfiguration::_devInfo::m_deviceId, CmtDeviceConfiguration::m_deviceInfo, m_eMtsData, m_lastHwError, m_lastHwErrorDeviceId, m_lastResult, m_logFile, m_logging, CmtDeviceConfiguration::m_masterDeviceId, CmtDeviceConfiguration::m_numberOfDevices, m_readFromFile, m_serial, mrpt::system::os::memcpy(), xsens::Cmt2f::readMessage(), xsens::Message::setBusId(), xsens::Message::setDataBuffer(), xsens::Message::setDataByte(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), writeMessageToLogFile(), XRV_INVALIDID, XRV_NOFILEOPEN, XRV_NOPORTOPEN, XRV_NULLPTR, and XRV_OK.

Referenced by createLogFile().

◆ getErrorMode()

XsensResultValue xsens::Cmt3::getErrorMode ( uint16_t mode,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Return the error mode of the device.

This function returns the error mode of the device. The error mode determines how the device handles errors. See the low-level communication documentation for more details.

See also
setErrorMode
Note
This function is only valid in configuration mode.

Definition at line 792 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQERRORMODE, CMT_MID_REQXMERRORMODE, deviceId, DO_DATA_REQUEST, DO_DATA_REQUEST_BID, isXm(), m_lastResult, and XRV_OK.

◆ getFirmwareRevision()

XsensResultValue xsens::Cmt3::getFirmwareRevision ( CmtVersion revision,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Return Firmware revision.

This function retrieves the firmware version that is currently installed in the device.

Note
This function is only valid in configuration mode.

Definition at line 862 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_REQFWREV, deviceId, DO_DATA_REQUEST, xsens::Message::getDataByte(), m_lastResult, CmtVersion::m_major, CmtVersion::m_minor, CmtVersion::m_revision, and XRV_OK.

◆ getGpsLeverArm()

XsensResultValue xsens::Cmt3::getGpsLeverArm ( CmtVector arm,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Get the currently used GPS lever arm.

Use this function to retrieve the vector currently used as the GPS lever arm in meters. The GPS lever arm is the relative position of the GPS antenna to the MTi-G unit. The arm is specified in the object coordinate system. See the manual for more information on coordinate systems, alignment resets and the lever arm.

See also
setGpsLeverArm
Note
This function is only available in configuration mode.
This function is only available for MTi-G devices.

Definition at line 2944 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_REQGPSLEVERARM, deviceId, DO_DATA_REQUEST, xsens::Message::getDataFloat(), CmtVector::m_data, m_lastResult, and XRV_OK.

◆ getGpsStatus()

XsensResultValue xsens::Cmt3::getGpsStatus ( CmtGpsStatus status,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Request the status of the GPS satellites in orbit.

This function requests the GPS satellite status information from the GPS subsystem. In config mode, this information is requested from the GPS subsystem immediately, which can cause a relatively long delay (250ms) before a reply is received. In measurement mode, the satellite status is regularly polled internally and the latest status is returned immediately when this function is called.

Definition at line 2956 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MAX_SVINFO, CMT_MID_REQGPSSTATUS, deviceId, DO_DATA_REQUEST, xsens::Message::getDataByte(), m_lastResult, status, and XRV_OK.

◆ getGravityMagnitude()

XsensResultValue xsens::Cmt3::getGravityMagnitude ( double &  magnitude,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Retrieve the currently used magnitude of the gravity vector.

The magnitude of the gravity vector is used to determine absolute acceleration from measured acceleration.

See also
setGravityMagnitude
Note
This function is only available in configuration mode.

Definition at line 2925 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_REQGRAVITYMAGNITUDE, deviceId, DO_DATA_REQUEST, xsens::Message::getDataFloat(), m_lastResult, and XRV_OK.

◆ getHeading()

XsensResultValue xsens::Cmt3::getHeading ( double &  heading,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Return the heading offset.

This function retrieves the heading offset in radians used by the device. The valid range is -pi to +pi. The heading offset is used as a final correction on the output orientation.

See also
setHeading getMagneticDeclination setMagneticDeclination
Note
This function is only valid in configuration mode.

Definition at line 878 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_REQHEADING, deviceId, DO_DATA_REQUEST, xsens::Message::getDataFloat(), m_lastResult, and XRV_OK.

◆ getHwError()

XsensResultValue xsens::Cmt3::getHwError ( CmtDeviceId did) const
inline

<

Return the last Hardware error code.

This function returns the XsensResultValue of the last problem reported by hardware (if any). Hardware problems are all 'error' messages returned by a sensor.

Parameters
didIf any problems were found, the responsible device ID will be returned in this parameter.
See also
clearHwError

Definition at line 103 of file cmt3.h.

References m_lastHwError, and m_lastHwErrorDeviceId.

◆ getLastResult()

XsensResultValue xsens::Cmt3::getLastResult ( void  ) const
inline

<

Return the error code of the last user function call.

Definition at line 101 of file cmt3.h.

References m_lastResult.

◆ getLocationId()

XsensResultValue xsens::Cmt3::getLocationId ( uint16_t locationId,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Return the location ID of a sensor.

This function retrieves the location ID stored in the device.

See also
setLocationId
Note
This function is only valid in configuration mode.

Definition at line 890 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_REQLOCATIONID, deviceId, DO_DATA_REQUEST, xsens::Message::getDataShort(), m_lastResult, and XRV_OK.

◆ getLogFileName() [1/2]

XsensResultValue xsens::Cmt3::getLogFileName ( char *  filename)

Retrieve the name of the open log file or an empty string if no logfile is open.

Definition at line 934 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, xsens::Cmt2f::getName(), xsens::Cmt2f::isOpen(), m_lastResult, m_logFile, and XRV_NOFILEOPEN.

◆ getLogFileName() [2/2]

XsensResultValue xsens::Cmt3::getLogFileName ( wchar_t *  filename)

Retrieve the name of the open log file or an empty string if no logfile is open.

Definition at line 947 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, xsens::Cmt2f::getName(), xsens::Cmt2f::isOpen(), m_lastResult, m_logFile, and XRV_NOFILEOPEN.

◆ getLogFileReadPosition()

XsensResultValue xsens::Cmt3::getLogFileReadPosition ( CmtFilePos pos)

Retrieve the read position of the log file.

This function will return the current read position in the open log file in bytes from the start.

Note
The read and write positions of log files are completely independent of each other.
Remarks
To change the read position, either use resetLogFileReadPos or manipulate the log file through getCmt2f.
See also
resetLogFileReadPos getCmt2f

Definition at line 902 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, xsens::Cmt2f::getReadPosition(), xsens::Cmt2f::isOpen(), m_lastResult, m_logFile, XRV_NOFILEOPEN, and XRV_OK.

◆ getLogFileSize()

XsensResultValue xsens::Cmt3::getLogFileSize ( CmtFilePos size)

Retrieve the size of the open log file in bytes.

Definition at line 918 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, xsens::Cmt2f::getFileSize(), xsens::Cmt2f::isOpen(), m_lastResult, m_logFile, XRV_NOFILEOPEN, and XRV_OK.

◆ getMagneticDeclination()

XsensResultValue xsens::Cmt3::getMagneticDeclination ( double &  declination,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Return the stored magnetic declination.

This function retrieves the stored local magnetic declination in radians. The valid range is -pi to +pi. The magnetic declination is used in the sensor fusion process to determine the output orientation.

See also
getHeading setHeading setMagneticDeclination
Note
This function is only valid in configuration mode.

Definition at line 960 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_REQMAGNETICDECLINATION, deviceId, DO_DATA_REQUEST, xsens::Message::getDataFloat(), m_lastResult, and XRV_OK.

◆ getMasterId()

CmtDeviceId xsens::Cmt3::getMasterId ( void  )

◆ getMtCount()

uint16_t xsens::Cmt3::getMtCount ( void  ) const

Return the device Id of the first device (master).

Note
The deviceId is read from the cached configuration data, so it is also available in measurement mode. Retrieve number of MT devices.

This function will return the number of connected MT devices. Effectively, this returns the device count minus any Xbus Masters.

Definition at line 983 of file cmt3.cpp.

References CMT3LOGDAT, xsens::Cmt2s::isOpen(), xsens::Cmt2f::isOpen(), m_config, m_logFile, CmtDeviceConfiguration::m_numberOfDevices, and m_serial.

◆ getMtDeviceId()

XsensResultValue xsens::Cmt3::getMtDeviceId ( const uint8_t  index,
CmtDeviceId deviceId 
) const

◆ getPortNr()

XsensResultValue xsens::Cmt3::getPortNr ( uint8_t port) const

Return the device Id of an MT device.

This function returns the ID of the index'th MT (non-Xbus Master) device connected to this object.

Note
The deviceId is read from the cached configuration data, so it is also available in measurement mode. Return the port number that this object is connected to.

If CMT is reading from a log file, an error will be returned.

Definition at line 1007 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, xsens::Cmt2s::getPortNr(), m_lastResult, and m_serial.

◆ getProductCode()

XsensResultValue xsens::Cmt3::getProductCode ( char *  productCode,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Return product code.

This function retrieves the product code of the given device.

Parameters
productCodeThe buffer that will store the product code. This buffer should be at least 20 bytes.
Remarks
The product code is NOT necessarily NULL-terminated. If it is less than 20 characters it will be, but if the product code is 20 characters it won't be. The recommended method is to create a buffer that is 21 bytes long and set the last byte to 0 before calling this function.
Note
This function is only valid in configuration mode.

Definition at line 1017 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_REQPRODUCTCODE, deviceId, DO_DATA_REQUEST, xsens::Message::getDataBuffer(), xsens::Message::getDataSize(), m_lastResult, mrpt::system::os::memcpy(), and XRV_OK.

◆ getSampleFrequency()

uint16_t xsens::Cmt3::getSampleFrequency ( void  )

Return current sample frequency.

This function determines the sample frequency of the device from the cached sample rate and skip factor and returns it. For devices connected to an Xbus Master, the values used by the Xbus Master are returned.

See also
setDeviceMode getDeviceMode

Definition at line 1033 of file cmt3.cpp.

References CMT3LOG, m_period, and m_skip.

◆ getScenario()

XsensResultValue xsens::Cmt3::getScenario ( uint8_t scenarioType,
uint8_t scenarioVersion,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Get the currently active scenario from a Motion Tracker.

This function retrieves the scenario currently used by the specified device when outputting orientation and/or position data.

See also
getAvailableScenarios setScenario
Note
This function is only available in configuration mode.

Definition at line 2904 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_REQSCENARIO, deviceId, DO_DATA_REQUEST, xsens::Message::getDataByte(), m_lastResult, and XRV_OK.

◆ getSerialBaudrate()

XsensResultValue xsens::Cmt3::getSerialBaudrate ( uint32_t baudrate)

Return the baud rate used for serial communication.

This function retrieves the baud rate that is used when the device is connected by a serial connection. In most cases this is the same as getBaudrate, but when an Xbus Master is connected by a Bluetooth connection, it doesn't have to be.

See also
setSerialBaudrate setBaudrate getBaudrate
Note
This function is only valid in configuration mode.

Definition at line 1045 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BAUD_RATE_115K2, CMT_BAUD_RATE_19K2, CMT_BAUD_RATE_230K4, CMT_BAUD_RATE_38K4, CMT_BAUD_RATE_460K8, CMT_BAUD_RATE_57K6, CMT_BAUD_RATE_921K6, CMT_BAUD_RATE_9600, CMT_BAUDCODE_115K2, CMT_BAUDCODE_19K2, CMT_BAUDCODE_230K4, CMT_BAUDCODE_38K4, CMT_BAUDCODE_460K8, CMT_BAUDCODE_57K6, CMT_BAUDCODE_921K6, CMT_BAUDCODE_9K6, CMT_BID_MASTER, CMT_MID_REQBAUDRATE, DO_DATA_REQUEST_BID, xsens::Message::getDataByte(), m_lastResult, XRV_BAUDRATEINVALID, and XRV_OK.

◆ getSyncInMode()

XsensResultValue xsens::Cmt3::getSyncInMode ( uint16_t mode)

Retrieve the inbound synchronization mode of an MT device.

This function retrieves the current inbound synchronization mode of the MT device. This function does not work for Xbus Masters and should not be used for sensors connected to an Xbus Master.

See also
setSyncInMode setSyncInSettings getSyncInSettings getSyncInSkipFactor setSyncInSkipFactor getSyncInOffset setSyncInOffset getSyncOutSettings setSyncOutSettings getSyncMode setSyncMode

Definition at line 1142 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQSYNCINSETTINGS, CMT_MID_REQSYNCINSETTINGSACK, CMT_PARAM_SYNCIN_MODE, xsens::Message::getDataShort(), HANDLE_ERR_RESULT, m_lastResult, m_logFile, m_logging, m_serial, xsens::Message::setBusId(), xsens::Message::setDataByte(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), and XRV_OK.

◆ getSyncInOffset()

XsensResultValue xsens::Cmt3::getSyncInOffset ( uint32_t offset)

Retrieve the inbound synchronization offset of an MT device.

This function retrieves the current inbound synchronization offset of the MT device. This function does not work for Xbus Masters and should not be used for sensors connected to an Xbus Master.

See also
setSyncInOffset setSyncInSettings getSyncInSettings getSyncInSkipFactor setSyncInSkipFactor getSyncOutSettings setSyncOutSettings getSyncMode setSyncMode

Definition at line 1192 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQSYNCINSETTINGS, CMT_MID_REQSYNCINSETTINGSACK, CMT_PARAM_SYNCIN_OFFSET, CMT_SYNC_CLOCK_TICKS_TO_NS, xsens::Message::getDataLong(), HANDLE_ERR_RESULT, m_lastResult, m_logFile, m_logging, m_serial, xsens::Message::setBusId(), xsens::Message::setDataByte(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), and XRV_OK.

◆ getSyncInSettings()

XsensResultValue xsens::Cmt3::getSyncInSettings ( CmtSyncInSettings settings)

Retrieve the inbound synchronization settings of the master MT device.

This function retrieves the current inbound synchronization settings of the master MT device (sync mode, skip factor and offset). This function does not work for Xbus Masters and should not be used for sensors connected to an Xbus Master.

See also
setSyncInSettings getSyncOutSettings setSyncOutSettings getSyncMode setSyncMode
Note
This function is only valid in configuration mode.

Definition at line 1094 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQSYNCINSETTINGS, CMT_MID_REQSYNCINSETTINGSACK, CMT_PARAM_SYNCIN_MODE, CMT_PARAM_SYNCIN_OFFSET, CMT_PARAM_SYNCIN_SKIPFACTOR, CMT_SYNC_CLOCK_TICKS_TO_NS, xsens::Message::getDataLong(), xsens::Message::getDataShort(), HANDLE_ERR_RESULT, m_lastResult, m_logFile, m_logging, CmtSyncInSettings::m_mode, CmtSyncInSettings::m_offset, m_serial, CmtSyncInSettings::m_skipFactor, xsens::Message::setBusId(), xsens::Message::setDataByte(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), and XRV_OK.

◆ getSyncInSkipFactor()

XsensResultValue xsens::Cmt3::getSyncInSkipFactor ( uint16_t skipFactor)

Retrieve the inbound synchronization skip factor of an MT device.

This function retrieves the current inbound synchronization skip factor of the MT device. This function does not work for Xbus Masters and should not be used for sensors connected to an Xbus Master.

See also
setSyncInSkipFactor setSyncInSettings getSyncInSettings getSyncInOffset setSyncInOffset getSyncOutSettings setSyncOutSettings getSyncMode setSyncMode

Definition at line 1167 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQSYNCINSETTINGS, CMT_MID_REQSYNCINSETTINGSACK, CMT_PARAM_SYNCIN_SKIPFACTOR, xsens::Message::getDataShort(), HANDLE_ERR_RESULT, m_lastResult, m_logFile, m_logging, m_serial, xsens::Message::setBusId(), xsens::Message::setDataByte(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), and XRV_OK.

◆ getSyncMode()

XsensResultValue xsens::Cmt3::getSyncMode ( uint8_t mode)

Retrieve the sync mode of the Xbus Master.

This function requests the current synchronization mode used by the specified Xbus Master. This function is not valid for MT devices.

See also
setSyncMode getSyncInSettings setSyncInSettings getSyncOutSettings setSyncOutSettings
Note
This function is only valid in configuration mode.

Definition at line 1220 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQSYNCMODE, DO_DATA_REQUEST_BID, xsens::Message::getDataByte(), m_lastResult, and XRV_OK.

◆ getSyncOutMode()

XsensResultValue xsens::Cmt3::getSyncOutMode ( uint16_t mode)

◆ getSyncOutOffset()

XsensResultValue xsens::Cmt3::getSyncOutOffset ( uint32_t offset)

◆ getSyncOutPulseWidth()

XsensResultValue xsens::Cmt3::getSyncOutPulseWidth ( uint32_t pulseWidth)

◆ getSyncOutSettings()

XsensResultValue xsens::Cmt3::getSyncOutSettings ( CmtSyncOutSettings settings)

Retrieve the outbound synchronization settings of the master MT device.

This function retrieves the current outbound synchronization settings of the MT device (sync mode, skip factor, offset and pulse width). This function does not work for Xbus Masters and should not be used for sensors connected to an Xbus Master.

See also
setSyncOutSettings getSyncInSettings setSyncInSettings getSyncMode setSyncMode
Note
This function is only valid in configuration mode.

Definition at line 1232 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQSYNCOUTSETTINGS, CMT_MID_REQSYNCOUTSETTINGSACK, CMT_PARAM_SYNCOUT_MODE, CMT_PARAM_SYNCOUT_OFFSET, CMT_PARAM_SYNCOUT_PULSEWIDTH, CMT_PARAM_SYNCOUT_SKIPFACTOR, CMT_SYNC_CLOCK_TICKS_TO_NS, xsens::Message::getDataLong(), xsens::Message::getDataShort(), HANDLE_ERR_RESULT, m_lastResult, m_logFile, m_logging, CmtSyncOutSettings::m_mode, CmtSyncOutSettings::m_offset, CmtSyncOutSettings::m_pulseWidth, m_serial, CmtSyncOutSettings::m_skipFactor, xsens::Message::setBusId(), xsens::Message::setDataByte(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), and XRV_OK.

◆ getSyncOutSkipFactor()

XsensResultValue xsens::Cmt3::getSyncOutSkipFactor ( uint16_t skipFactor)

Retrieve the outbound synchronization skip factor of an MT device.

This function retrieves the current outbound synchronization skip factor of the MT device. This function does not work for Xbus Masters and should not be used for sensors connected to an Xbus Master.

See also
stSyncOutSkipFactor setSyncOutSettings getSyncOutSettings setSyncOutMode getSyncOutMode getSyncOutPulseWidth setSyncOutPulseWidth getSyncOutOffset setSyncOutOffset getSyncInSettings setSyncInSettings getSyncMode setSyncMode

Definition at line 1344 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQSYNCOUTSETTINGS, CMT_MID_REQSYNCOUTSETTINGSACK, CMT_PARAM_SYNCOUT_SKIPFACTOR, xsens::Message::getDataShort(), HANDLE_ERR_RESULT, m_lastResult, m_logFile, m_logging, m_serial, xsens::Message::setBusId(), xsens::Message::setDataByte(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), and XRV_OK.

◆ getTimeoutConfig()

uint32_t xsens::Cmt3::getTimeoutConfig ( void  ) const

Return the configuration mode timeout.

When in config mode, the system uses a different message timeout than in measurement mode, since configuration messages can take longer to process than measurement mode messages. This function can be used to determine the current config mode timeout in ms.

See also
setTimeoutConfig getTimeoutMeasurement setTimeoutMeasurement

Definition at line 1396 of file cmt3.cpp.

References m_timeoutConf.

◆ getTimeoutMeasurement()

uint32_t xsens::Cmt3::getTimeoutMeasurement ( void  ) const

Return the measurement mode timeout.

When in measurement mode, the system uses a different message timeout than in config mode, since measurement mode messages should be faster to process than config mode messages. This function can be used to determine the current measurement mode timeout in ms.

See also
setTimeoutMeasurement getTimeoutConfig setTimeoutConfig

Definition at line 1402 of file cmt3.cpp.

References m_timeoutMeas.

◆ getUtcTime()

XsensResultValue xsens::Cmt3::getUtcTime ( CmtUtcTime utc,
const CmtDeviceId  deviceId 
)

Return the UTC time of the last received sample.

This function is only valid for MTi-G sensors. In measurement mode it will retrieve the UTC time of the last received sample. In Config mode, it will retrieve the most recent UTC time. In config mode, the time returned will be requested diectly from the GPS subsystem, with several layers of messaging between the original source and the host. In measurement mode, the UTC time is requested from the GPS subsystem periodically and estimated (with a very high precision) for the remaining samples. So in config mode, the time will probably jitter more than in measurement mode.

Definition at line 1409 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_REQUTCTIME, deviceId, DO_DATA_REQUEST, xsens::Message::getDataByte(), xsens::Message::getDataLong(), xsens::Message::getDataShort(), CmtUtcTime::m_day, CmtUtcTime::m_hour, m_lastResult, CmtUtcTime::m_minute, CmtUtcTime::m_month, CmtUtcTime::m_nano, CmtUtcTime::m_second, CmtUtcTime::m_valid, CmtUtcTime::m_year, and XRV_OK.

◆ getXmOutputMode()

XsensResultValue xsens::Cmt3::getXmOutputMode ( uint8_t mode)

Return the dual-output mode of the XM.

This function retrieves the dual mode output mode of the Xbus Master. The dual output mode of the Xbus Master defines whether it will send data on the serial connection (at the same baud rate as the bluetooth connection) when it is connected via Bluetooth. When set to 0, the serial communication is disabled, data is sent over the serial bus.

Note
When dual-mode is enabled, the Xbus Master will NOT receive command messages on the serial bus.
See also
setXmOutputMode

Definition at line 1433 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQOPMODE, DO_DATA_REQUEST_BID, xsens::Message::getDataByte(), m_lastResult, and XRV_OK.

◆ gotoConfig()

XsensResultValue xsens::Cmt3::gotoConfig ( void  )

◆ gotoMeasurement()

XsensResultValue xsens::Cmt3::gotoMeasurement ( void  )

Place all connected devices into Measurement Mode.

This function places the sensors in measurement mode.

Note
This function has no effect when reading from a log file

Definition at line 1499 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_GOTOMEASUREMENT, CMT_MID_GOTOMEASUREMENTACK, xsens::Cmt2s::getCmt1s(), xsens::Cmt1s::getPortNr(), HANDLE_ERR_RESULT, m_lastResult, m_logFile, m_logging, m_measuring, m_rtcInitialized, m_serial, m_timeoutMeas, xsens::Message::setBusId(), xsens::Cmt2s::setTimeout(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), and XRV_OK.

Referenced by setBaudrate().

◆ initBus()

XsensResultValue xsens::Cmt3::initBus ( void  )

Perform an initBus request.

See the low-level documentation for more information on the InitBus message.

See also
refreshCache setBusPowerState

Definition at line 1523 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_INITBUS, DO_DATA_REQUEST_BID, xsens::Cmt2s::getCmt1s(), xsens::Cmt1s::getPortNr(), m_lastResult, m_serial, and XRV_OK.

Referenced by openPort().

◆ isLogFileOpen() [1/2]

bool xsens::Cmt3::isLogFileOpen ( const char *  filename) const

Return whether or not(true or false) the supplied file is open.

When the filename parameter is NULL or empty "", the function will simply return whether a log file is open. Otherwise, the supplied name will be checked against the name of the open log file as well.

Returns
true if the log file is open, false if it isn't
See also
closeLogFile createLogFile openLogFile setLogMode

Definition at line 2723 of file cmt3.cpp.

References mrpt::system::os::_strnicmp(), CMT3LOG, CMT_MAX_FILENAME_LENGTH, xsens::Cmt2f::getName(), xsens::Cmt2f::isOpen(), and m_logFile.

◆ isLogFileOpen() [2/2]

bool xsens::Cmt3::isLogFileOpen ( const wchar_t *  filename) const

Return whether or not(true or false) the supplied file is open.

When the filename parameter is NULL or empty "", the function will simply return whether a log file is open. Otherwise, the supplied name will be checked against the name of the open log file as well.

Returns
true if the log file is open, false if it isn't
See also
closeLogFile createLogFile openLogFile setLogMode

Definition at line 2742 of file cmt3.cpp.

References CMT3LOG, CMT_MAX_FILENAME_LENGTH, xsens::Cmt2f::getName(), xsens::Cmt2f::isOpen(), and m_logFile.

◆ isLogging()

bool xsens::Cmt3::isLogging ( void  ) const
inline

<

Return whether the Cmt3 object is writing to a log file or not

Definition at line 140 of file cmt3.h.

References m_logging.

◆ isPortOpen()

bool xsens::Cmt3::isPortOpen ( void  ) const
inline

<

Return whether the communication port is open or not.

Definition at line 142 of file cmt3.h.

References xsens::Cmt2s::isOpen(), and m_serial.

◆ isXm()

bool xsens::Cmt3::isXm ( void  ) const

◆ openLogFile() [1/2]

XsensResultValue xsens::Cmt3::openLogFile ( const char *  filename)

Open a log file for input.

This function opens the supplied log file for reading. The function will fail if a serial connection is currently open.

Parameters
filenameThe name of the file to open. It is recommended to use a fully qualified path+filename.
Note
This function is only available in configuration mode.
See also
closeLogFile createLogFile isLogFileOpen setLogMode

Definition at line 2761 of file cmt3.cpp.

References xsens::Cmt2f::close(), CMT3EXITLOG, CMT3LOG, xsens::Cmt2s::isOpen(), xsens::Cmt2f::isOpen(), m_lastResult, m_logFile, m_logging, m_readFromFile, m_serial, xsens::Cmt2f::open(), refreshCache(), XRV_ALREADYOPEN, XRV_INVALIDOPERATION, and XRV_OK.

◆ openLogFile() [2/2]

XsensResultValue xsens::Cmt3::openLogFile ( const wchar_t *  filename)

Open a log file for input.

This function opens the supplied log file for reading. The function will fail if a serial connection is currently open.

Parameters
filenameThe name of the file to open. It is recommended to use a fully qualified path+filename.
Note
This function is only available in configuration mode.
See also
closeLogFile createLogFile isLogFileOpen setLogMode

Definition at line 2786 of file cmt3.cpp.

References xsens::Cmt2f::close(), CMT3EXITLOG, CMT3LOG, xsens::Cmt2s::isOpen(), xsens::Cmt2f::isOpen(), m_lastResult, m_logFile, m_logging, m_readFromFile, m_serial, xsens::Cmt2f::open(), refreshCache(), XRV_ALREADYOPEN, XRV_INVALIDOPERATION, and XRV_OK.

◆ openPort() [1/2]

XsensResultValue xsens::Cmt3::openPort ( const char *  portName,
const uint32_t  baudRate = CMT_DEFAULT_BAUD_RATE 
)

◆ openPort() [2/2]

XsensResultValue xsens::Cmt3::openPort ( const uint32_t  portNumber,
const uint32_t  baudRate = CMT_DEFAULT_BAUD_RATE 
)

Open a communication channel to the given COM port number.

This function is first passed through to the Cmt2s object. Then, the device settings are retrieved and stored locally. This function automatically places the device(s) in config mode, using gotoConfig.

See also
gotoConfig closePort

Definition at line 1593 of file cmt3.cpp.

References xsens::Cmt2s::close(), CMT3EXITLOG, CMT3LOG, gotoConfig(), initBus(), xsens::Cmt2f::isOpen(), m_baudrate, m_lastResult, m_logFile, m_logging, m_measuring, m_rtcInitialized, m_serial, m_timeoutConf, m_timeoutMeas, xsens::Cmt2s::open(), refreshCache(), xsens::Cmt2s::setTimeout(), XRV_ALREADYOPEN, XRV_CONFIGCHECKFAIL, XRV_OK, and xsensResultText().

◆ peekLogMessageId()

XsensResultValue xsens::Cmt3::peekLogMessageId ( uint8_t messageId)

Open a communication channel to the given COM port number.

This function is first passed through to the Cmt2s object. Then, the device settings are retrieved and stored locally. This function automatically places the device(s) in config mode, using gotoConfig.

See also
gotoConfig closePort Peek(take a look) at the message ID of the next message.

This function can only be used when reading from a log file. It will find the next message in the file and place its message ID in the messageId parameter. Afterwards, the read position of the file will be restored.

Remarks
This function is mostly useful when dealing with a file that has more than just data messages. By using the peek function, it is possible to decide whether a readDataPacket should be called or for example getBatteryLevel or getGpsStatus. When the peek function is not used and for example getBatteryLevel is called, all messages between the current read position and the first battery level message in the file will be skipped. An alternative would be to get the read position, call the desired function (get battery level) and restore the read position, but then the moment at which the (battery level, UTC time, satellite info, etc) data becomes available will not be known.

Definition at line 1646 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, xsens::Message::getMessageId(), xsens::Cmt2f::getReadPosition(), m_lastResult, m_logFile, m_readFromFile, xsens::Cmt2f::readMessage(), xsens::Cmt2f::setReadPosition(), XRV_INVALIDOPERATION, and XRV_OK.

◆ readDataPacket()

XsensResultValue xsens::Cmt3::readDataPacket ( Packet pack,
bool  acceptOther = false 
)

Retrieve a data message.

This function will attempt to read a data message from the open port or from the log file, depending on the system state. When acceptOther is set to true, the first received message will be returned. If a data message is successfully read, XRV_OK will be returned. If another message is read, XRV_OTHER will be returned and the received message will be placed in the Packet. Otherwise, an appropriate error will be returned.

Definition at line 1672 of file cmt3.cpp.

References CMT3EXITLOGDAT, CMT3LOGDAT, CMT_MID_ERROR, CMT_MID_MTDATA, fillRtc(), xsens::Message::getDataByte(), xsens::Message::getDataSize(), getDeviceId(), xsens::Message::getMessageId(), m_config, CmtDeviceConfiguration::_devInfo::m_deviceId, CmtDeviceConfiguration::m_deviceInfo, xsens::Packet::m_itemCount, m_lastHwError, m_lastHwErrorDeviceId, m_lastResult, m_logFile, m_logging, CmtDeviceConfiguration::m_masterDeviceId, xsens::Packet::m_msg, CmtDeviceConfiguration::m_numberOfDevices, CmtDeviceConfiguration::_devInfo::m_outputMode, CmtDeviceConfiguration::_devInfo::m_outputSettings, m_readFromFile, m_serial, xsens::Packet::m_toa, m_useRtc, xsens::Cmt2s::readMessage(), xsens::Cmt2f::readMessage(), xsens::Packet::setDataFormat(), xsens::Packet::setXbus(), xsens::timeStampNow(), xsens::Cmt2f::writeMessage(), XRV_OK, and XRV_OTHER.

Referenced by requestData().

◆ refreshCache()

XsensResultValue xsens::Cmt3::refreshCache ( const bool  file = false)

Update device information stored on host PC.

Some device information is cached on the host PC for faster access. The Cmt3 automatically tries to keep the cache up to date. But when unexpected things happen, such as custom messages that change the settings, or a power-cycle, then the user may need to tell Cmt3 to update its cache. When both a file and a port are open, the file parameter can be used to indicate what data source to read from (true is file, false is port).

Note
This function is only available in configuration mode.

Definition at line 2529 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MAX_DEVICES_PER_PORT, CMT_MID_CONFIGURATION, CMT_MID_REQCONFIGURATION, xsens::Message::getMessageStart(), gotoConfig(), xsens::Cmt2s::isOpen(), xsens::Cmt2f::isOpen(), m_config, m_eMtsData, m_lastResult, m_logFile, m_logging, m_measuring, CmtDeviceConfiguration::m_outputSkipFactor, m_period, CmtDeviceConfiguration::m_samplingPeriod, m_serial, m_skip, CmtDeviceConfiguration::readFromMessage(), xsens::Cmt2f::readMessage(), xsens::Message::setMessageId(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), XRV_NOFILEORPORTOPEN, and XRV_OK.

Referenced by openLogFile(), openPort(), and reset().

◆ requestData()

XsensResultValue xsens::Cmt3::requestData ( Packet pack)

◆ reset()

XsensResultValue xsens::Cmt3::reset ( void  )

Request a data message and wait for it to arrive.

This function is only useful when the skip factor is set to 0xFFFF. Reset all connected sensors.

Definition at line 1777 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_RESET, CMT_MID_RESETACK, m_lastResult, m_logFile, m_logging, m_measuring, m_serial, refreshCache(), xsens::Message::setBusId(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), and XRV_OK.

◆ resetLogFileReadPos()

XsensResultValue xsens::Cmt3::resetLogFileReadPos ( void  )

Restart reading from the start of the open log file.

This function resets the read position to the start of the open log file. Only the read position is affected, the write position remains the same.

See also
openLogFile

Definition at line 2854 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, m_lastResult, m_logFile, and xsens::Cmt2f::setReadPosition().

◆ resetOrientation()

XsensResultValue xsens::Cmt3::resetOrientation ( const CmtResetMethod  method,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Perform an orientation reset on a device.

This function performs an orientation reset. See the MT documentation for more information about Orientation resets.

Note
If you wish to save the setting to the device, perform the CMT_RESETORIENTATION_STORE operation while in Config mode after having performed the appropriate orientation reset in measurement mode.

Definition at line 1798 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_LEN_RESETORIENTATION, CMT_MID_RESETORIENTATION, deviceId, DO_DATA_SET, m_lastResult, and XRV_OK.

◆ restoreFactoryDefaults()

XsensResultValue xsens::Cmt3::restoreFactoryDefaults ( const CmtDeviceId  deviceId = CMT_DID_MASTER)

Restore the device to factory default settings.

Restore the factory defaults of a device.

This function completely restores the selected device to the default settings (115k2 baud rate, 100Hz sample frequency, factory defined scenarios).

Note
This function is only available in configuration mode.

Definition at line 1809 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_MID_RESTOREFACTORYDEF, deviceId, DO_DATA_REQUEST, m_lastResult, and XRV_OK.

◆ setBaudrate()

XsensResultValue xsens::Cmt3::setBaudrate ( const uint32_t  baudrate,
bool  reconnect = true 
)

Set the baudrate and possibly reconnect.

Use this function to change the baudrate of the device. This actually tries to change the baud rate of the current connection. When reconnect is set to true, the device receives a Reset message and the port is reopened at the new baudrate. Otherwise, make sure to perform a Reset manually, since the new baudrate will not be set until a Reset has been performed.

Note
To change the baudrate of the serial connection while connected via Bluetooth, use setSerialBaudrate.
See also
getBaudrate setSerialBaudrate getSerialBaudrate
Note
This function is only available in configuration mode.

Definition at line 1835 of file cmt3.cpp.

References closePort(), CMT3EXITLOG, CMT3LOG, CMT_BAUD_RATE_115K2, CMT_BAUD_RATE_19K2, CMT_BAUD_RATE_230K4, CMT_BAUD_RATE_38K4, CMT_BAUD_RATE_460K8, CMT_BAUD_RATE_57K6, CMT_BAUD_RATE_921K6, CMT_BAUD_RATE_9600, CMT_BAUDCODE_115K2, CMT_BAUDCODE_19K2, CMT_BAUDCODE_230K4, CMT_BAUDCODE_38K4, CMT_BAUDCODE_460K8, CMT_BAUDCODE_57K6, CMT_BAUDCODE_921K6, CMT_BAUDCODE_9K6, CMT_BID_MASTER, CMT_LEN_BAUDRATE, CMT_MID_REQBAUDRATE, CMT_MID_RESET, CMT_MID_RESETACK, DO_DATA_SET_BID, xsens::Cmt2s::getPortName(), xsens::Cmt2s::getPortNr(), gotoMeasurement(), m_baudrate, m_lastResult, m_logFile, m_logging, m_measuring, m_serial, openPort(), xsens::Message::setBusId(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), XRV_BAUDRATEINVALID, and XRV_OK.

◆ setBluetoothState()

XsensResultValue xsens::Cmt3::setBluetoothState ( const bool  enabled)

Set the Bluetooth state of the Xbus Master.

This function sets the state of the bluetooth communication to on or off.

Note
This function is only available in configuration mode.

Definition at line 1924 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_LEN_BTDISABLE, CMT_MID_REQBTDISABLE, DO_DATA_SET_BID, m_lastResult, and XRV_OK.

◆ setBusPowerState()

XsensResultValue xsens::Cmt3::setBusPowerState ( const bool  enabled)

Switch the Xbus Master bus power on or off.

Use this function to switch the Xbus Master Xbus power on or off.

Remarks
This function can be used to save a lot of power when not measuring, while still keeping a connection to the system. However, there is a relatively long startup time when restoring power as the sensors are reinitialized.
Note
You will need to perform an initBus and possibly a refreshCache call after switching the power back on with this function.
This function is only available in configuration mode.
See also
initBus refreshCache

Definition at line 1936 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_LEN_BUSPWR, CMT_MID_BUSPWR, DO_DATA_SET_BID, m_lastResult, and XRV_OK.

◆ setDataSource()

XsensResultValue xsens::Cmt3::setDataSource ( bool  readFromFile)

Set whether to read from comm port or file.

While it is not possible to open a port or file while the other is open, it is possible to create a log file while a port is open. In some rare cases it may be required to log data and read it back while the port remains open and then continue logging in the same file. This is not recommended. Instead, log to a file, close it and then open it in another Cmt3 object. However, if you must do this, then this function can be used to specify that you want to switch between reading from the log file (true) or port (false).

Definition at line 2811 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, xsens::Cmt2s::isOpen(), xsens::Cmt2f::isOpen(), m_lastResult, m_logFile, m_logging, m_readFromFile, m_serial, XRV_INVALIDOPERATION, XRV_NOFILEORPORTOPEN, and XRV_OK.

◆ setDeviceMode()

XsensResultValue xsens::Cmt3::setDeviceMode ( const CmtDeviceMode mode,
bool  force,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Set the complete output mode of a device.

This function updates the complete output mode of the specified device. It only updates values that are different than those reported by the device unless force is set to true. The function will automatically update only the part of the device mode that is relevant for the device. So it is possible to configure all devices, including an Xbus Master with the same mode (only the Xbus Master will update its period, while the Motion Trackers will update their output mode and settings).

Note
This function is only available in configuration mode.
See also
getDeviceMode getDeviceMode2 setDeviceMode2

Definition at line 1948 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, deviceId, CmtDeviceMode2::m_outputMode, CmtDeviceMode2::m_outputSettings, setDeviceMode2(), and CmtDeviceMode2::setSampleFrequency().

◆ setDeviceMode2()

XsensResultValue xsens::Cmt3::setDeviceMode2 ( const CmtDeviceMode2 mode,
bool  force,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Set the complete output mode2 of a device.

This function updates the complete output mode of the specified device. It only updates values that are different than those reported by the device unless force is set to true. The function will automatically update only the part of the device mode that is relevant for the device. So it is possible to configure all devices, including an Xbus Master with the same mode (only the Xbus Master will update its period, while the Motion Trackers will update their output mode and settings).

Note
This function is only available in configuration mode.
See also
getDeviceMode2 getDeviceMode setDeviceMode

Definition at line 1963 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_BROADCAST, CMT_BID_INVALID, CMT_BID_MASTER, CMT_DID_BROADCAST, CMT_DID_TYPEH_MASK, CMT_DID_TYPEH_XM, CMT_MID_REQOUTPUTMODE, CMT_MID_REQOUTPUTMODEACK, CMT_MID_REQOUTPUTSETTINGS, CMT_MID_REQOUTPUTSETTINGSACK, CMT_MID_REQOUTPUTSKIPFACTOR, CMT_MID_REQOUTPUTSKIPFACTORACK, CMT_MID_REQPERIOD, CMT_MID_REQPERIODACK, CMT_OUTPUTSETTINGS_TIMESTAMP_MASK, deviceId, getBusIdInternal(), HANDLE_ERR_RESULT, isXm(), m_config, CmtDeviceConfiguration::_devInfo::m_deviceId, CmtDeviceConfiguration::m_deviceInfo, m_lastResult, m_logFile, m_logging, CmtDeviceConfiguration::m_masterDeviceId, CmtDeviceConfiguration::m_numberOfDevices, CmtDeviceConfiguration::_devInfo::m_outputMode, CmtDeviceConfiguration::_devInfo::m_outputSettings, CmtDeviceConfiguration::m_outputSkipFactor, m_period, CmtDeviceConfiguration::m_samplingPeriod, m_serial, m_skip, xsens::Message::resizeData(), xsens::Message::setBusId(), xsens::Message::setDataLong(), xsens::Message::setDataShort(), xsens::Message::setMessageId(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), XRV_INVALIDID, and XRV_OK.

Referenced by setDeviceMode().

◆ setErrorMode()

XsensResultValue xsens::Cmt3::setErrorMode ( const uint16_t  mode)

Set the error mode of the device.

This function sets the error mode of the device. The error mode determines how the device handles errors. See the low-level communication documentation for more details.

Note
This function is only available in configuration mode.
See also
getErrorMode

Definition at line 2090 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_LEN_ERRORMODE, CMT_MID_REQERRORMODE, CMT_MID_REQXMERRORMODE, DO_DATA_SET_BID, isXm(), m_lastResult, and XRV_OK.

◆ setGotoConfigTries()

XsensResultValue xsens::Cmt3::setGotoConfigTries ( const uint16_t  tries)

Set the number of times the gotoConfig function will attempt a gotoConfig before failing.

This is especially useful when using RS485 communication or when for some reason the communication lines are not reliable.

Definition at line 2107 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, m_gotoConfigTries, m_lastResult, and XRV_OK.

Referenced by xsens::cmtScanPort().

◆ setGpsLeverArm()

XsensResultValue xsens::Cmt3::setGpsLeverArm ( const CmtVector arm,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Set the currently used GPS lever arm.

Use this function to set the vector currently used as the GPS lever arm. The GPS lever arm is the relative position of the GPS antenna to the MTi-G unit. The arm is specified in the object coordinate system and in meters. See the manual for more information on coordinate systems, alignment resets and the lever arm.

See also
getGpsLeverArm
Note
This function is only available in configuration mode.
This function is only available for MTi-G devices.

Definition at line 2972 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_BROADCAST, CMT_BID_INVALID, CMT_LEN_GPSLEVERARM, CMT_MID_ERROR, CMT_MID_SETGPSLEVERARM, CMT_MID_SETGPSLEVERARMACK, deviceId, getBusIdInternal(), xsens::Message::getDataByte(), xsens::Message::getDataSize(), getDeviceId(), xsens::Message::getMessageId(), m_config, CmtVector::m_data, m_lastHwError, m_lastHwErrorDeviceId, m_lastResult, m_logFile, m_logging, CmtDeviceConfiguration::m_masterDeviceId, m_serial, xsens::Message::setBusId(), xsens::Message::setDataFloat(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), XRV_INVALIDID, and XRV_OK.

◆ setGravityMagnitude()

XsensResultValue xsens::Cmt3::setGravityMagnitude ( const double  magnitude,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Set the currently used magnitude of the gravity vector.

The magnitude of the gravity vector is used to determine absolute acceleration from measured acceleration. Use this function to set tit to a custom value in m/s2. The default value of 9.812687357684514m/s2 should be fine for most places on earth, but in some cases the gravity may be drastically different from standard Earth gravity (eg. space, deep subterranean/submarine, polar regions, gravitational anomalies. See also http://www.abc.net.au/science/news/stories/s911917.htm and http://en.wikipedia.org/wiki/Earth%27s_gravity#Comparative_gravities_in_various_cities_around_the_world)

Note
Correct orientation output cannot be guaranteed when an incorrect value is supplied for the gravity. Changing this value is at your own risk.
See also
getGravityMagnitude
Remarks
In future versions, the MTi-G may be able to estimate the local gravity magnitude on its own.
Note
This function is only available in configuration mode.

Definition at line 2935 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_LEN_GRAVITYMAGNITUDE, CMT_MID_SETGRAVITYMAGNITUDE, deviceId, DO_DATA_SET, m_lastResult, and XRV_OK.

◆ setHeading()

XsensResultValue xsens::Cmt3::setHeading ( const double  heading,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Set the heading offset.

This function sets the heading offset in radians used by the device. The valid range is -pi to +pi. The heading offset is used as a final correction on the output orientation.

Note
This function is only available in configuration mode.
See also
getHeading getMagneticDeclination setMagneticDeclination

Definition at line 2118 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_LEN_HEADING, CMT_MID_REQHEADING, deviceId, DO_DATA_SET, m_lastResult, and XRV_OK.

◆ setLocationId()

XsensResultValue xsens::Cmt3::setLocationId ( uint16_t  locationId,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Set the location ID of a sensor.

This function sets the location ID stored in the device.

Note
This function is only available in configuration mode.
See also
getLocationId

Definition at line 2129 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_LEN_LOCATIONID, CMT_MID_REQLOCATIONID, deviceId, DO_DATA_SET, m_lastResult, and XRV_OK.

◆ setLogMode()

XsensResultValue xsens::Cmt3::setLogMode ( bool  active)

Set the logging mode.

This function sets the logging mode to enabled (true) or disabled (false). When enabled, all received messages are logged to the file.

Remarks
Some information that is cached on the host PC will generate faked messages in the log file. Eg. getConfiguration and some others.

Definition at line 2842 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, xsens::Cmt2f::isOpen(), m_lastResult, m_logFile, m_logging, m_readFromFile, XRV_NOFILEOPEN, and XRV_OK.

◆ setMagneticDeclination()

XsensResultValue xsens::Cmt3::setMagneticDeclination ( const double  declination,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Set the stored magnetic declination.

This function sets the stored local magnetic declination in radians. The valid range is -pi to +pi. The magnetic declination is used in the sensor fusion process to determine the output orientation.

Note
This function is only available in configuration mode.
See also
getHeading setHeading getMagneticDeclination

Definition at line 2140 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_LEN_MAGNETICDECLINATION, CMT_MID_SETMAGNETICDECLINATION, deviceId, DO_DATA_SET, m_lastResult, and XRV_OK.

◆ setScenario()

XsensResultValue xsens::Cmt3::setScenario ( const uint8_t  scenarioType,
const CmtDeviceId  deviceId = CMT_DID_MASTER 
)

Specify the scenario to use in the sensor.

This function specifies the scenario that the sensor should use for converting raw data into orientation and/or position data. This must be one of the scenarios in the list supplied by getAvailableScenarios.

See also
getAvailableScenarios getScenario
Note
This function is only available in configuration mode.

Definition at line 2915 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_LEN_SETSCENARIO, CMT_MID_SETSCENARIO, deviceId, DO_DATA_SET, m_lastResult, and XRV_OK.

◆ setSyncInMode()

XsensResultValue xsens::Cmt3::setSyncInMode ( const uint16_t  mode)

◆ setSyncInOffset()

XsensResultValue xsens::Cmt3::setSyncInOffset ( const uint32_t  offset)

◆ setSyncInSettings()

XsensResultValue xsens::Cmt3::setSyncInSettings ( const CmtSyncInSettings settings)

Set the inbound synchronization settings of an MT device.

This function sets the current inbound synchronization settings of the MT device (sync mode, skip factor and offset). This function does not work for Xbus Masters and should not be used for sensors connected to an Xbus Master.

Note
This function is only available in configuration mode.
See also
getSyncInSettings getSyncOutSettings setSyncOutSettings getSyncMode setSyncMode

Definition at line 2165 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQSYNCINSETTINGS, CMT_MID_REQSYNCINSETTINGSACK, CMT_PARAM_SYNCIN_MODE, CMT_PARAM_SYNCIN_OFFSET, CMT_PARAM_SYNCIN_SKIPFACTOR, CMT_SYNC_CLOCK_NS_TO_TICKS, HANDLE_ERR_RESULT, isXm(), m_lastResult, m_logFile, m_logging, CmtSyncInSettings::m_mode, CmtSyncInSettings::m_offset, m_serial, CmtSyncInSettings::m_skipFactor, xsens::Message::setBusId(), xsens::Message::setDataByte(), xsens::Message::setDataLong(), xsens::Message::setDataShort(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), XRV_INVALIDOPERATION, and XRV_OK.

◆ setSyncInSkipFactor()

XsensResultValue xsens::Cmt3::setSyncInSkipFactor ( const uint16_t  skipFactor)

Set the inbound synchronization skip factor of an MT device.

This function sets the current inbound synchronization skip factor of the MT device. This function does not work for Xbus Masters and should not be used for sensors connected to an Xbus Master.

See also
getSyncInSkipFactor setSyncInSettings getSyncInSettings getSyncInOffset setSyncInOffset getSyncOutSettings setSyncOutSettings getSyncMode setSyncMode

Definition at line 2243 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQSYNCINSETTINGS, CMT_MID_REQSYNCINSETTINGSACK, CMT_PARAM_SYNCIN_SKIPFACTOR, HANDLE_ERR_RESULT, isXm(), m_lastResult, m_logFile, m_logging, m_serial, xsens::Message::setBusId(), xsens::Message::setDataByte(), xsens::Message::setDataShort(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), XRV_INVALIDOPERATION, and XRV_OK.

◆ setSyncMode()

XsensResultValue xsens::Cmt3::setSyncMode ( const uint8_t  mode)

Set the sync mode of the Xbus Master.

This function sets the current synchronization mode used by the specified Xbus Master. This function is not valid for MT devices.

Note
This function is only available in configuration mode.
See also
getSyncMode getSyncInSettings setSyncInSettings getSyncOutSettings setSyncOutSettings

Definition at line 2302 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_LEN_SYNCMODE, CMT_MID_REQSYNCMODE, DO_DATA_SET_BID, isXm(), m_lastResult, XRV_INVALIDOPERATION, and XRV_OK.

◆ setSyncOutMode()

XsensResultValue xsens::Cmt3::setSyncOutMode ( const uint16_t  mode)

◆ setSyncOutOffset()

XsensResultValue xsens::Cmt3::setSyncOutOffset ( const uint32_t  offset)

◆ setSyncOutPulseWidth()

XsensResultValue xsens::Cmt3::setSyncOutPulseWidth ( const uint32_t  pulseWidth)

◆ setSyncOutSettings()

XsensResultValue xsens::Cmt3::setSyncOutSettings ( const CmtSyncOutSettings settings)

Set the outbound synchronization settings of an MT device.

This function sets the current outbound synchronization settings of the MT device (sync mode, skip factor, offset and pulse width). This function does not work for Xbus Masters and should not be used for sensors connected to an Xbus Master.

Note
This function is only available in configuration mode.
See also
setSyncOutSettings getSyncInSettings setSyncInSettings getSyncMode setSyncMode

Definition at line 2316 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_REQSYNCOUTSETTINGS, CMT_MID_REQSYNCOUTSETTINGSACK, CMT_PARAM_SYNCOUT_MODE, CMT_PARAM_SYNCOUT_OFFSET, CMT_PARAM_SYNCOUT_PULSEWIDTH, CMT_PARAM_SYNCOUT_SKIPFACTOR, CMT_SYNC_CLOCK_NS_TO_TICKS, HANDLE_ERR_RESULT, isXm(), m_lastResult, m_logFile, m_logging, CmtSyncOutSettings::m_mode, CmtSyncOutSettings::m_offset, CmtSyncOutSettings::m_pulseWidth, m_serial, CmtSyncOutSettings::m_skipFactor, xsens::Message::setBusId(), xsens::Message::setDataByte(), xsens::Message::setDataLong(), xsens::Message::setDataShort(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), XRV_INVALIDOPERATION, and XRV_OK.

◆ setSyncOutSkipFactor()

XsensResultValue xsens::Cmt3::setSyncOutSkipFactor ( const uint16_t  skipFactor)

◆ setTimeout()

XsensResultValue xsens::Cmt3::setTimeout ( const uint32_t  ms)
inline

Definition at line 176 of file cmt3.h.

References m_lastResult, m_serial, and xsens::Cmt2s::setTimeout().

◆ setTimeoutConfig()

XsensResultValue xsens::Cmt3::setTimeoutConfig ( const uint32_t  timeout = CMT3_DEFAULT_TIMEOUT_CONF)

Set the configuration mode timeout.

When in config mode, the system uses a different message timeout than in measurement mode, since configuration messages can take longer to process than measurement mode messages. This function can be used to set the config mode timeout in ms.

Note
This function is only available in configuration mode.
See also
getTimeoutConfig getTimeoutMeasurement setTimeoutMeasurement setTimeout

Definition at line 2490 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, m_lastResult, m_measuring, m_serial, m_timeoutConf, xsens::Cmt2s::setTimeout(), and XRV_OK.

Referenced by xsens::cmtScanPort().

◆ setTimeoutMeasurement()

XsensResultValue xsens::Cmt3::setTimeoutMeasurement ( const uint32_t  timeout = CMT3_DEFAULT_TIMEOUT_MEAS)

Set the measurement mode timeout.

When in measurement mode, the system uses a different message timeout than in config mode, since measurement mode messages should be faster to process than config mode messages. This function can be used to set the measurement mode timeout in ms.

Note
This function is only available in configuration mode.
See also
getTimeoutMeasurement getTimeoutConfig setTimeoutConfig setTimeout

Definition at line 2503 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, m_lastResult, m_measuring, m_serial, m_timeoutMeas, xsens::Cmt2s::setTimeout(), and XRV_OK.

◆ setXmOutputMode()

XsensResultValue xsens::Cmt3::setXmOutputMode ( const uint8_t  mode)

Set the dual-output mode of the XM.

This function sets the dual mode output mode of the Xbus Master. The dual output mode of the Xbus Master defines whether it will send data on the serial connection (at the same baud rate as the bluetooth connection) when it is connected via Bluetooth. When set to 0, the serial communication is disabled, data is sent over the serial bus.

Note
When dual-mode is enabled, the Xbus Master will NOT receive commands on the serial bus.
This function is only available in configuration mode.
See also
getXmDualOutputMode

Definition at line 2516 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_LEN_OPMODE, CMT_MID_REQOPMODE, DO_DATA_SET_BID, isXm(), m_lastResult, XRV_INVALIDOPERATION, and XRV_OK.

◆ setXmPowerOff()

XsensResultValue xsens::Cmt3::setXmPowerOff ( void  )

Switch the connected Xbus Master.

This function tell the connected Xbus Master to power down. This differs from setBusPowerState, because this function actually powers down the Xbus Master itself, while setBusPowerState only powers down the bus controlled by the Xbus Master. After This function is called, the Xbus Master must be manually switched on to make it operational again.

See also
setBusPowerState

Definition at line 2151 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_MASTER, CMT_MID_XMPWROFF, isXm(), m_lastResult, m_serial, xsens::Message::setBusId(), xsens::Cmt2s::writeMessage(), and XRV_INVALIDOPERATION.

◆ storeXkfState()

XsensResultValue xsens::Cmt3::storeXkfState ( const CmtDeviceId  deviceId = CMT_DID_MASTER)

Store important components of the XKF filter state to non-volatile memory.

This function allows you to store some critical components of the internal XKF filter state to non-volatile memory. The stored settings will be used to initialize the filter whenever the sensor is switched to Measurement mode.

Note
This function is only available in Config mode.

Definition at line 3007 of file cmt3.cpp.

References CMT3EXITLOG, CMT3LOG, CMT_BID_BROADCAST, CMT_BID_INVALID, CMT_LEN_STOREXKFSTATE, CMT_MID_ERROR, CMT_MID_STOREXKFSTATE, CMT_MID_STOREXKFSTATEACK, deviceId, getBusIdInternal(), xsens::Message::getDataByte(), xsens::Message::getDataSize(), getDeviceId(), xsens::Message::getMessageId(), m_config, m_lastHwError, m_lastHwErrorDeviceId, m_lastResult, m_logFile, m_logging, CmtDeviceConfiguration::m_masterDeviceId, m_serial, xsens::Message::setBusId(), xsens::Cmt2s::waitForMessage(), xsens::Cmt2s::writeMessage(), xsens::Cmt2f::writeMessage(), XRV_INVALIDID, and XRV_OK.

◆ waitForDataMessage()

XsensResultValue xsens::Cmt3::waitForDataMessage ( Packet pack)

◆ writeMessageToLogFile()

XsensResultValue xsens::Cmt3::writeMessageToLogFile ( const Message msg)

Member Data Documentation

◆ m_baudrate

uint32_t xsens::Cmt3::m_baudrate
protected

The baudrate that was last set to be used by the port.

Definition at line 48 of file cmt3.h.

Referenced by getBaudrate(), openPort(), and setBaudrate().

◆ m_config

CmtDeviceConfiguration xsens::Cmt3::m_config
protected

◆ m_detailedScan

bool xsens::Cmt3::m_detailedScan
protected

Automatically scan for device details during open. Default is true (recommended).

Definition at line 55 of file cmt3.h.

◆ m_eMtsData

void* xsens::Cmt3::m_eMtsData[CMT_MAX_DEVICES_PER_PORT]

Cached eMTS data.

Definition at line 64 of file cmt3.h.

Referenced by Cmt3(), getEMtsData(), refreshCache(), and ~Cmt3().

◆ m_firstItem

uint16_t xsens::Cmt3::m_firstItem
protected

The index of the first formatting item.

Definition at line 52 of file cmt3.h.

◆ m_gotoConfigTries

uint16_t xsens::Cmt3::m_gotoConfigTries
protected

The number of times a goto config is attempted before the function fails.

Definition at line 53 of file cmt3.h.

Referenced by Cmt3(), gotoConfig(), and setGotoConfigTries().

◆ m_lastHwError

XsensResultValue xsens::Cmt3::m_lastHwError
protected

Contains the last error reported by hardware.

Definition at line 59 of file cmt3.h.

Referenced by clearHwError(), getEMtsData(), getHwError(), gotoConfig(), readDataPacket(), setGpsLeverArm(), storeXkfState(), and waitForDataMessage().

◆ m_lastHwErrorDeviceId

CmtDeviceId xsens::Cmt3::m_lastHwErrorDeviceId
protected

Contains the Device ID of the device that caused the last hardware error.

Definition at line 60 of file cmt3.h.

Referenced by clearHwError(), getEMtsData(), getHwError(), gotoConfig(), readDataPacket(), setGpsLeverArm(), storeXkfState(), and waitForDataMessage().

◆ m_lastResult

XsensResultValue xsens::Cmt3::m_lastResult
mutableprotected

The last result of an operation.

Definition at line 51 of file cmt3.h.

Referenced by closeLogFile(), closePort(), Cmt3(), createLogFile(), getAvailableScenarios(), getBatteryLevel(), getBaudrate(), getBluetoothState(), getBusId(), getBusPowerState(), getConfiguration(), getDataLength(), getDeviceId(), getDeviceMode2(), getEMtsData(), getErrorMode(), getFirmwareRevision(), getGpsLeverArm(), getGpsStatus(), getGravityMagnitude(), getHeading(), getLastResult(), getLocationId(), getLogFileName(), getLogFileReadPosition(), getLogFileSize(), getMagneticDeclination(), getMtDeviceId(), getPortNr(), getProductCode(), getScenario(), getSerialBaudrate(), getSyncInMode(), getSyncInOffset(), getSyncInSettings(), getSyncInSkipFactor(), getSyncMode(), getSyncOutMode(), getSyncOutOffset(), getSyncOutPulseWidth(), getSyncOutSettings(), getSyncOutSkipFactor(), getUtcTime(), getXmOutputMode(), gotoConfig(), gotoMeasurement(), initBus(), openLogFile(), openPort(), peekLogMessageId(), readDataPacket(), refreshCache(), requestData(), reset(), resetLogFileReadPos(), resetOrientation(), restoreFactoryDefaults(), setBaudrate(), setBluetoothState(), setBusPowerState(), setDataSource(), setDeviceMode2(), setErrorMode(), setGotoConfigTries(), setGpsLeverArm(), setGravityMagnitude(), setHeading(), setLocationId(), setLogMode(), setMagneticDeclination(), setScenario(), setSyncInMode(), setSyncInOffset(), setSyncInSettings(), setSyncInSkipFactor(), setSyncMode(), setSyncOutMode(), setSyncOutOffset(), setSyncOutPulseWidth(), setSyncOutSettings(), setSyncOutSkipFactor(), setTimeout(), setTimeoutConfig(), setTimeoutMeasurement(), setXmOutputMode(), setXmPowerOff(), storeXkfState(), waitForDataMessage(), and writeMessageToLogFile().

◆ m_logFile

Cmt2f xsens::Cmt3::m_logFile
protected

◆ m_logging

bool xsens::Cmt3::m_logging
protected

◆ m_measuring

bool xsens::Cmt3::m_measuring
protected

Keeps track of whether the connected device is measuring or being configured.

Definition at line 54 of file cmt3.h.

Referenced by closePort(), Cmt3(), gotoConfig(), gotoMeasurement(), openPort(), refreshCache(), reset(), setBaudrate(), setTimeoutConfig(), and setTimeoutMeasurement().

◆ m_period

uint16_t xsens::Cmt3::m_period
protected

The sample period of the port.

Definition at line 43 of file cmt3.h.

Referenced by Cmt3(), fillRtc(), getDeviceMode2(), getSampleFrequency(), refreshCache(), and setDeviceMode2().

◆ m_readFromFile

bool xsens::Cmt3::m_readFromFile
protected

Indicates whether to read from the log file or from the serial port.

Definition at line 56 of file cmt3.h.

Referenced by closePort(), Cmt3(), getEMtsData(), openLogFile(), peekLogMessageId(), readDataPacket(), setDataSource(), and setLogMode().

◆ m_rtcCount

uint32_t xsens::Cmt3::m_rtcCount
protected

The long sample counter (normal counter wraps at 64k).

Definition at line 46 of file cmt3.h.

Referenced by fillRtc().

◆ m_rtcInitialized

bool xsens::Cmt3::m_rtcInitialized
protected

Indicates if the rtc is initialised or not.

Definition at line 57 of file cmt3.h.

Referenced by Cmt3(), fillRtc(), gotoMeasurement(), and openPort().

◆ m_rtcLastSc

CmtMtTimeStamp xsens::Cmt3::m_rtcLastSc
protected

The last received sample counter, used to determine wrap-around.

Definition at line 47 of file cmt3.h.

Referenced by fillRtc().

◆ m_rtcMsPerSample

double xsens::Cmt3::m_rtcMsPerSample
protected

ms per sample = 1000 / sample frequency.

Definition at line 41 of file cmt3.h.

Referenced by fillRtc().

◆ m_rtcStart

TimeStamp xsens::Cmt3::m_rtcStart
protected

The start of the RTC counter, the time of arrival of sample 0.

Definition at line 45 of file cmt3.h.

Referenced by fillRtc().

◆ m_serial

Cmt2s xsens::Cmt3::m_serial
protected

◆ m_skip

uint16_t xsens::Cmt3::m_skip
protected

The skip factor of the port.

Definition at line 44 of file cmt3.h.

Referenced by Cmt3(), fillRtc(), getDeviceMode2(), getSampleFrequency(), refreshCache(), and setDeviceMode2().

◆ m_timeoutConf

uint32_t xsens::Cmt3::m_timeoutConf
protected

The config mode timeout.

Definition at line 49 of file cmt3.h.

Referenced by Cmt3(), getTimeoutConfig(), gotoConfig(), openPort(), and setTimeoutConfig().

◆ m_timeoutMeas

uint32_t xsens::Cmt3::m_timeoutMeas
protected

The measurement mode timeout.

Definition at line 50 of file cmt3.h.

Referenced by Cmt3(), getTimeoutMeasurement(), gotoMeasurement(), openPort(), setTimeoutMeasurement(), and waitForDataMessage().

◆ m_useRtc

bool xsens::Cmt3::m_useRtc

Indicates if the RTC should be computed or not (to save CPU time).

Definition at line 63 of file cmt3.h.

Referenced by Cmt3(), readDataPacket(), and waitForDataMessage().




Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019