NDEVR
API Documentation
NMEAReader

Parses raw NMEA data streams, splitting them into individual sentences and dispatching them to registered NMEASentenceReader instances. More...

Inheritance diagram for NMEAReader:
[legend]
Collaboration diagram for NMEAReader:
[legend]

Public Member Functions

 NMEAReader ()
 Constructs the NMEA reader.
 ~NMEAReader ()
 Destructor.
Buffer< StringViewactiveSentenceTypes () const
 Returns the list of sentence types that have active readers.
void addSentenceReader (const StringView &string, NMEASentenceReader *reader)
 Registers a sentence reader for a specific sentence type.
void addSentenceReader (NMEASentenceReader *reader)
 Registers a sentence reader and auto-maps its supported sentence types.
const NMEAInfoinfo () const
 Returns the current accumulated NMEA info.
NMEAUpdateInfo processNMEABuffer (const StringView &data)
 Processes a buffer of raw NMEA data, extracting and processing complete sentences.
virtual NMEAUpdateInfo processRxCommand (const StringView &command, const StringView &data)
 Processes a single extracted NMEA command and data pair.
const Buffer< NMEASentenceReader * > & readers () const
 Returns the registered sentence readers.
void reset ()
 Resets the parser state machine to its initial state.

Protected Attributes

NMEAInfo m_info
 Accumulated NMEA data.

Detailed Description

Parses raw NMEA data streams, splitting them into individual sentences and dispatching them to registered NMEASentenceReader instances.

Definition at line 38 of file NMEAParserPacket.h.

Member Function Documentation

◆ activeSentenceTypes()

Buffer< StringView > NMEAReader::activeSentenceTypes ( ) const

Returns the list of sentence types that have active readers.

Returns
A buffer of active sentence type identifiers.

◆ addSentenceReader() [1/2]

void NMEAReader::addSentenceReader ( const StringView & string,
NMEASentenceReader * reader )
inline

Registers a sentence reader for a specific sentence type.

Parameters
[in]stringThe sentence type identifier.
[in]readerThe sentence reader to register.

Definition at line 62 of file NMEAParserPacket.h.

◆ addSentenceReader() [2/2]

void NMEAReader::addSentenceReader ( NMEASentenceReader * reader)

Registers a sentence reader and auto-maps its supported sentence types.

Parameters
[in]readerThe sentence reader to register.

◆ info()

const NMEAInfo & NMEAReader::info ( ) const
inline

Returns the current accumulated NMEA info.

Returns
Reference to the NMEA info structure.

Definition at line 71 of file NMEAParserPacket.h.

References m_info.

◆ processNMEABuffer()

NMEAUpdateInfo NMEAReader::processNMEABuffer ( const StringView & data)

Processes a buffer of raw NMEA data, extracting and processing complete sentences.

Parameters
[in]dataThe raw NMEA data buffer.
Returns
Update information from the last processed sentence.

◆ processRxCommand()

virtual NMEAUpdateInfo NMEAReader::processRxCommand ( const StringView & command,
const StringView & data )
virtual

Processes a single extracted NMEA command and data pair.

Parameters
[in]commandThe NMEA command type.
[in]dataThe command data payload.
Returns
Update information describing what changed.

Reimplemented in CNMEAParserQt.

◆ readers()

const Buffer< NMEASentenceReader * > & NMEAReader::readers ( ) const
inline

Returns the registered sentence readers.

Returns
Reference to the buffer of sentence reader pointers.

Definition at line 68 of file NMEAParserPacket.h.


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