QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
NMEA::LineFramer Class Reference

Frames printable ASCII lines. A '$' or '#' restarts the line, so a sentence or log is not lost after garbage. More...

#include <NMEAFramer.h>

Public Member Functions

 LineFramer (std::span< char > buffer)
 
std::optional< std::string_view > addByte (uint8_t byte)
 Returns a completed line without its terminator; the view is valid until the next byte.
 
void reset ()
 

Detailed Description

Frames printable ASCII lines. A '$' or '#' restarts the line, so a sentence or log is not lost after garbage.

Definition at line 95 of file NMEAFramer.h.

Constructor & Destructor Documentation

◆ LineFramer()

NMEA::LineFramer::LineFramer ( std::span< char >  buffer)
inlineexplicit

Definition at line 98 of file NMEAFramer.h.

Member Function Documentation

◆ addByte()

std::optional< std::string_view > NMEA::LineFramer::addByte ( uint8_t  byte)
inline

Returns a completed line without its terminator; the view is valid until the next byte.

Definition at line 103 of file NMEAFramer.h.

References reset().

◆ reset()

void NMEA::LineFramer::reset ( )
inline

Definition at line 144 of file NMEAFramer.h.

Referenced by addByte().


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