CXsensMTiModule Class Reference

#include <RobotAPI/drivers/XsensIMU/IMU/Xsens/XsensMTiModule.h>

Public Member Functions

void calcChecksum (unsigned char *msgBuffer, const int msgBufferLength)
 
bool checkChecksum (const unsigned char *msgBuffer, const int msgBufferLength)
 
clock_t clockms ()
 
short close ()
 
 CXsensMTiModule ()
 
void escape (unsigned long function)
 
void flush ()
 
short getDeviceMode (unsigned short *numDevices=NULL)
 
short getFileSize (unsigned long &fileSize)
 
short getLastDeviceError ()
 
short getLastRetVal ()
 
short getMode (unsigned long &OutputMode, unsigned long &OutputSettings, unsigned short &dataLength, const unsigned char bid=BID_MASTER)
 
short getValue (const unsigned long valueSpec, float value[], const unsigned char data[], const unsigned char bid=BID_MT)
 
short getValue (const unsigned long valueSpec, unsigned short &value, const unsigned char data[], const unsigned char bid=BID_MT)
 
short getValue (const unsigned long valueSpec, unsigned short value[], const unsigned char data[], const unsigned char bid=BID_MT)
 
bool isFileOpen ()
 
bool isPortOpen ()
 
short openFile (const char *fileName, bool createAlways=false)
 
short openPort (const char *portName, const unsigned long baudrate=PBR_115K2, const unsigned long inqueueSize=4096, const unsigned long outqueueSize=1024)
 
short openPort (const int portNumber, const unsigned long baudrate=PBR_115K2, const unsigned long inqueueSize=4096, const unsigned long outqueueSize=1024)
 
int readData (unsigned char *msgBuffer, const int nBytesToRead)
 
short readDataMessage (unsigned char data[], short &dataLen)
 
short readMessage (unsigned char &mid, unsigned char data[], short &dataLen, unsigned char *bid=NULL)
 
short readMessageRaw (unsigned char *msgBuffer, short *msgBufferLength)
 
short reqSetting (const unsigned char mid, const unsigned char param, float &value, const unsigned char bid=BID_MASTER)
 
short reqSetting (const unsigned char mid, const unsigned char param, unsigned char data[], short &dataLen, const unsigned char bid=BID_MASTER)
 
short reqSetting (const unsigned char mid, const unsigned char param, unsigned long &value, const unsigned char bid=BID_MASTER)
 
short reqSetting (const unsigned char mid, float &value, const unsigned char bid=BID_MASTER)
 
short reqSetting (const unsigned char mid, unsigned char data[], short &dataLen, const unsigned char bid=BID_MASTER)
 
short reqSetting (const unsigned char mid, unsigned char dataIn[], short dataInLen, unsigned char dataOut[], short &dataOutLen, const unsigned char bid=BID_MASTER)
 
short reqSetting (const unsigned char mid, unsigned long &value, const unsigned char bid=BID_MASTER)
 
short setDeviceMode (unsigned long OutputMode, unsigned long OutputSettings, const unsigned char bid=BID_MASTER)
 
short setFilePos (long relPos, unsigned long moveMethod=FILEPOS_BEGIN)
 
short setMode (unsigned long OutputMode, unsigned long OutputSettings, const unsigned char bid=BID_MASTER)
 
void setPortQueueSize (const unsigned long inqueueSize=4096, const unsigned long outqueueSize=1024)
 
short setSetting (const unsigned char mid, const float value, const unsigned char bid=BID_MASTER)
 
short setSetting (const unsigned char mid, const unsigned char param, const float value, const bool store, const unsigned char bid=BID_MASTER)
 
short setSetting (const unsigned char mid, const unsigned char param, const float value, const unsigned char bid=BID_MASTER)
 
short setSetting (const unsigned char mid, const unsigned char param, const unsigned long value, const unsigned short valuelen, const unsigned char bid=BID_MASTER)
 
short setSetting (const unsigned char mid, const unsigned long value, const unsigned short valuelen, const unsigned char bid=BID_MASTER)
 
