25 #define XSMESSAGE_INITIALIZER \ 27 XSBYTEARRAY_INITIALIZER, 1, 0 \ 118 #define XS_PREAMBLE 0xFA 119 #define XS_EXTLENCODE 0xFF 121 #define XS_LEN_MSGHEADER 4 122 #define XS_LEN_MSGEXTHEADER 6 123 #define XS_LEN_MSGHEADERCS 5 124 #define XS_LEN_MSGEXTHEADERCS 7 125 #define XS_LEN_CHECKSUM 1 126 #define XS_LEN_UNSIGSHORT 2 127 #define XS_LEN_UNSIGINT 4 128 #define XS_LEN_FLOAT 4 131 #define XS_MAXDATALEN (8192 - XS_LEN_MSGEXTHEADERCS) 132 #define XS_MAXSHORTDATALEN 254 133 #define XS_MAXMSGLEN (XS_MAXDATALEN + XS_LEN_MSGEXTHEADERCS) 134 #define XS_MAXSHORTMSGLEN (XS_MAXSHORTDATALEN + XS_LEN_MSGHEADERCS) 135 #define XS_MAXGARBAGE (XS_MAXMSGLEN + 1) 141 #pragma pack(push, 1) 147 #define PACK_POST __attribute__((__packed__)) 334 const uint8_t* getMessageStart(
void)
const 341 XsSize getTotalMessageSize(
void)
const 359 return isChecksumOk();
465 XsSize numValues = 1)
const 468 this, outputSettings, dest,
offset, numValues);
493 this, outputSettings,
data,
offset, numValues);
513 XsSize numValues = 1)
const 516 this, dataIdentifier, dest,
offset, numValues);
527 double getDataFPValue(
541 this, dataIdentifier,
data,
offset, numValues);
560 if (
this == &other)
return true;
565 void updateChecksumPtr()
580 #define swapEndian16(src) (((src) >> 8) | ((src) << 8)) 581 #define swapEndian32(src) \ 582 (((src) >> 24) | (((src) >> 8) & 0xFF00) | (((src) << 8) & 0xFF0000) | \ 584 #define swapEndian64(src) \ 585 (((src >> 56) & 0xFFULL) | ((src >> 40) & 0xFF00ULL) | \ 586 ((src >> 24) & 0xFF0000ULL) | ((src >> 8) & 0xFF000000ULL) | \ 587 ((src << 8) & 0xFF00000000ULL) | ((src << 24) & 0xFF0000000000ULL) | \ 588 ((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)
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)