xsens_imu
Namespaces | Macros
cmt3.cpp File Reference
#include "cmt3.h"
#include <math.h>
#include "xsens_janitors.h"
#include "xsens_time.h"

Namespaces

 xsens
 The namespace of all Xsens software since 2006.
 

Macros

#define CMT3LOG(...)
 
#define CMT3EXITLOG
 
#define CMT3LOGDAT(...)
 
#define CMT3EXITLOGDAT
 
#define CMT3F_DEVINFO_SIZE   (sizeof(CmtDeviceId) + sizeof(CmtDataFormat))
 
#define DO_DATA_REQUEST_BID(req, bid)
 
#define DO_DATA_REQUEST(req)
 
#define DO_DATA_SET_BID(req, size, type, data, bid)
 
#define DO_DATA_SET(req, size, type, data)
 
#define HANDLE_ERR_RESULT
 
#define _XM_SMALL_PACKETS_EMTS   0
 

Macro Definition Documentation

#define _XM_SMALL_PACKETS_EMTS   0
#define CMT3EXITLOG
#define CMT3EXITLOGDAT
#define CMT3F_DEVINFO_SIZE   (sizeof(CmtDeviceId) + sizeof(CmtDataFormat))
#define CMT3LOG (   ...)
#define CMT3LOGDAT (   ...)
#define DO_DATA_REQUEST (   req)
Value:
uint8_t bid = getBusIdInternal(deviceId);\
#define DO_DATA_REQUEST_BID(req, bid)
Definition: cmt3.cpp:202
#define DO_DATA_REQUEST_BID (   req,
  bid 
)
Value:
Message snd(req,0);\
Message rcv;\
if (bid == CMT_BID_INVALID || bid == CMT_BID_BROADCAST)\
return (m_lastResult = XRV_INVALIDID);\
if (!m_readFromFile)\
{\
snd.setBusId(bid);\
m_serial.writeMessage(&snd);\
if ((m_lastResult = m_serial.waitForMessage(&rcv,req+1,0,true)) != XRV_OK)\
return m_lastResult;\
if (m_logging)\
m_logFile.writeMessage(&rcv);\
if (rcv.getMessageId() == CMT_MID_ERROR)\
{ m_lastHwErrorDeviceId = m_config.m_masterDeviceId;\
if (rcv.getDataSize() >= 2)\
{\
uint8_t biddy = rcv.getDataByte(1);\
getDeviceId(biddy,m_lastHwErrorDeviceId);\
}\
return m_lastResult = m_lastHwError = (XsensResultValue) rcv.getDataByte();\
}\
}\
else\
while (1)\
{\
if ((m_lastResult = m_logFile.readMessage(&rcv,req+1)) != XRV_OK)\
return m_lastResult;\
if (rcv.getBusId() == bid || (rcv.getBusId() == 1 && bid == CMT_BID_MASTER))\
break;\
}
XsensResultValue
Xsens return values.
Definition: xsens_std.h:43
264: Invalid id supplied
Definition: xsens_std.h:80
#define CMT_MID_ERROR
Definition: cmtdef.h:523
#define CMT_BID_BROADCAST
Definition: cmtdef.h:1233
#define CMT_BID_INVALID
Definition: cmtdef.h:1234
0: Operation was performed successfully
Definition: xsens_std.h:45
#define CMT_BID_MASTER
Definition: cmtdef.h:82
#define DO_DATA_SET (   req,
  size,
  type,
  data 
)
Value:
uint8_t bid = getBusIdInternal(deviceId);\
if (bid == CMT_BID_INVALID)\
return (m_lastResult = XRV_INVALIDID);\
DO_DATA_SET_BID(req,size,type,data,bid);
#define DO_DATA_SET_BID(req, size, type, data, bid)
Definition: cmt3.cpp:240
264: Invalid id supplied
Definition: xsens_std.h:80
#define CMT_BID_INVALID
Definition: cmtdef.h:1234
#define DO_DATA_SET_BID (   req,
  size,
  type,
  data,
  bid 
)
#define HANDLE_ERR_RESULT
Value:
if (rcv.getMessageId() == CMT_MID_ERROR)\
{\
m_lastHwErrorDeviceId = m_config.m_masterDeviceId;\
if (rcv.getDataSize() >= 2)\
{\
uint8_t biddy = rcv.getDataByte(1);\
getDeviceId(biddy,m_lastHwErrorDeviceId);\
}\
return m_lastResult = m_lastHwError = (XsensResultValue) rcv.getDataByte(0);\
}
XsensResultValue
Xsens return values.
Definition: xsens_std.h:43
#define CMT_MID_ERROR
Definition: cmtdef.h:523