short setTimeOut (short timeOutMs)
 
short waitForMessage (const unsigned char mid, unsigned char data[]=NULL, short *dataLen=NULL, unsigned char *bid=NULL)
 
int writeData (const unsigned char *msgBuffer, const int nBytesToWrite)
 
short writeMessage (const unsigned char mid, const unsigned char data[], const unsigned short &dataLen, const unsigned char bid=BID_MASTER)
 
short writeMessage (const unsigned char mid, const unsigned long dataValue=0, const unsigned char dataValueLen=0, const unsigned char bid=BID_MASTER)
 
virtual ~CXsensMTiModule ()
 

Static Public Member Functions

static void swapEndian (const unsigned char input[], unsigned char output[], const int length)
 

Protected Attributes

clock_t m_clkEnd
 
short m_deviceError
 
bool m_fileOpen
 
int m_handle
 
int m_nTempBufferLen
 
bool m_portOpen
 
short m_retVal
 
unsigned long m_storedDataLength [MAXDEVICES+1]
 
unsigned long m_storedOutputMode [MAXDEVICES+1]
 
unsigned long m_storedOutputSettings [MAXDEVICES+1]
 
unsigned char m_tempBuffer [MAXMSGLEN]
 
short m_timeOut
 

Detailed Description

Definition at line 925 of file XsensMTiModule.h.

Constructor & Destructor Documentation

◆ CXsensMTiModule()

Definition at line 130 of file XsensMTiModule.cpp.

◆ ~CXsensMTiModule()

~CXsensMTiModule ( )
virtual

Definition at line 149 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ calcChecksum()

void calcChecksum ( unsigned char *  msgBuffer,
const int  msgBufferLength 
)

Definition at line 3145 of file XsensMTiModule.cpp.

+ Here is the caller graph for this function:

◆ checkChecksum()

bool checkChecksum ( const unsigned char *  msgBuffer,
const int  msgBufferLength 
)

Definition at line 3165 of file XsensMTiModule.cpp.

◆ clockms()

clock_t clockms ( )

Definition at line 165 of file XsensMTiModule.cpp.

+ Here is the caller graph for this function:

◆ close()

short close ( )

Definition at line 817 of file XsensMTiModule.cpp.

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

◆ escape()

void escape ( unsigned long  function)

Definition at line 706 of file XsensMTiModule.cpp.

◆ flush()

void flush ( )

Definition at line 682 of file XsensMTiModule.cpp.

+ Here is the caller graph for this function:

◆ getDeviceMode()

short getDeviceMode ( unsigned short *  numDevices = NULL)

Definition at line 2394 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ getFileSize()

short getFileSize ( unsigned long &  fileSize)

Definition at line 783 of file XsensMTiModule.cpp.

◆ getLastDeviceError()

short getLastDeviceError ( )

Definition at line 3059 of file XsensMTiModule.cpp.

◆ getLastRetVal()

short getLastRetVal ( )

Definition at line 3071 of file XsensMTiModule.cpp.

+ Here is the caller graph for this function:

◆ getMode()

short getMode ( unsigned long &  OutputMode,
unsigned long &  OutputSettings,
unsigned short &  dataLength,
const unsigned char  bid = BID_MASTER 
)

Definition at line 2606 of file XsensMTiModule.cpp.

◆ getValue() [1/3]

short getValue ( const unsigned long  valueSpec,
float  value[],
const unsigned char  data[],
const unsigned char  bid = BID_MT 
)

Definition at line 2905 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ getValue() [2/3]

short getValue ( const unsigned long  valueSpec,
unsigned short &  value,
const unsigned char  data[],
const unsigned char  bid = BID_MT 
)

Definition at line 2743 of file XsensMTiModule.cpp.

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

◆ getValue() [3/3]

short getValue ( const unsigned long  valueSpec,
unsigned short  value[],
const unsigned char  data[],
const unsigned char  bid = BID_MT 
)

Definition at line 2825 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ isFileOpen()

