|
ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
|
u-blox UBX binary protocol codec (PC_ENABLE_UBX) - the GNSS receiver control/nav protocol. More...
#include "protocore_config.h"Go to the source code of this file.
u-blox UBX binary protocol codec (PC_ENABLE_UBX) - the GNSS receiver control/nav protocol.
A UBX frame is B5 62 <class> <id> <len-LE:2> <payload...> <CK_A> <CK_B>: two sync chars, a class/id message selector, a little-endian payload length, the payload, and an 8-bit Fletcher checksum computed over everything between the sync chars and the checksum (class..payload end). This codec builds a frame (adding the sync chars, length, and checksum), builds a zero-length poll request (how UBX asks a receiver to emit a message), parses one complete frame (validating the length and checksum), and - because a u-blox receiver multiplexes UBX with ASCII NMEA on the same UART - provides a streaming demultiplexer that pulls UBX frames out of a byte stream and hands every non-UBX byte back to the caller (for an NMEA line assembler). Little-endian payload readers and an ACK helper decode the common replies. Pure codec, host-tested; the UART is the application's (a plain HardwareSerial link, commonly 9600 baud).
Definition in file ubx.h.