QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GPSStreamDemux Class Reference

#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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GPSStreamDemux()

GPSStreamDemux::GPSStreamDemux ( const GPSStreamConfig &  config)
explicit

Definition at line 277 of file GPSStreamDemux.cc.

References ASCIILine, config, NMEASentence, RTCM3, SBF, and UBX.

◆ ~GPSStreamDemux()

GPSStreamDemux::~GPSStreamDemux ( )
default

Member Function Documentation

◆ push()

void GPSStreamDemux::push ( uint8_t  byte,
Handler &  handler 
)

◆ reset() [1/2]

void GPSStreamDemux::reset ( )

◆ reset() [2/2]

void GPSStreamDemux::reset ( GPSFrameKind  kind)

Definition at line 348 of file GPSStreamDemux.cc.

◆ setEnabled()

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.


The documentation for this class was generated from the following files: