Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Typedefs | Functions | Variables
xsens Namespace Reference

Detailed Description

The namespace of all Xsens software since 2006.

Classes

class  Cmt1f
 The low-level file communication class. More...
 
class  Cmt1s
 The low-level serial communication class. More...
 
class  Cmt2f
 The mid-level file communication class. More...
 
class  Cmt2s
 Mid-level serial communication class. More...
 
class  Cmt3
 High-level communication class. More...
 
class  FifoQueue
 A FIFO queue with limited length (cyclic). More...
 
class  FifoQueueBasic
 A FIFO queue with limited length (cyclic). More...
 
class  IntList
 
union  Itypes
 
class  JanitorClassFunc
 Class function calling janitor class. More...
 
class  JanitorDelete
 Memory releasing janitor class. More...
 
class  JanitorDeleteArray
 Memory releasing janitor class. More...
 
class  JanitorFree
 Memory releasing janitor class. More...
 
class  JanitorFunc
 Function calling janitor class. More...
 
class  JanitorFuncStdCall
 Function calling janitor class. More...
 
class  JanitorLogFunc
 Log / printf-like function calling janitor class. More...
 
class  JanitorRestore
 Value restoring janitor class. More...
 
class  JanitorSet
 Value restoring janitor class. More...
 
class  List
 Dynamic list class. More...
 
class  Message
 Class for storing a single message. More...
 
struct  MessageHeader
 A message header. More...
 
class  Packet
 A structure containing MT data + timestamp and formatting information. More...
 

Typedefs

typedef uint64_t TimeStamp
 A real-time timestamp (ms) More...
 

Functions

int32_t findValidMessage (const uint8_t *buffer, const uint16_t bufferLength)
 Find a valid message in the given buffer. More...
 
uint8_t computeChecksum (const uint8_t *buffer, uint32_t length)
 Compute the checksum of the given byte string. More...
 
bool cmtScanPort (CmtPortInfo &portInfo, uint32_t baudrate=0, uint32_t singleScanTimeout=1000, uint32_t scanTries=1)
 Scan a single COM port for connected Xsens devices. More...
 
bool cmtScanPorts (List< CmtPortInfo > &ports, uint32_t baudrate=0, uint32_t singleScanTimeout=1000, uint32_t scanTries=1)
 Scan COM ports for connected Xsens devices. More...
 
uint32_t getTimeOfDay (tm *date_=nullptr, time_t *secs_=nullptr)
 A platform-independent clock. More...
 
void msleep (uint32_t ms)
 A platform-independent sleep routine. More...
 
TimeStamp timeStampNow (void)
 

Variables

bool abortScan = false
 Set to true from another thread to abort any scan currently in progress. More...
 

Typedef Documentation

◆ TimeStamp

A real-time timestamp (ms)

Definition at line 24 of file xsens_time.h.

Function Documentation

◆ cmtScanPort()

bool xsens::cmtScanPort ( CmtPortInfo portInfo,
uint32_t  baudrate = 0,
uint32_t  singleScanTimeout = 1000,
uint32_t  scanTries = 1 
)

Scan a single COM port for connected Xsens devices.

The cmtScanPort function will scan a single port for connected Xsens devices. If the baudrate parameter is 0 (default), it will try to connect at all supported baud rates, starting with the most common 115k2, 460k8 and 58k6. If the baudrate parameter is non-zero, only the specified baud rate is tried. Any detected devices are returned in the portInfo parameter.

Definition at line 60 of file cmtscan.cpp.

References abortScan, 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, xsens::Cmt3::getMasterId(), CmtPortInfo::m_baudrate, CmtPortInfo::m_deviceId, CmtPortInfo::m_portName, CmtPortInfo::m_portNr, xsens::Cmt3::openPort(), SCANLOG, xsens::Cmt3::setGotoConfigTries(), xsens::Cmt3::setTimeoutConfig(), XRV_CONFIGCHECKFAIL, XRV_OK, XRV_TIMEOUT, and XRV_TIMEOUTNODATA.