bool isFileOpen ( )

Definition at line 551 of file XsensMTiModule.cpp.

◆ isPortOpen()

bool isPortOpen ( )

Definition at line 541 of file XsensMTiModule.cpp.

◆ openFile()

short openFile ( const char *  fileName,
bool  createAlways = false 
)

Definition at line 490 of file XsensMTiModule.cpp.

◆ openPort() [1/2]

short openPort ( const char *  portName,
const unsigned long  baudrate = PBR_115K2,
const unsigned long  inqueueSize = 4096,
const unsigned long  outqueueSize = 1024 
)

Definition at line 346 of file XsensMTiModule.cpp.

◆ openPort() [2/2]

short openPort ( const int  portNumber,
const unsigned long  baudrate = PBR_115K2,
const unsigned long  inqueueSize = 4096,
const unsigned long  outqueueSize = 1024 
)

Definition at line 197 of file XsensMTiModule.cpp.

◆ readData()

int readData ( unsigned char *  msgBuffer,
const int  nBytesToRead 
)

Definition at line 568 of file XsensMTiModule.cpp.

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

◆ readDataMessage()

short readDataMessage ( unsigned char  data[],
short &  dataLen 
)

Definition at line 918 of file XsensMTiModule.cpp.

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

◆ readMessage()

short readMessage ( unsigned char &  mid,
unsigned char  data[],
short &  dataLen,
unsigned char *  bid = NULL 
)

Definition at line 869 of file XsensMTiModule.cpp.

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

◆ readMessageRaw()

short readMessageRaw ( unsigned char *  msgBuffer,
short *  msgBufferLength 
)

Definition at line 970 of file XsensMTiModule.cpp.

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

◆ reqSetting() [1/7]

short reqSetting ( const unsigned char  mid,
const unsigned char  param,
float value,
const unsigned char  bid = BID_MASTER 
)

Definition at line 1698 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ reqSetting() [2/7]

short reqSetting ( const unsigned char  mid,
const unsigned char  param,
unsigned char  data[],
short &  dataLen,
const unsigned char  bid = BID_MASTER 
)

Definition at line 1958 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ reqSetting() [3/7]

short reqSetting ( const unsigned char  mid,
const unsigned char  param,
unsigned long &  value,
const unsigned char  bid = BID_MASTER 
)

Definition at line 1546 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ reqSetting() [4/7]

short reqSetting ( const unsigned char  mid,
float value,
const unsigned char  bid = BID_MASTER 
)

Definition at line 1631 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ reqSetting() [5/7]

short reqSetting ( const unsigned char  mid,
unsigned char  data[],
short &  dataLen,
const unsigned char  bid = BID_MASTER 
)

Definition at line 1784 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ reqSetting() [6/7]

short reqSetting ( const unsigned char  mid,
unsigned char  dataIn[],
short  dataInLen,
unsigned char  dataOut[],
short &  dataOutLen,
const unsigned char  bid = BID_MASTER 
)

Definition at line 1864 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ reqSetting() [7/7]

short reqSetting ( const unsigned char  mid,
unsigned long &  value,
const unsigned char  bid = BID_MASTER 
)

Definition at line 1478 of file XsensMTiModule.cpp.

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

◆ setDeviceMode()

short setDeviceMode ( unsigned long  OutputMode,
unsigned long  OutputSettings,
const unsigned char  bid = BID_MASTER 
)

Definition at line 2529 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ setFilePos()

short setFilePos ( long  relPos,
unsigned long  moveMethod = FILEPOS_BEGIN 
)

Definition at line 746 of file XsensMTiModule.cpp.

+ Here is the caller graph for this function:

◆ setMode()

short setMode ( unsigned long  OutputMode,
unsigned long  OutputSettings,
const unsigned char  bid = BID_MASTER 
)

Definition at line 2629 of file XsensMTiModule.cpp.

◆ setPortQueueSize()

void setPortQueueSize ( const unsigned long  inqueueSize = 4096,
const unsigned long  outqueueSize = 1024 
)

