#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 { XSBYTEARRAY_INITIALIZER, 1, 0 } |
#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) (((src) >> 24) | (((src) >> 8) & 0xFF00) | (((src) << 8) & 0xFF0000) | ((src) << 24)) |
#define | swapEndian64(src) (((src >> 56) & 0xFFULL) | ((src >> 40) & 0xFF00ULL) | ((src >> 24) & 0xFF0000ULL) | ((src >> 8) & 0xFF000000ULL) | ((src << 8) & 0xFF00000000ULL) | ((src << 24) & 0xFF0000000000ULL) | ((src << 40) & 0xFF000000000000ULL) | ((src << 56))) |
Typedefs | |
typedef struct XsMessage | XsMessage |
typedef struct XsMessageHeader | XsMessageHeader |
Variables | |
struct XsMessageHeader | PACK_POST |
#define PACK_POST __attribute__((__packed__)) |
Definition at line 106 of file xsmessage.h.
Definition at line 523 of file xsmessage.h.
#define swapEndian32 | ( | src | ) | (((src) >> 24) | (((src) >> 8) & 0xFF00) | (((src) << 8) & 0xFF0000) | ((src) << 24)) |
Definition at line 524 of file xsmessage.h.
#define swapEndian64 | ( | src | ) | (((src >> 56) & 0xFFULL) | ((src >> 40) & 0xFF00ULL) | ((src >> 24) & 0xFF0000ULL) | ((src >> 8) & 0xFF000000ULL) | ((src << 8) & 0xFF00000000ULL) | ((src << 24) & 0xFF0000000000ULL) | ((src << 40) & 0xFF000000000000ULL) | ((src << 56))) |
Definition at line 525 of file xsmessage.h.
#define XS_EXTLENCODE 0xFF |
Definition at line 79 of file xsmessage.h.
Referenced by expectedMessageSize(), and ProtocolHandler::findMessage().
#define XS_LEN_CHECKSUM 1 |
Definition at line 85 of file xsmessage.h.
#define XS_LEN_FLOAT 4 |
Definition at line 88 of file xsmessage.h.
#define XS_LEN_MSGEXTHEADER 6 |
Definition at line 82 of file xsmessage.h.
#define XS_LEN_MSGEXTHEADERCS 7 |
Definition at line 84 of file xsmessage.h.
Referenced by expectedMessageSize(), ProtocolHandler::findMessage(), and ProtocolHandler::maximumMessageSize().
#define XS_LEN_MSGHEADER 4 |
Definition at line 81 of file xsmessage.h.
#define XS_LEN_MSGHEADERCS 5 |
Definition at line 83 of file xsmessage.h.
Referenced by expectedMessageSize(), ProtocolHandler::findMessage(), and ProtocolHandler::minimumMessageSize().
#define XS_LEN_UNSIGINT 4 |
Definition at line 87 of file xsmessage.h.
#define XS_LEN_UNSIGSHORT 2 |
Definition at line 86 of file xsmessage.h.
#define XS_MAXDATALEN (8192-XS_LEN_MSGEXTHEADERCS) |
Definition at line 91 of file xsmessage.h.
Referenced by ProtocolHandler::findMessage(), and ProtocolHandler::maximumMessageSize().
#define XS_MAXGARBAGE (XS_MAXMSGLEN+1) |
Definition at line 95 of file xsmessage.h.
#define XS_MAXMSGLEN (XS_MAXDATALEN+XS_LEN_MSGEXTHEADERCS) |
Definition at line 93 of file xsmessage.h.
#define XS_MAXSHORTDATALEN 254 |
Definition at line 92 of file xsmessage.h.
#define XS_MAXSHORTMSGLEN (XS_MAXSHORTDATALEN+XS_LEN_MSGHEADERCS) |
Definition at line 94 of file xsmessage.h.
#define XS_PREAMBLE 0xFA |
Definition at line 78 of file xsmessage.h.
Referenced by ProtocolHandler::findMessage().
#define XSMESSAGE_INITIALIZER { XSBYTEARRAY_INITIALIZER, 1, 0 } |
Definition at line 24 of file xsmessage.h.
Definition at line 25 of file xsmessage.h.
typedef struct XsMessageHeader XsMessageHeader |
Definition at line 26 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.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020 |