Skip to main content

DeviceIDMessage Struct

Device identifier information (MessageType::DEVICE_ID, version 1). More...

Declaration

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

Included Headers

Base struct

structMessagePayload

The base class for all message payloads. More...

Public Member Attributes Index

DeviceTypedevice_type = DeviceType::UNKNOWN

The type of device this message originated from. More...

uint8_thw_id_length = 0

The length of the harware ID (in bytes). More...

uint8_treceiver_id_length = 0

The length of the GNSS receiver ID (in bytes). More...

int64_tsystem_time_ns = 0

The current system timestamp (in ns). More...

uint8_tuser_id_length = 0

The length of the user specified ID (in bytes). More...

Public Static Attributes Index

static constexpr MessageTypeMESSAGE_TYPE = MessageType::DEVICE_ID
static constexpr uint8_tMESSAGE_VERSION = 0

Description

Device identifier information (MessageType::DEVICE_ID, version 1).

This message contains ID fields for each of the following, where applicable.

  • Hardware - A unique ROM identifier pulled from the device hardware (for example, a CPU serial number)
  • User - A value set by the user to identify a device
  • Receiver - A unique ROM identifier pulled from the GNSS receiver

The message payload specifies the length of each field (in bytes), and is followed by each of the ID values. ID values may be strings or binary, depending on the type of device (device_type). Strings are not null-terminated.

 {MessageHeader, DeviceIDMessage, "HW ID", "User ID", "Receiver ID"}

The following is an example of extracting the hardware and user IDs from a byte array containing the entire message (assuming both are strings for this example device):

 auto message = *reinterpret_cast<const DeviceIDMessage*>(buffer);
 buffer += sizeof(DeviceIDMessage);
 std::string hw_id(buffer, message.hw_id_length);
 buffer += message.hw_id_length;
 std::string user_id(buffer, message.user_id_length);

Definition at line 178 of file device.h.

Public Member Attributes

device_type

DeviceType point_one::fusion_engine::messages::DeviceIDMessage::device_type = DeviceType::UNKNOWN

The type of device this message originated from.

Definition at line 186 of file device.h.

186 DeviceType device_type = DeviceType::UNKNOWN;

hw_id_length

uint8_t point_one::fusion_engine::messages::DeviceIDMessage::hw_id_length = 0

The length of the harware ID (in bytes).

Definition at line 189 of file device.h.

189 uint8_t hw_id_length = 0;

receiver_id_length

uint8_t point_one::fusion_engine::messages::DeviceIDMessage::receiver_id_length = 0

The length of the GNSS receiver ID (in bytes).

Definition at line 195 of file device.h.

195 uint8_t receiver_id_length = 0;

system_time_ns

int64_t point_one::fusion_engine::messages::DeviceIDMessage::system_time_ns = 0

The current system timestamp (in ns).

Definition at line 183 of file device.h.

183 int64_t system_time_ns = 0;

user_id_length

uint8_t point_one::fusion_engine::messages::DeviceIDMessage::user_id_length = 0

The length of the user specified ID (in bytes).

Definition at line 192 of file device.h.

192 uint8_t user_id_length = 0;

Public Static Attributes

MESSAGE_TYPE

constexpr MessageType point_one::fusion_engine::messages::DeviceIDMessage::MESSAGE_TYPE = MessageType::DEVICE_ID
constexpr static

Definition at line 179 of file device.h.

179 static constexpr MessageType MESSAGE_TYPE = MessageType::DEVICE_ID;

MESSAGE_VERSION

constexpr uint8_t point_one::fusion_engine::messages::DeviceIDMessage::MESSAGE_VERSION = 0
constexpr static

Definition at line 180 of file device.h.

180 static constexpr uint8_t MESSAGE_VERSION = 0;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.