Referenced by cmtScanPorts().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cmtScanPorts()

bool xsens::cmtScanPorts ( List< CmtPortInfo > &  ports,
uint32_t  baudrate = 0,
uint32_t  singleScanTimeout = 1000,
uint32_t  scanTries = 1 
)

Scan COM ports for connected Xsens devices.

The cmtScanPorts function will scan registered Xsens USB converters and serial COM ports for connected Xsens devices. If the baudrate parameter is 0 (default), it will try to connect at all supported baud rates, starting with the most common 115k2, 460k8 and 58k6. If the baudrate parameter is non-zero, only the specified baudrate is tried. Any detected devices are returned in the ports list, which is sorted by port nr.

Definition at line 133 of file cmtscan.cpp.

References mrpt::system::os::_strnicmp(), abortScan, xsens::List< T >::append(), xsens::List< T >::clear(), CMT_BAUD_RATE_460K8, cmtScanPort(), xsens::List< T >::length(), CmtPortInfo::m_baudrate, CmtPortInfo::m_portName, CmtPortInfo::m_portNr, xsens::List< T >::remove(), xsens::List< T >::sortAscending(), and mrpt::system::os::sprintf().

Referenced by mrpt::hwdrivers::CIMUXSens::searchPortAndConnect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ computeChecksum()

uint8_t xsens::computeChecksum ( const uint8_t buffer,
uint32_t  length 
)

Compute the checksum of the given byte string.

Definition at line 789 of file cmtmessage.cpp.

Referenced by xsens::Message::calcChecksum().

Here is the caller graph for this function:

◆ findValidMessage()

int32_t xsens::findValidMessage ( const uint8_t buffer,
const uint16_t  bufferLength 
)

Find a valid message in the given buffer.

If nothing is found, the function returns -1. Otherwise the index of the first character of the message is returned.

Definition at line 45 of file cmt2.cpp.

References CMT_EXTLENCODE, CMT_LEN_MSGEXTHEADERCS, CMT_LEN_MSGHEADERCS, CMT_PREAMBLE, xsens::Message::isChecksumOk(), xsens::MessageHeader::m_datlen, xsens::MessageHeader::_mdl::m_extended, xsens::MessageHeader::_mdl::_mextd::_mlen::m_high, xsens::MessageHeader::m_length, xsens::MessageHeader::_mdl::_mextd::m_length, and xsens::MessageHeader::_mdl::_mextd::_mlen::m_low.

Referenced by xsens::Cmt2s::waitForMessage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTimeOfDay()

uint32_t xsens::getTimeOfDay ( tm *  date_ = nullptr,
time_t *  secs_ = nullptr 
)

A platform-independent clock.

The function returns the time of day in ms since midnight. If the date parameter is non-nullptr, corresponding the date is placed in the variable it points to.

Definition at line 34 of file xsens_time.cpp.

References XSENS_SEC_PER_DAY.

Referenced by timeStampNow(), UsbInterface::waitForData(), xsens::Cmt1s::waitForData(), xsens::Cmt3::waitForDataMessage(), and xsens::Cmt2s::waitForMessage().

Here is the caller graph for this function:

◆ msleep()

void xsens::msleep ( uint32_t  ms)

A platform-independent sleep routine.

Time is measured in ms. The function will not return until the specified number of ms have passed.

Definition at line 82 of file xsens_time.cpp.

Referenced by UsbInterface::closeUsb(), and xsens::Cmt3::gotoConfig().

Here is the caller graph for this function:

◆ timeStampNow()

TimeStamp xsens::timeStampNow ( void  )

Definition at line 101 of file xsens_time.cpp.

References getTimeOfDay().

Referenced by xsens::Cmt3::gotoConfig(), xsens::Cmt3::readDataPacket(), and xsens::Cmt3::waitForDataMessage().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ abortScan

bool xsens::abortScan = false

Set to true from another thread to abort any scan currently in progress.

Definition at line 58 of file cmtscan.cpp.

Referenced by cmtScanPort(), and cmtScanPorts().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019