Device identifier information (MessageType::DEVICE_ID, version 1.0).
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.