Definition at line 719 of file XsensMTiModule.cpp.

◆ setSetting() [1/5]

short setSetting ( const unsigned char  mid,
const float  value,
const unsigned char  bid = BID_MASTER 
)

Definition at line 2182 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ setSetting() [2/5]

short setSetting ( const unsigned char  mid,
const unsigned char  param,
const float  value,
const bool  store,
const unsigned char  bid = BID_MASTER 
)

Definition at line 2318 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ setSetting() [3/5]

short setSetting ( const unsigned char  mid,
const unsigned char  param,
const float  value,
const unsigned char  bid = BID_MASTER 
)

Definition at line 2244 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ setSetting() [4/5]

short setSetting ( const unsigned char  mid,
const unsigned char  param,
const unsigned long  value,
const unsigned short  valuelen,
const unsigned char  bid = BID_MASTER 
)

Definition at line 2111 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ setSetting() [5/5]

short setSetting ( const unsigned char  mid,
const unsigned long  value,
const unsigned short  valuelen,
const unsigned char  bid = BID_MASTER 
)

Definition at line 2047 of file XsensMTiModule.cpp.

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

◆ setTimeOut()

short setTimeOut ( short  timeOutMs)

Definition at line 3084 of file XsensMTiModule.cpp.

◆ swapEndian()

void swapEndian ( const unsigned char  input[],
unsigned char  output[],
const int  length 
)
static

Definition at line 3110 of file XsensMTiModule.cpp.

+ Here is the caller graph for this function:

◆ waitForMessage()

short waitForMessage ( const unsigned char  mid,
unsigned char  data[] = NULL,
short *  dataLen = NULL,
unsigned char *  bid = NULL 
)

Definition at line 1396 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ writeData()

int writeData ( const unsigned char *  msgBuffer,
const int  nBytesToWrite 
)

Definition at line 658 of file XsensMTiModule.cpp.

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

◆ writeMessage() [1/2]

short writeMessage ( const unsigned char  mid,
const unsigned char  data[],
const unsigned short &  dataLen,
const unsigned char  bid = BID_MASTER 
)

Definition at line 1291 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

◆ writeMessage() [2/2]

short writeMessage ( const unsigned char  mid,
const unsigned long  dataValue = 0,
const unsigned char  dataValueLen = 0,
const unsigned char  bid = BID_MASTER 
)

Definition at line 1195 of file XsensMTiModule.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_clkEnd

clock_t m_clkEnd
protected

Definition at line 998 of file XsensMTiModule.h.

◆ m_deviceError

short m_deviceError
protected

Definition at line 995 of file XsensMTiModule.h.

◆ m_fileOpen

bool m_fileOpen
protected

Definition at line 994 of file XsensMTiModule.h.

◆ m_handle

int m_handle
protected

Definition at line 991 of file XsensMTiModule.h.

◆ m_nTempBufferLen

int m_nTempBufferLen
protected

Definition at line 1007 of file XsensMTiModule.h.

◆ m_portOpen

bool m_portOpen
protected

Definition at line 993 of file XsensMTiModule.h.

◆ m_retVal

short m_retVal
protected

Definition at line 996 of file XsensMTiModule.h.

◆ m_storedDataLength

unsigned long m_storedDataLength[MAXDEVICES+1]
protected

Definition at line 1003 of file XsensMTiModule.h.

◆ m_storedOutputMode

unsigned long m_storedOutputMode[MAXDEVICES+1]
protected

Definition at line 1001 of file XsensMTiModule.h.

◆ m_storedOutputSettings

unsigned long m_storedOutputSettings[MAXDEVICES+1]
protected

Definition at line 1002 of file XsensMTiModule.h.

◆ m_tempBuffer

unsigned char m_tempBuffer[MAXMSGLEN]
protected

Definition at line 1006 of file XsensMTiModule.h.

◆ m_timeOut

short m_timeOut
protected

Definition at line 997 of file XsensMTiModule.h.


The documentation for this class was generated from the following files: