Main MRPT website > C++ reference for MRPT 1.9.9
xsmessage.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef XSMESSAGE_H
10 #define XSMESSAGE_H
11 
12 #include "xstypesconfig.h"
13 #include "pstdint.h"
14 #include "xsbytearray.h"
15 #include "xsdataidentifier.h"
16 #include "xsxbusmessageid.h"
17 
18 struct XsMessage;
19 struct XsMessageHeader;
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #else
24 #define XSMESSAGE_INITIALIZER \
25  { \
26  XSBYTEARRAY_INITIALIZER, 1, 0 \
27  }
28 typedef struct XsMessage XsMessage;
30 #endif
31 
34  XsMessage* thisPtr, XsSize dataSize);
36  XsMessage* thisPtr, XsMessage const* src);
37 XSTYPES_DLL_API void XsMessage_assign(XsMessage* thisPtr, XsSize dataSize);
39  XsMessage* thisPtr, XsSize msgSize, unsigned char const* src);
45  XsMessage const* thisPtr, XsSize offset);
47  XsMessage const* thisPtr);
56  XsMessage const* thisPtr, XsSize offset);
58  XsMessage const* thisPtr, XsSize offset);
60  XsMessage const* thisPtr, XsSize offset);
62  XsMessage const* thisPtr, XsSize offset);
64  XsMessage const* thisPtr, XsSize offset);
66  XsMessage* thisPtr, uint8_t value, XsSize offset);
68  XsMessage* thisPtr, uint16_t value, XsSize offset);
70  XsMessage* thisPtr, uint32_t value, XsSize offset);
72  XsMessage* thisPtr, float value, XsSize offset);
74  XsMessage* thisPtr, double value, XsSize offset);
76  XsMessage* thisPtr, double value, XsSize offset);
78  XsMessage* thisPtr, double value, XsSize offset);
80  XsMessage* thisPtr, const uint8_t* buffer, XsSize size, XsSize offset);
86  XsMessage const* thisPtr);
87 XSTYPES_DLL_API int XsMessage_empty(XsMessage const* thisPtr);
91  XsMessage* thisPtr, XsXbusMessageId msgId);
93  XsMessage* thisPtr, XsSize count, XsSize offset);
95  XsMessage* thisPtr, XsSize count, XsSize offset);
97  XsMessage const* thisPtr, uint64_t outputSettings, double* dest,
98  XsSize offset, XsSize numValues);
100  XsMessage* thisPtr, uint64_t outputSettings, double const* data,
101  XsSize offset, XsSize numValues);
103  XsMessage const* thisPtr, XsDataIdentifier dataIdentifier, double* dest,
104  XsSize offset, XsSize numValues);
106  XsMessage* thisPtr, XsDataIdentifier dataIdentifier, double const* data,
107  XsSize offset, XsSize numValues);
109 
110 #ifdef __cplusplus
111 } // extern "C"
112 #endif
113 
114 #define XS_PREAMBLE 0xFA
115 #define XS_EXTLENCODE 0xFF
116 
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
125 
126 // Maximum message/data length
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)
132 
133 //////////////////////////////////////////////////////////////////////////////////////////
134 // different alignment commands for gcc / MSVS, the structure needs to be 1-byte
135 // aligned.
136 #ifdef _MSC_VER
137 #pragma pack(push, 1)
138 #ifndef PACK_POST
139 #define PACK_POST
140 #endif
141 #else
142 #ifndef PACK_POST
143 #define PACK_POST __attribute__((__packed__))
144 #endif
145 #endif
146 /*! \brief A message header
147  \details This structure is used to interpret the header of a message.
148 */
150 {
151  /** \brief The message preamble (always 0xFA) */
153  /** \brief The bus ID \sa XS_BID_MASTER XS_BID_BROADCAST XS_BID_MT */
155  /** \brief The message ID \sa XsXbusMessageId */
157  /** \brief The length of the message \details A length of 255 means extended
158  * length is used */
160  // lint --e{18}
161  //! \brief Contains optional extended length of message and first byte of
162  //! data buffer
163  union LengthData {
164  //! \brief Contains extended length information and first byte of data
165  //! buffer if normal length is 255
167  {
168  //! \brief The high and low byte of the extended length
170  {
171  /** \brief High byte of extended length */
173  /** \brief Low byte of extended length */
175  /** \brief Extended length, only valid if normal length is 255
176  */
177  } m_length;
178  /** \brief The first byte of the data buffer, the data buffer is
179  * always at least 1 byte since it has to contain the checksum, but
180  * it can be bigger. */
182  /** \brief The extended length, only valid if normal length is 255
183  */
184  } m_extended;
185  /** \brief The first byte of the data buffer if length < 255, the data
186  * buffer is always at least 1 byte since it has to contain the
187  * checksum, but it can be bigger. */
189  /** \brief Data or length and data */
190  } m_datlen;
191 } PACK_POST; // lint !e659
192 #ifdef _MSC_VER
193 #pragma pack(pop)
194 #endif
195 
196 //////////////////////////////////////////////////////////////////////////////////////////
197 //! \brief Structure for storing a single message.
198 struct XsMessage
199 {
200 #ifdef __cplusplus
201  /*! \brief Create a XsMessage object with the given data length and message
202  Id.
203 
204  The function allocates enough memory to hold an entire message with the
205  given
206  data length.
207  \param msgId The message Id that will be assigned to the
208  m_messageId field.
209  \param dataLength The length of the data in the message.
210  */
211  explicit XsMessage(
212  XsXbusMessageId msgId = XMID_InvalidMessage, XsSize dataLength = 0)
214  {
215  XsMessage_constructSized(this, dataLength);
216  XsMessage_setMessageId(this, msgId);
217  }
218 
219  /*! \brief Create a message from the given source string
220 
221  This is done through a simple memory copy. The number of bytes copied is
222  taken
223  from the data in the message (so the message is interpreted first).
224  Note that this does NOT recompute the checksum, nor is it checked.
225 
226  \param source The source string containing message data
227  \param size The size of the source string
228  */
231  {
232  XsMessage_load(this, size, source);
233  }
234 
235  //! \brief Copy constructor
236  XsMessage(const XsMessage& src)
237  : m_message(src.m_message),
238  m_autoUpdateChecksum(src.m_autoUpdateChecksum),
239  m_checksum(0)
240  {
241  updateChecksumPtr();
242  }
243 
244  //! Destroy the message
245  ~XsMessage() { XsMessage_destruct(this); }
246  //! \brief Clear all data in the message
247  void clear(void) { XsMessage_destruct(this); }
248  /*! \brief Test if this message is empty
249 
250  \returns true if this message is empty, false otherwise
251  */
252  bool empty(void) const { return 0 != XsMessage_empty(this); }
253  //! Return the busId header field.
254  uint8_t getBusId(void) const
255  {
256  const XsMessageHeader* hdr = XsMessage_getConstHeader(this);
257  if (!hdr) return 0;
258  return hdr->m_busId;
259  }
260 
261  /*! \copydoc XsMessage_constData
262  */
263  const uint8_t* getDataBuffer(XsSize offset = 0) const
264  {
265  return XsMessage_constData(this, offset);
266  }
267 
268  /*! \copydoc XsMessage_getDataByte
269  */
270  uint8_t getDataByte(XsSize offset = 0) const
271  {
272  return XsMessage_getDataByte(this, offset);
273  }
274 
275  /*! \copydoc XsMessage_getDataDouble
276  */
277  double getDataDouble(XsSize offset = 0) const
278  {
279  return XsMessage_getDataDouble(this, offset);
280  }
281 
282  /*! \copydoc XsMessage_getDataFloat
283  */
284  float getDataFloat(XsSize offset = 0) const
285  {
286  return XsMessage_getDataFloat(this, offset);
287  }
288 
289  /*! \copydoc XsMessage_getDataF1220
290  */
291  double getDataF1220(XsSize offset = 0) const
292  {
293  return XsMessage_getDataF1220(this, offset);
294  }
295 
296  /*! \copydoc XsMessage_getDataFP1632
297  */
298  double getDataFP1632(XsSize offset = 0) const
299  {
300  return XsMessage_getDataFP1632(this, offset);
301  }
302 
303  /*! \copydoc XsMessage_getDataLong
304  */
305  uint32_t getDataLong(XsSize offset = 0) const
306  {
307  return XsMessage_getDataLong(this, offset);
308  }
309 
310  /*! \copydoc XsMessage_getDataShort
311  */
312  uint16_t getDataShort(XsSize offset = 0) const
313  {
314  return XsMessage_getDataShort(this, offset);
315  }
316 
317  /*! \copydoc XsMessage_dataSize
318  */
319  XsSize getDataSize(void) const { return XsMessage_dataSize(this); }
320  //! Return the current value of the m_messageId field.
321  XsXbusMessageId getMessageId(void) const
322  {
323  const XsMessageHeader* hdr = XsMessage_getConstHeader(this);
324  if (!hdr) return XMID_InvalidMessage;
325  return (XsXbusMessageId)hdr->m_messageId;
326  }
327 
328  /*! \copydoc XsMessage_getMessageStart
329  */
330  const uint8_t* getMessageStart(void) const
331  {
332  return XsMessage_getMessageStart(this);
333  }
334 
335  /*! \copydoc XsMessage_getTotalMessageSize
336  */
337  XsSize getTotalMessageSize(void) const
338  {
339  return XsMessage_getTotalMessageSize(this);
340  }
341 
342  /*! \copydoc XsMessage_isChecksumOk
343  */
344  bool isChecksumOk(void) const { return 0 != XsMessage_isChecksumOk(this); }
345  /*! \brief Initialize the %XsMessage with the data from \a src
346 
347  \param msgSize the size of the data pointed to by src
348  \param src the data to load the message from
349 
350  \returns true if the checksum of the loaded message is OK.
351  */
352  bool loadFromString(const uint8_t* src, XsSize msgSize)
353  {
354  XsMessage_load(this, msgSize, src);
355  return isChecksumOk();
356  }
357 
358  /*! \copydoc XsMessage_recomputeChecksum
359  */
360  void recomputeChecksum(void) { XsMessage_recomputeChecksum(this); }
361  /*! \copydoc XsMessage_resizeData
362  */
363  void resizeData(XsSize newSize) { XsMessage_resizeData(this, newSize); }
364  /*! \copydoc XsMessage_setBusId
365  */
366  void setBusId(uint8_t busId) { XsMessage_setBusId(this, busId); }
367  /*! \copydoc XsMessage_setDataBuffer
368  */
369  void setDataBuffer(const uint8_t* buffer, XsSize size, XsSize offset = 0)
370  {
372  }
373 
374  /*! \copydoc XsMessage_setDataByte
375  */
376  void setDataByte(const uint8_t value, XsSize offset = 0)
377  {
379  }
380 
381  /*! \copydoc XsMessage_setDataDouble
382  */
383  void setDataDouble(const double value, XsSize offset = 0)
384  {
386  }
387 
388  /*! \copydoc XsMessage_setDataFloat
389  */
390  void setDataFloat(const float value, XsSize offset = 0)
391  {
393  }
394 
395  /*! \copydoc XsMessage_setDataF1220
396  */
397  void setDataF1220(const double value, XsSize offset = 0)
398  {
400  }
401 
402  /*! \copydoc XsMessage_setDataFP1632
403  */
404  void setDataFP1632(const double value, XsSize offset = 0)
405  {
407  }
408 
409  // void setDataFPValue(const uint64_t outputSettings, const double data,
410  // const XsSize offset = 0);
411  // void setDataFPValue(const uint64_t outputSettings, const double *data,
412  // XsSize offset, const uint16_t numValues);
413  // void setDataFPValue(const XsDataIdentifier dataIdentifier, const double
414  // data, const XsSize offset = 0);
415  // void setDataFPValue(const XsDataIdentifier dataIdentifier, const double
416  // *data, XsSize offset, const uint16_t numValues);
417 
418  /*! \copydoc XsMessage_setDataLong
419  */
420  void setDataLong(const uint32_t value, XsSize offset = 0)
421  {
423  }
424 
425  /*! \copydoc XsMessage_setDataShort
426  */
427  void setDataShort(const uint16_t value, XsSize offset = 0)
428  {
430  }
431 
432  /*! \copydoc XsMessage_setMessageId
433  */
434  void setMessageId(const XsXbusMessageId msgId)
435  {
436  XsMessage_setMessageId(this, msgId);
437  }
438 
439  //! Copy message src into this
440  XsMessage& operator=(const XsMessage& src)
441  {
442  if (this != &src) XsMessage_copy(this, &src);
443  return *this;
444  }
445 
446  /*! \copydoc XsMessage_deleteData */
447  void deleteData(XsSize count, XsSize offset = 0)
448  {
450  }
451 
452  /*! \copydoc XsMessage_insertData */
453  void insertData(XsSize count, XsSize offset = 0)
454  {
456  }
457 
458  /*! \copydoc XsMessage_getDataFPValues */
459  void getDataFPValue(
460  uint64_t outputSettings, double* dest, XsSize offset = 0,
461  XsSize numValues = 1) const
462  {
464  this, outputSettings, dest, offset, numValues);
465  }
466 
467  /*! \brief Return current data value as a double(64 bits), after converting
468  it from float, double, FP1632 or FP1220 depending on outputSettings
469 
470  \param outputSettings the output settings containing the current
471  floating/fixed point settings
472  \param offset the offset in the message payload at which to start reading
473 
474  \returns the double precision representation of the value at \a offset
475  */
476  double getDataFPValue(uint64_t outputSettings, XsSize offset = 0) const
477  {
478  double tmp;
479  XsMessage_getDataFPValues(this, outputSettings, &tmp, offset, 1);
480  return tmp;
481  }
482 
483  /*! \copydoc XsMessage_setDataFPValues */
484  void setDataFPValue(
485  uint64_t outputSettings, const double* data, XsSize offset = 0,
486  XsSize numValues = 1)
487  {
489  this, outputSettings, data, offset, numValues);
490  }
491 
492  /*! \brief Write a floating/fixed point value into to the data buffer,
493  conversion depends on outputSettings
494 
495  \param outputSettings MT output settings
496  \param data The data array to be written to the buffer.
497  \param offset Offset in the data buffer from where to start writing.
498 
499  \sa setDataFPValue(uint64_t, const double *, XsSize, XsSize)
500  */
501  void setDataFPValue(uint64_t outputSettings, double data, XsSize offset = 0)
502  {
503  XsMessage_setDataFPValues(this, outputSettings, &data, offset, 1);
504  }
505 
506  /*! \copydoc XsMessage_getDataFPValuesById */
507  void getDataFPValue(
508  XsDataIdentifier dataIdentifier, double* dest, XsSize offset = 0,
509  XsSize numValues = 1) const
510  {
512  this, dataIdentifier, dest, offset, numValues);
513  }
514 
515  /*! \brief Return current data values as double, conversion depends on
516  outputSetting
517 
518  \param dataIdentifier Data identifier containing data precision
519  \param offset offset in the data buffer from where to start reading.
520 
521  \returns the current data value as double
522  */
523  double getDataFPValue(
524  XsDataIdentifier dataIdentifier, XsSize offset = 0) const
525  {
526  double tmp;
527  XsMessage_getDataFPValuesById(this, dataIdentifier, &tmp, offset, 1);
528  return tmp;
529  }
530 
531  /*! \copydoc XsMessage_setDataFPValuesById */
532  void setDataFPValue(
533  XsDataIdentifier dataIdentifier, const double* data, XsSize offset = 0,
534  XsSize numValues = 1)
535  {
537  this, dataIdentifier, data, offset, numValues);
538  }
539 
540  /*! \brief Write a floating/fixed point value into to the data buffer,
541  conversion depends on outputSettings
542 
543  \param dataIdentifier Data Identifier
544  \param data The data array to be written to the buffer.
545  \param offset Offset in the data buffer from where to start writing.
546  */
547  void setDataFPValue(
548  XsDataIdentifier dataIdentifier, double data, XsSize offset = 0)
549  {
550  XsMessage_setDataFPValuesById(this, dataIdentifier, &data, offset, 1);
551  }
552 
553  /*! \brief Return true if \a other is identical to this */
554  inline bool operator==(const XsMessage& other) const
555  {
556  if (this == &other) return true;
557  return m_message == other.m_message;
558  }
559 
560  private:
561  void updateChecksumPtr()
562  {
563  *((uint8_t**)&m_checksum) =
565  }
566 
567 #endif
568 
571  uint8_t* const m_checksum; //! Points to the checksum to speed up automatic
572  //! checksum updates
573 };
574 
575 // some macros to help when constructing/parsing messages
576 #define swapEndian16(src) (((src) >> 8) | ((src) << 8))
577 #define swapEndian32(src) \
578  (((src) >> 24) | (((src) >> 8) & 0xFF00) | (((src) << 8) & 0xFF0000) | \
579  ((src) << 24))
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)))
585 
586 #endif // file guard
XsMessageHeader::m_messageId
uint8_t m_messageId
The message ID.
Definition: xsmessage.h:156
XsMessage_recomputeChecksum
XSTYPES_DLL_API void XsMessage_recomputeChecksum(XsMessage *thisPtr)
XsMessageHeader::LengthData
Contains optional extended length of message and first byte of data buffer.
Definition: xsmessage.h:163
XsMessage::m_message
XsByteArray m_message
Definition: xsmessage.h:569
XsMessageHeader::m_busId
uint8_t m_busId
The bus ID.
Definition: xsmessage.h:154
mrpt::containers::clear
void clear()
Clear the contents of this container.
Definition: ts_hash_map.h:188
XsMessage
struct XsMessage XsMessage
Definition: xsmessage.h:28
XsMessage_getHeader
XSTYPES_DLL_API XsMessageHeader * XsMessage_getHeader(XsMessage *)
XsMessage_getDataLong
XSTYPES_DLL_API uint32_t XsMessage_getDataLong(XsMessage const *thisPtr, XsSize offset)
XsByteArray
struct XsByteArray XsByteArray
Definition: xsbytearray.h:25
XMID_InvalidMessage
@ XMID_InvalidMessage
Definition: xsxbusmessageid.h:19
XsMessage_construct
XSTYPES_DLL_API void XsMessage_construct(XsMessage *thisPtr)
uint16_t
unsigned __int16 uint16_t
Definition: rptypes.h:44
src
GLuint src
Definition: glext.h:7278
XsMessage::m_autoUpdateChecksum
int m_autoUpdateChecksum
Definition: xsmessage.h:570
XsMessage_getDataShort
XSTYPES_DLL_API uint16_t XsMessage_getDataShort(XsMessage const *thisPtr, XsSize offset)
XsMessage_copyConstruct
XSTYPES_DLL_API void XsMessage_copyConstruct(XsMessage *thisPtr, XsMessage const *src)
XsMessageHeader::LengthData::m_data
uint8_t m_data[1]
The first byte of the data buffer if length < 255, the data buffer is always at least 1 byte since it...
Definition: xsmessage.h:188
XsMessageHeader::LengthData::ExtendedLength::ExtendedParts::m_low
uint8_t m_low
Low byte of extended length.
Definition: xsmessage.h:174
XsMessage_setDataShort
XSTYPES_DLL_API void XsMessage_setDataShort(XsMessage *thisPtr, uint16_t value, XsSize offset)
XsMessageHeader::LengthData::ExtendedLength::m_length
struct XsMessageHeader::LengthData::ExtendedLength::ExtendedParts m_length
XsMessage_getDataFPValuesById
XSTYPES_DLL_API void XsMessage_getDataFPValuesById(XsMessage const *thisPtr, XsDataIdentifier dataIdentifier, double *dest, XsSize offset, XsSize numValues)
XsMessage_getTotalMessageSize
XSTYPES_DLL_API XsSize XsMessage_getTotalMessageSize(XsMessage const *thisPtr)
XsMessage_getDataDouble
XSTYPES_DLL_API double XsMessage_getDataDouble(XsMessage const *thisPtr, XsSize offset)
XsMessage_resizeData
XSTYPES_DLL_API void XsMessage_resizeData(XsMessage *thisPtr, XsSize newSize)
uint8_t
unsigned char uint8_t
Definition: rptypes.h:41
XsMessage_setBusId
XSTYPES_DLL_API void XsMessage_setBusId(XsMessage *thisPtr, uint8_t busId)
XsMessage_getDataF1220
XSTYPES_DLL_API double XsMessage_getDataF1220(XsMessage const *thisPtr, XsSize offset)
XsMessage_getDataByte
XSTYPES_DLL_API uint8_t XsMessage_getDataByte(XsMessage const *thisPtr, XsSize offset)
XsMessage_setDataLong
XSTYPES_DLL_API void XsMessage_setDataLong(XsMessage *thisPtr, uint32_t value, XsSize offset)
mrpt::img::operator==
bool operator==(const mrpt::img::TCamera &a, const mrpt::img::TCamera &b)
Definition: TCamera.cpp:201
XsMessage_isChecksumOk
XSTYPES_DLL_API int XsMessage_isChecksumOk(XsMessage const *thisPtr)
source
GLsizei GLsizei GLchar * source
Definition: glext.h:4082
XsMessageHeader::m_preamble
uint8_t m_preamble
The message preamble (always 0xFA)
Definition: xsmessage.h:152
XsMessageHeader::LengthData::m_extended
struct XsMessageHeader::LengthData::ExtendedLength m_extended
XsMessageHeader::m_datlen
union XsMessageHeader::LengthData m_datlen
XsDataIdentifier
XsDataIdentifier
Defines the data identifiers.
Definition: xsdataidentifier.h:40
offset
GLintptr offset
Definition: glext.h:3925
XsMessage_setDataF1220
XSTYPES_DLL_API void XsMessage_setDataF1220(XsMessage *thisPtr, double value, XsSize offset)
XsMessage_constData
const XSTYPES_DLL_API uint8_t * XsMessage_constData(XsMessage const *thisPtr, XsSize offset)
XsMessage_setMessageId
XSTYPES_DLL_API void XsMessage_setMessageId(XsMessage *thisPtr, XsXbusMessageId msgId)
data
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:3547
count
GLuint GLuint GLsizei count
Definition: glext.h:3528
XsMessage_assign
XSTYPES_DLL_API void XsMessage_assign(XsMessage *thisPtr, XsSize dataSize)
XsMessage_getMessageStart
const XSTYPES_DLL_API uint8_t * XsMessage_getMessageStart(XsMessage const *thisPtr)
XsMessage_setDataDouble
XSTYPES_DLL_API void XsMessage_setDataDouble(XsMessage *thisPtr, double value, XsSize offset)
XsMessageHeader::m_length
uint8_t m_length
The length of the message.
Definition: xsmessage.h:159
XsMessage_deleteData
XSTYPES_DLL_API void XsMessage_deleteData(XsMessage *thisPtr, XsSize count, XsSize offset)
XsMessage_setDataBuffer
XSTYPES_DLL_API void XsMessage_setDataBuffer(XsMessage *thisPtr, const uint8_t *buffer, XsSize size, XsSize offset)
b
GLubyte GLubyte b
Definition: glext.h:6279
XsMessageHeader::LengthData::ExtendedLength::m_data
uint8_t m_data[1]
The first byte of the data buffer, the data buffer is always at least 1 byte since it has to contain ...
Definition: xsmessage.h:181
uint64_t
unsigned __int64 uint64_t
Definition: rptypes.h:50
XsMessage_setDataFloat
XSTYPES_DLL_API void XsMessage_setDataFloat(XsMessage *thisPtr, float value, XsSize offset)
XsMessage_computeChecksum
XSTYPES_DLL_API uint8_t XsMessage_computeChecksum(XsMessage const *thisPtr)
XsSize
size_t XsSize
XsSize must be unsigned number!
Definition: xstypedefs.h:19
XsMessage_empty
XSTYPES_DLL_API int XsMessage_empty(XsMessage const *thisPtr)
XsMessage_destruct
XSTYPES_DLL_API void XsMessage_destruct(XsMessage *thisPtr)
XsXbusMessageId
XsXbusMessageId
Xsens Xbus Message Identifiers.
Definition: xsxbusmessageid.h:17
xsdataidentifier.h
XsMessage_compare
XSTYPES_DLL_API int XsMessage_compare(XsMessage const *a, XsMessage const *b)
XsMessage_constructSized
XSTYPES_DLL_API void XsMessage_constructSized(XsMessage *thisPtr, XsSize dataSize)
xstypesconfig.h
buffer
GLuint buffer
Definition: glext.h:3917
xsxbusmessageid.h
XsMessageHeader::LengthData::ExtendedLength::ExtendedParts
The high and low byte of the extended length.
Definition: xsmessage.h:169
XsMessage_getDataFPValues
XSTYPES_DLL_API void XsMessage_getDataFPValues(XsMessage const *thisPtr, uint64_t outputSettings, double *dest, XsSize offset, XsSize numValues)
XsMessage_dataSize
XSTYPES_DLL_API XsSize XsMessage_dataSize(XsMessage const *thisPtr)
XsMessageHeader::LengthData::ExtendedLength
Contains extended length information and first byte of data buffer if normal length is 255.
Definition: xsmessage.h:166
pstdint.h
XsMessage_setDataFPValues
XSTYPES_DLL_API void XsMessage_setDataFPValues(XsMessage *thisPtr, uint64_t outputSettings, double const *data, XsSize offset, XsSize numValues)
XsMessageHeader::LengthData::ExtendedLength::ExtendedParts::m_high
uint8_t m_high
High byte of extended length.
Definition: xsmessage.h:172
XsMessage_setDataFP1632
XSTYPES_DLL_API void XsMessage_setDataFP1632(XsMessage *thisPtr, double value, XsSize offset)
XsMessage
Structure for storing a single message.
Definition: xsmessage.h:198
XsMessageHeader
A message header.
Definition: xsmessage.h:149
PACK_POST
#define PACK_POST
Definition: xsmessage.h:143
XsMessage_copy
XSTYPES_DLL_API void XsMessage_copy(XsMessage *copy, XsMessage const *src)
value
GLsizei const GLfloat * value
Definition: glext.h:4117
XSTYPES_DLL_API
#define XSTYPES_DLL_API
Definition: xstypesconfig.h:9
XsMessage_getDataFloat
XSTYPES_DLL_API float XsMessage_getDataFloat(XsMessage const *thisPtr, XsSize offset)
XsMessage_swap
XSTYPES_DLL_API void XsMessage_swap(XsMessage *a, XsMessage *b)
empty
EIGEN_STRONG_INLINE bool empty() const
Definition: eigen_plugins.h:601
XsMessage_load
XSTYPES_DLL_API void XsMessage_load(XsMessage *thisPtr, XsSize msgSize, unsigned char const *src)
XsMessage_setDataFPValuesById
XSTYPES_DLL_API void XsMessage_setDataFPValuesById(XsMessage *thisPtr, XsDataIdentifier dataIdentifier, double const *data, XsSize offset, XsSize numValues)
XsMessage_getDataBuffer
const XSTYPES_DLL_API uint8_t * XsMessage_getDataBuffer(XsMessage const *thisPtr, XsSize offset)
xsbytearray.h
XsMessage_setDataByte
XSTYPES_DLL_API void XsMessage_setDataByte(XsMessage *thisPtr, uint8_t value, XsSize offset)
size
GLsizeiptr size
Definition: glext.h:3923
XsMessage_insertData
XSTYPES_DLL_API void XsMessage_insertData(XsMessage *thisPtr, XsSize count, XsSize offset)
XsMessage_getConstHeader
const XSTYPES_DLL_API XsMessageHeader * XsMessage_getConstHeader(XsMessage const *thisPtr)
uint32_t
unsigned __int32 uint32_t
Definition: rptypes.h:47
XsMessage::m_checksum
uint8_t *const m_checksum
Definition: xsmessage.h:571
a
GLubyte GLubyte GLubyte a
Definition: glext.h:6279
XsMessage_getDataFP1632
XSTYPES_DLL_API double XsMessage_getDataFP1632(XsMessage const *thisPtr, XsSize offset)



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST