Skip to main content

MessageHeader Struct

The header present at the beginning of every message. More...

Declaration

struct point_one::fusion_engine::messages::MessageHeader { ... }

Included Headers

Public Member Attributes Index

uint32_tcrc = 0

The 32-bit CRC of all bytes from and including the protocol_version field to the last byte in the message, including the message payload. More...

MessageTypemessage_type = MessageType::INVALID

Type identifier for the serialized message to follow. More...

uint8_tmessage_version = 0

The version of the message type specified by message_type to follow. More...

uint32_tpayload_size_bytes = 0

The size of the serialized message (bytes). More...

uint8_tprotocol_version = 2

The version of the P1 binary protocol being used. More...

uint32_tsequence_number = 0

The sequence number of this message. More...

uint32_tsource_identifier = INVALID_SOURCE_ID

Identifies the source of the serialized data. More...

uint8_tsync[2] = {SYNC0, SYNC1}

Message sync bytes: always set to ASCII 0.1 (0x2E, 0x31). More...

Public Static Attributes Index

static constexpr uint32_tINVALID_SOURCE_ID = 0xFFFFFFFF
static const size_tMAX_MESSAGE_SIZE_BYTES = (1 << 24)

The maximum expected message size (in bytes), used for sanity checking. More...

static constexpr uint8_tSYNC0 = 0x2E
static constexpr uint8_tSYNC1 = 0x31

Description

The header present at the beginning of every message.

The header is followed immediately in the binary stream by the message payload specified by message_type.

Definition at line 606 of file defs.h.

Public Member Attributes

crc

uint32_t point_one::fusion_engine::messages::MessageHeader::crc = 0

The 32-bit CRC of all bytes from and including the protocol_version field to the last byte in the message, including the message payload.

This uses the standard CRC-32 generator polynomial in reversed order (0xEDB88320).

See also CRC Calculation/Message Validation Support.

Definition at line 630 of file defs.h.

630 uint32_t crc = 0;

message_type

MessageType point_one::fusion_engine::messages::MessageHeader::message_type = MessageType::INVALID

Type identifier for the serialized message to follow.

Definition at line 641 of file defs.h.

641 MessageType message_type = MessageType::INVALID;

message_version

uint8_t point_one::fusion_engine::messages::MessageHeader::message_version = 0

The version of the message type specified by message_type to follow.

Definition at line 638 of file defs.h.

638 uint8_t message_version = 0;

payload_size_bytes

uint32_t point_one::fusion_engine::messages::MessageHeader::payload_size_bytes = 0

The size of the serialized message (bytes).

Definition at line 647 of file defs.h.

647 uint32_t payload_size_bytes = 0;

protocol_version

uint8_t point_one::fusion_engine::messages::MessageHeader::protocol_version = 2

The version of the P1 binary protocol being used.

Definition at line 633 of file defs.h.

633 uint8_t protocol_version = 2;

sequence_number

uint32_t point_one::fusion_engine::messages::MessageHeader::sequence_number = 0

The sequence number of this message.

Definition at line 644 of file defs.h.

644 uint32_t sequence_number = 0;

source_identifier

uint32_t point_one::fusion_engine::messages::MessageHeader::source_identifier = INVALID_SOURCE_ID

Identifies the source of the serialized data.

Definition at line 650 of file defs.h.

650 uint32_t source_identifier = INVALID_SOURCE_ID;

sync

uint8_t point_one::fusion_engine::messages::MessageHeader::sync[2] = {SYNC0, SYNC1}

Message sync bytes: always set to ASCII 0.1 (0x2E, 0x31).

Definition at line 618 of file defs.h.

618 uint8_t sync[2] = {SYNC0, SYNC1};

Public Static Attributes

INVALID_SOURCE_ID

constexpr uint32_t point_one::fusion_engine::messages::MessageHeader::INVALID_SOURCE_ID = 0xFFFFFFFF
constexpr static

Definition at line 610 of file defs.h.

610 static constexpr uint32_t INVALID_SOURCE_ID = 0xFFFFFFFF;

MAX_MESSAGE_SIZE_BYTES

const size_t point_one::fusion_engine::messages::MessageHeader::MAX_MESSAGE_SIZE_BYTES = (1 << 24)
static

The maximum expected message size (in bytes), used for sanity checking.

Definition at line 615 of file defs.h.

615 static const size_t MAX_MESSAGE_SIZE_BYTES = (1 << 24);

SYNC0

constexpr uint8_t point_one::fusion_engine::messages::MessageHeader::SYNC0 = 0x2E
constexpr static

Definition at line 607 of file defs.h.

607 static constexpr uint8_t SYNC0 = 0x2E; // '.'

SYNC1

constexpr uint8_t point_one::fusion_engine::messages::MessageHeader::SYNC1 = 0x31
constexpr static

Definition at line 608 of file defs.h.

608 static constexpr uint8_t SYNC1 = 0x31; // '1'

The documentation for this struct was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.