3es  0.7
3espacketheader.h
1 //
2 // author: Kazys Stepanas
3 //
4 #ifndef _3ESPACKET_H_
5 #define _3ESPACKET_H_
6 
7 #include "3es-core.h"
8 
9 #include <cinttypes>
10 
11 namespace tes
12 {
14  extern const uint32_t _3es_coreAPI PacketMarker;
16  extern const uint16_t _3es_coreAPI PacketVersionMajor;
18  extern const uint16_t _3es_coreAPI PacketVersionMinor;
19 
22  {
24  PF_NoCrc = (1<<0)
25  };
26 
32  struct _3es_coreAPI PacketHeader
33  {
34  uint32_t marker;
35  uint16_t versionMajor;
36  uint16_t versionMinor;
37  uint16_t routingId;
40  uint16_t messageId;
41  uint16_t payloadSize;
42  uint8_t payloadOffset;
45  uint8_t flags;
46  };
47 }
48 
49 #endif // _3ESPACKET_H_
const uint32_t _3es_coreAPI PacketMarker
Marker value identifying a packet header in local Endian.
uint16_t payloadSize
Size of the payload following this header.
Definition: 3espacketheader.h:41
Definition: 3esbounds.h:13
uint32_t marker
Marker bytes. Identifies the packet start.
Definition: 3espacketheader.h:34
uint16_t messageId
Identifies the message ID or message type.
Definition: 3espacketheader.h:40
uint16_t versionMinor
PacketHeader minor version number.
Definition: 3espacketheader.h:36
PacketFlag
Flag values for PacketHeader objects.
Definition: 3espacketheader.h:21
The header for an incoming 3ES data packet.
Definition: 3espacketheader.h:32
uint16_t versionMajor
PacketHeader major version number. May be used to control decoding.
Definition: 3espacketheader.h:35
Marks a PacketHeader as missing its 16-bit CRC.
Definition: 3espacketheader.h:24
uint8_t flags
PacketFlag values.
Definition: 3espacketheader.h:45
const uint16_t _3es_coreAPI PacketVersionMinor
Expected packet minor version local Endian.
const uint16_t _3es_coreAPI PacketVersionMajor
Expected packet major version local Endian.