Main MRPT website > C++ reference for MRPT 1.5.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. If nothing is found, the function returns -1. Otherwise the index of the first character of the message is returned. 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_=NULL, time_t *secs_=NULL)
 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().

◆ 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 122 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().

◆ computeChecksum()

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

Compute the checksum of the given byte string.

Definition at line 756 of file cmtmessage.cpp.

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

◆ findValidMessage()

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

◆ getTimeOfDay()

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

A platform-independent clock.

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

Definition at line 29 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().

◆ 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 78 of file xsens_time.cpp.

References mrpt::system::sleep().

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

◆ timeStampNow()

TimeStamp xsens::timeStampNow ( void  )

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.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020