24 #define XSMESSAGE_INITIALIZER \ 26 XSBYTEARRAY_INITIALIZER, 1, 0 \ 114 #define XS_PREAMBLE 0xFA 115 #define XS_EXTLENCODE 0xFF 117 #define XS_LEN_MSGHEADER 4 118 #define XS_LEN_MSGEXTHEADER 6 119 #define XS_LEN_MSGHEADERCS 5 120 #define XS_LEN_MSGEXTHEADERCS 7 121 #define XS_LEN_CHECKSUM 1 122 #define XS_LEN_UNSIGSHORT 2 123 #define XS_LEN_UNSIGINT 4 124 #define XS_LEN_FLOAT 4 127 #define XS_MAXDATALEN (8192 - XS_LEN_MSGEXTHEADERCS) 128 #define XS_MAXSHORTDATALEN 254 129 #define XS_MAXMSGLEN (XS_MAXDATALEN + XS_LEN_MSGEXTHEADERCS) 130 #define XS_MAXSHORTMSGLEN (XS_MAXSHORTDATALEN + XS_LEN_MSGHEADERCS) 131 #define XS_MAXGARBAGE (XS_MAXMSGLEN + 1) 137 #pragma pack(push, 1) 143 #define PACK_POST __attribute__((__packed__)) 330 const uint8_t* getMessageStart(
void)
const 337 XsSize getTotalMessageSize(
void)
const 355 return isChecksumOk();
461 XsSize numValues = 1)
const 464 this, outputSettings, dest,
offset, numValues);
489 this, outputSettings,
data,
offset, numValues);
509 XsSize numValues = 1)
const 512 this, dataIdentifier, dest,
offset, numValues);
523 double getDataFPValue(
537 this, dataIdentifier,
data,
offset, numValues);
556 if (
this == &other)
return true;
561 void updateChecksumPtr()
576 #define swapEndian16(src) (((src) >> 8) | ((src) << 8)) 577 #define swapEndian32(src) \ 578 (((src) >> 24) | (((src) >> 8) & 0xFF00) | (((src) << 8) & 0xFF0000) | \ 580 #define swapEndian64(src) \ 581 (((src >> 56) & 0xFFULL) | ((src >> 40) & 0xFF00ULL) | \ 582 ((src >> 24) & 0xFF0000ULL) | ((src >> 8) & 0xFF000000ULL) | \ 583 ((src << 8) & 0xFF00000000ULL) | ((src << 24) & 0xFF0000000000ULL) | \ 584 ((src << 40) & 0xFF000000000000ULL) | ((src << 56))) XSTYPES_DLL_API int XsMessage_empty(XsMessage const *thisPtr)
XSTYPES_DLL_API double XsMessage_getDataFP1632(XsMessage const *thisPtr, XsSize offset)
GLuint GLuint GLsizei count
XSTYPES_DLL_API const uint8_t * XsMessage_constData(XsMessage const *thisPtr, XsSize offset)
XSTYPES_DLL_API XsSize XsMessage_getTotalMessageSize(XsMessage const *thisPtr)
XSTYPES_DLL_API void XsMessage_setMessageId(XsMessage *thisPtr, XsXbusMessageId msgId)
XSTYPES_DLL_API double XsMessage_getDataDouble(XsMessage const *thisPtr, XsSize offset)
EIGEN_STRONG_INLINE bool empty() const
XSTYPES_DLL_API uint32_t XsMessage_getDataLong(XsMessage const *thisPtr, XsSize offset)
unsigned __int16 uint16_t
XSTYPES_DLL_API void XsMessage_setBusId(XsMessage *thisPtr, uint8_t busId)
XSTYPES_DLL_API void XsMessage_setDataFPValuesById(XsMessage *thisPtr, XsDataIdentifier dataIdentifier, double const *data, XsSize offset, XsSize numValues)
XSTYPES_DLL_API XsMessageHeader * XsMessage_getHeader(XsMessage *)
XSTYPES_DLL_API void XsMessage_setDataFP1632(XsMessage *thisPtr, double value, XsSize offset)
XSTYPES_DLL_API void XsMessage_setDataByte(XsMessage *thisPtr, uint8_t value, XsSize offset)
XSTYPES_DLL_API const uint8_t * XsMessage_getMessageStart(XsMessage const *thisPtr)
struct XsByteArray XsByteArray
XSTYPES_DLL_API void XsMessage_setDataShort(XsMessage *thisPtr, uint16_t value, XsSize offset)
size_t XsSize
XsSize must be unsigned number!
XsDataIdentifier
Defines the data identifiers.
XSTYPES_DLL_API uint8_t XsMessage_getDataByte(XsMessage const *thisPtr, XsSize offset)
XSTYPES_DLL_API void XsMessage_deleteData(XsMessage *thisPtr, XsSize count, XsSize offset)
XSTYPES_DLL_API void XsMessage_getDataFPValuesById(XsMessage const *thisPtr, XsDataIdentifier dataIdentifier, double *dest, XsSize offset, XsSize numValues)
XSTYPES_DLL_API void XsMessage_setDataBuffer(XsMessage *thisPtr, const uint8_t *buffer, XsSize size, XsSize offset)
XSTYPES_DLL_API void XsMessage_destruct(XsMessage *thisPtr)
XSTYPES_DLL_API void XsMessage_setDataF1220(XsMessage *thisPtr, double value, XsSize offset)
XSTYPES_DLL_API int XsMessage_compare(XsMessage const *a, XsMessage const *b)
Structure for storing a single message.
XSTYPES_DLL_API void XsMessage_load(XsMessage *thisPtr, XsSize msgSize, unsigned char const *src)
XSTYPES_DLL_API double XsMessage_getDataF1220(XsMessage const *thisPtr, XsSize offset)
XSTYPES_DLL_API void XsMessage_copy(XsMessage *copy, XsMessage const *src)
XSTYPES_DLL_API const uint8_t * XsMessage_getDataBuffer(XsMessage const *thisPtr, XsSize offset)
XSTYPES_DLL_API const XsMessageHeader * XsMessage_getConstHeader(XsMessage const *thisPtr)
XSTYPES_DLL_API void XsMessage_swap(XsMessage *a, XsMessage *b)
XsXbusMessageId
Xsens Xbus Message Identifiers.
bool operator==(const mrpt::img::TCamera &a, const mrpt::img::TCamera &b)
XSTYPES_DLL_API uint8_t XsMessage_computeChecksum(XsMessage const *thisPtr)
unsigned __int64 uint64_t
XSTYPES_DLL_API void XsMessage_getDataFPValues(XsMessage const *thisPtr, uint64_t outputSettings, double *dest, XsSize offset, XsSize numValues)
XSTYPES_DLL_API XsSize XsMessage_dataSize(XsMessage const *thisPtr)
XSTYPES_DLL_API void XsMessage_constructSized(XsMessage *thisPtr, XsSize dataSize)
uint8_t *const m_checksum
XSTYPES_DLL_API void XsMessage_assign(XsMessage *thisPtr, XsSize dataSize)
XSTYPES_DLL_API void XsMessage_setDataFPValues(XsMessage *thisPtr, uint64_t outputSettings, double const *data, XsSize offset, XsSize numValues)
XSTYPES_DLL_API int XsMessage_isChecksumOk(XsMessage const *thisPtr)
XSTYPES_DLL_API float XsMessage_getDataFloat(XsMessage const *thisPtr, XsSize offset)
GLsizei GLsizei GLchar * source
XSTYPES_DLL_API void XsMessage_setDataFloat(XsMessage *thisPtr, float value, XsSize offset)
GLsizei const GLfloat * value
struct XsMessage XsMessage
XSTYPES_DLL_API void XsMessage_construct(XsMessage *thisPtr)
XSTYPES_DLL_API void XsMessage_resizeData(XsMessage *thisPtr, XsSize newSize)
unsigned __int32 uint32_t
GLsizei GLsizei GLenum GLenum const GLvoid * data
GLubyte GLubyte GLubyte a
XSTYPES_DLL_API void XsMessage_insertData(XsMessage *thisPtr, XsSize count, XsSize offset)
XSTYPES_DLL_API void XsMessage_setDataLong(XsMessage *thisPtr, uint32_t value, XsSize offset)
void clear()
Clear the contents of this container.
XSTYPES_DLL_API void XsMessage_setDataDouble(XsMessage *thisPtr, double value, XsSize offset)
XSTYPES_DLL_API void XsMessage_copyConstruct(XsMessage *thisPtr, XsMessage const *src)
XSTYPES_DLL_API uint16_t XsMessage_getDataShort(XsMessage const *thisPtr, XsSize offset)
XSTYPES_DLL_API void XsMessage_recomputeChecksum(XsMessage *thisPtr)