|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <GPSStreamDemux.h>
Classes | |
| class | Framer |
| class | Handler |
Public Member Functions | |
| GPSStreamDemux (const GPSStreamConfig &config) | |
| ~GPSStreamDemux () | |
| void | push (uint8_t byte, Handler &handler) |
| void | reset () |
| void | reset (GPSFrameKind kind) |
| void | setEnabled (GPSFrameKind kind, bool enabled) |
| Enables or disables an available framer; either way it restarts from an empty state. | |
Routes each received byte to the framers of one stream.
Every enabled framer claims each byte: Locked while it is inside a frame, Owns for a sync byte that starts one of its frames, Watch for a sync byte it only observes, Default when it accepts any byte (the text framers), or None. A Locked framer, else the first framer that Owns the byte, receives it alone and resets every other framer. Otherwise the watching framers and the first Default framer all receive it. Precedence is RTCM3, UBX, SBF, NMEASentence, ASCIILine.
This reproduces the per-family routing: RTCM3 interrupts text framers mid-line (ASCII families, Femto), while a UBX or SBF frame in progress keeps its bytes, including embedded 0xD3 preambles, and RTCM3 only takes bytes between native frames.
Definition at line 61 of file GPSStreamDemux.h.
|
explicit |
Definition at line 277 of file GPSStreamDemux.cc.
References ASCIILine, config, NMEASentence, RTCM3, SBF, and UBX.
|
default |
| void GPSStreamDemux::push | ( | uint8_t | byte, |
| Handler & | handler | ||
| ) |
Definition at line 303 of file GPSStreamDemux.cc.
References GPSStreamDemux::Framer::feed(), and GPSStreamDemux::Framer::reset().
Referenced by GPSProtocolRuntime::decode(), and GPSReceiverSignatures::push().
| void GPSStreamDemux::reset | ( | ) |
Definition at line 339 of file GPSStreamDemux.cc.
Referenced by UBX::Protocol::configure(), GPSReceiverSignatures::reset(), and GPSNMEAStream::reset().
| void GPSStreamDemux::reset | ( | GPSFrameKind | kind | ) |
Definition at line 348 of file GPSStreamDemux.cc.
| void GPSStreamDemux::setEnabled | ( | GPSFrameKind | kind, |
| bool | enabled | ||
| ) |
Enables or disables an available framer; either way it restarts from an empty state.
Definition at line 357 of file GPSStreamDemux.cc.