MRPT
1.9.9
|
#include "xstypesconfig.h"
#include "pstdint.h"
#include "xsbytearray.h"
#include "xsdataidentifier.h"
#include "xsxbusmessageid.h"
Go to the source code of this file.
Classes | |
struct | XsMessageHeader |
A message header. More... | |
union | XsMessageHeader::LengthData |
Contains optional extended length of message and first byte of data buffer. More... | |
struct | XsMessageHeader::LengthData::ExtendedLength |
Contains extended length information and first byte of data buffer if normal length is 255. More... | |
struct | XsMessageHeader::LengthData::ExtendedLength::ExtendedParts |
The high and low byte of the extended length. More... | |
struct | XsMessage |
Structure for storing a single message. More... | |
Macros | |
#define | XSMESSAGE_INITIALIZER |
#define | XS_PREAMBLE 0xFA |
#define | XS_EXTLENCODE 0xFF |
#define | XS_LEN_MSGHEADER 4 |
#define | XS_LEN_MSGEXTHEADER 6 |
#define | XS_LEN_MSGHEADERCS 5 |
#define | XS_LEN_MSGEXTHEADERCS 7 |
#define | XS_LEN_CHECKSUM 1 |
#define | XS_LEN_UNSIGSHORT 2 |
#define | XS_LEN_UNSIGINT 4 |
#define | XS_LEN_FLOAT 4 |
#define | XS_MAXDATALEN (8192 - XS_LEN_MSGEXTHEADERCS) |
#define | XS_MAXSHORTDATALEN 254 |
#define | XS_MAXMSGLEN (XS_MAXDATALEN + XS_LEN_MSGEXTHEADERCS) |
#define | XS_MAXSHORTMSGLEN (XS_MAXSHORTDATALEN + XS_LEN_MSGHEADERCS) |
#define | XS_MAXGARBAGE (XS_MAXMSGLEN + 1) |
#define | PACK_POST __attribute__((__packed__)) |
#define | swapEndian16(src) (((src) >> 8) | ((src) << 8)) |
#define | swapEndian32(src) |
#define | swapEndian64(src) |
Typedefs | |
typedef struct XsMessage | XsMessage |
typedef struct XsMessageHeader | XsMessageHeader |
Variables | |
struct XsMessageHeader | PACK_POST |
#define PACK_POST __attribute__((__packed__)) |
Definition at line 143 of file xsmessage.h.
Definition at line 576 of file xsmessage.h.
#define swapEndian32 | ( | src | ) |
Definition at line 577 of file xsmessage.h.
#define swapEndian64 | ( | src | ) |
Definition at line 580 of file xsmessage.h.
#define XS_EXTLENCODE 0xFF |
Definition at line 115 of file xsmessage.h.
Referenced by expectedMessageSize(), and ProtocolHandler::findMessage().
#define XS_LEN_CHECKSUM 1 |
Definition at line 121 of file xsmessage.h.
#define XS_LEN_FLOAT 4 |
Definition at line 124 of file xsmessage.h.
#define XS_LEN_MSGEXTHEADER 6 |
Definition at line 118 of file xsmessage.h.
#define XS_LEN_MSGEXTHEADERCS 7 |
Definition at line 120 of file xsmessage.h.
Referenced by expectedMessageSize(), ProtocolHandler::findMessage(), and ProtocolHandler::maximumMessageSize().
#define XS_LEN_MSGHEADER 4 |
Definition at line 117 of file xsmessage.h.
#define XS_LEN_MSGHEADERCS 5 |
Definition at line 119 of file xsmessage.h.
Referenced by expectedMessageSize(), ProtocolHandler::findMessage(), and ProtocolHandler::minimumMessageSize().
#define XS_LEN_UNSIGINT 4 |
Definition at line 123 of file xsmessage.h.
#define XS_LEN_UNSIGSHORT 2 |
Definition at line 122 of file xsmessage.h.
#define XS_MAXDATALEN (8192 - XS_LEN_MSGEXTHEADERCS) |
Definition at line 127 of file xsmessage.h.
Referenced by ProtocolHandler::findMessage(), and ProtocolHandler::maximumMessageSize().
#define XS_MAXGARBAGE (XS_MAXMSGLEN + 1) |
Definition at line 131 of file xsmessage.h.
#define XS_MAXMSGLEN (XS_MAXDATALEN + XS_LEN_MSGEXTHEADERCS) |
Definition at line 129 of file xsmessage.h.
#define XS_MAXSHORTDATALEN 254 |
Definition at line 128 of file xsmessage.h.
#define XS_MAXSHORTMSGLEN (XS_MAXSHORTDATALEN + XS_LEN_MSGHEADERCS) |
Definition at line 130 of file xsmessage.h.
#define XS_PREAMBLE 0xFA |
Definition at line 114 of file xsmessage.h.
Referenced by ProtocolHandler::findMessage().
#define XSMESSAGE_INITIALIZER |
Definition at line 24 of file xsmessage.h.
Definition at line 28 of file xsmessage.h.
typedef struct XsMessageHeader XsMessageHeader |
Definition at line 29 of file xsmessage.h.
XSTYPES_DLL_API void XsMessage_assign | ( | XsMessage * | thisPtr, |
XsSize | dataSize | ||
) |
XSTYPES_DLL_API int XsMessage_compare | ( | XsMessage const * | a, |
XsMessage const * | b | ||
) |
XSTYPES_DLL_API uint8_t XsMessage_computeChecksum | ( | XsMessage const * | thisPtr | ) |
XSTYPES_DLL_API const uint8_t* XsMessage_constData | ( | XsMessage const * | thisPtr, |
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_construct | ( | XsMessage * | thisPtr | ) |
XSTYPES_DLL_API void XsMessage_constructSized | ( | XsMessage * | thisPtr, |
XsSize | dataSize | ||
) |
XSTYPES_DLL_API void XsMessage_copy | ( | XsMessage * | copy, |
XsMessage const * | src | ||
) |
XSTYPES_DLL_API void XsMessage_copyConstruct | ( | XsMessage * | thisPtr, |
XsMessage const * | src | ||
) |
XSTYPES_DLL_API XsSize XsMessage_dataSize | ( | XsMessage const * | thisPtr | ) |
XSTYPES_DLL_API void XsMessage_deleteData | ( | XsMessage * | thisPtr, |
XsSize | count, | ||
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_destruct | ( | XsMessage * | thisPtr | ) |
XSTYPES_DLL_API int XsMessage_empty | ( | XsMessage const * | thisPtr | ) |
XSTYPES_DLL_API const XsMessageHeader* XsMessage_getConstHeader | ( | XsMessage const * | thisPtr | ) |
XSTYPES_DLL_API const uint8_t* XsMessage_getDataBuffer | ( | XsMessage const * | thisPtr, |
XsSize | offset | ||
) |
XSTYPES_DLL_API uint8_t XsMessage_getDataByte | ( | XsMessage const * | thisPtr, |
XsSize | offset | ||
) |
XSTYPES_DLL_API double XsMessage_getDataDouble | ( | XsMessage const * | thisPtr, |
XsSize | offset | ||
) |
XSTYPES_DLL_API double XsMessage_getDataF1220 | ( | XsMessage const * | thisPtr, |
XsSize | offset | ||
) |
XSTYPES_DLL_API float XsMessage_getDataFloat | ( | XsMessage const * | thisPtr, |
XsSize | offset | ||
) |
XSTYPES_DLL_API double XsMessage_getDataFP1632 | ( | XsMessage const * | thisPtr, |
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_getDataFPValues | ( | XsMessage const * | thisPtr, |
uint64_t | outputSettings, | ||
double * | dest, | ||
XsSize | offset, | ||
XsSize | numValues | ||
) |
XSTYPES_DLL_API void XsMessage_getDataFPValuesById | ( | XsMessage const * | thisPtr, |
XsDataIdentifier | dataIdentifier, | ||
double * | dest, | ||
XsSize | offset, | ||
XsSize | numValues | ||
) |
XSTYPES_DLL_API uint32_t XsMessage_getDataLong | ( | XsMessage const * | thisPtr, |
XsSize | offset | ||
) |
XSTYPES_DLL_API uint16_t XsMessage_getDataShort | ( | XsMessage const * | thisPtr, |
XsSize | offset | ||
) |
XSTYPES_DLL_API XsMessageHeader* XsMessage_getHeader | ( | XsMessage * | ) |
XSTYPES_DLL_API const uint8_t* XsMessage_getMessageStart | ( | XsMessage const * | thisPtr | ) |
XSTYPES_DLL_API XsSize XsMessage_getTotalMessageSize | ( | XsMessage const * | thisPtr | ) |
XSTYPES_DLL_API void XsMessage_insertData | ( | XsMessage * | thisPtr, |
XsSize | count, | ||
XsSize | offset | ||
) |
XSTYPES_DLL_API int XsMessage_isChecksumOk | ( | XsMessage const * | thisPtr | ) |
XSTYPES_DLL_API void XsMessage_load | ( | XsMessage * | thisPtr, |
XsSize | msgSize, | ||
unsigned char const * | src | ||
) |
XSTYPES_DLL_API void XsMessage_recomputeChecksum | ( | XsMessage * | thisPtr | ) |
XSTYPES_DLL_API void XsMessage_resizeData | ( | XsMessage * | thisPtr, |
XsSize | newSize | ||
) |
XSTYPES_DLL_API void XsMessage_setBusId | ( | XsMessage * | thisPtr, |
uint8_t | busId | ||
) |
XSTYPES_DLL_API void XsMessage_setDataBuffer | ( | XsMessage * | thisPtr, |
const uint8_t * | buffer, | ||
XsSize | size, | ||
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_setDataByte | ( | XsMessage * | thisPtr, |
uint8_t | value, | ||
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_setDataDouble | ( | XsMessage * | thisPtr, |
double | value, | ||
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_setDataF1220 | ( | XsMessage * | thisPtr, |
double | value, | ||
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_setDataFloat | ( | XsMessage * | thisPtr, |
float | value, | ||
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_setDataFP1632 | ( | XsMessage * | thisPtr, |
double | value, | ||
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_setDataFPValues | ( | XsMessage * | thisPtr, |
uint64_t | outputSettings, | ||
double const * | data, | ||
XsSize | offset, | ||
XsSize | numValues | ||
) |
XSTYPES_DLL_API void XsMessage_setDataFPValuesById | ( | XsMessage * | thisPtr, |
XsDataIdentifier | dataIdentifier, | ||
double const * | data, | ||
XsSize | offset, | ||
XsSize | numValues | ||
) |
XSTYPES_DLL_API void XsMessage_setDataLong | ( | XsMessage * | thisPtr, |
uint32_t | value, | ||
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_setDataShort | ( | XsMessage * | thisPtr, |
uint16_t | value, | ||
XsSize | offset | ||
) |
XSTYPES_DLL_API void XsMessage_setMessageId | ( | XsMessage * | thisPtr, |
XsXbusMessageId | msgId | ||
) |
XSTYPES_DLL_API void XsMessage_swap | ( | XsMessage * | a, |
XsMessage * | b | ||
) |
struct XsMessageHeader PACK_POST |
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |