NMEAParser
NMEA Parser Library - Monte Variakojis @VisualGPS
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
CNMEAParser Class Reference

This class will parse NMEA data, store its data and report that it has received data. More...

#include <NMEAParser.h>

Inheritance diagram for CNMEAParser:
CNMEAParserPacket

Public Member Functions

 CNMEAParser ()
 
virtual ~CNMEAParser ()
 
void ResetData (void)
 Resets or clears all NMEA data to a known default value. More...
 
CNMEAParserData::ERROR_E GetGPGGA (CNMEAParserData::GGA_DATA_T &sentenseData)
 Places a copy of the GPGGA data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetGPGSV (CNMEAParserData::GSV_DATA_T &sentenseData)
 Places a copy of the GPGSV data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetGPGSA (CNMEAParserData::GSA_DATA_T &sentenseData)
 Places a copy of the GPGSA data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetGPRMC (CNMEAParserData::RMC_DATA_T &sentenseData)
 Places a copy of the GPRMC data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetGNGSA (CNMEAParserData::GSA_DATA_T &sentenseData)
 Places a copy of the GNGSA data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetGLGSV (CNMEAParserData::GSV_DATA_T &sentenseData)
 Places a copy of the GLGSV data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetGLGSA (CNMEAParserData::GSA_DATA_T &sentenseData)
 Places a copy of the GLGSA data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetQZGSV (CNMEAParserData::GSV_DATA_T &sentenseData)
 Places a copy of the QZGSV data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetQZGSA (CNMEAParserData::GSA_DATA_T &sentenseData)
 Places a copy of the QZGSA data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetBDGSV (CNMEAParserData::GSV_DATA_T &sentenseData)
 Places a copy of the BDGSV data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetBDGSA (CNMEAParserData::GSA_DATA_T &sentenseData)
 Places a copy of the QZGSA data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetGAGGA (CNMEAParserData::GGA_DATA_T &sentenseData)
 Places a copy of the GAGGA data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetGAGSA (CNMEAParserData::GSA_DATA_T &sentenseData)
 Places a copy of the GAGSA data into sentenseData. More...
 
CNMEAParserData::ERROR_E GetGARMC (CNMEAParserData::RMC_DATA_T &sentenseData)
 Places a copy of the GARMC data into sentenseData. More...
 
- Public Member Functions inherited from CNMEAParserPacket
 CNMEAParserPacket ()
 
 ~CNMEAParserPacket ()
 
CNMEAParserData::ERROR_E ProcessNMEABuffer (char *pData, size_t nBufferSize)
 Parses pData for NMEA data. More...
 
void Reset (void)
 Reset the parser. More...
 
virtual void OnError (CNMEAParserData::ERROR_E nError, char *pCmd)
 This method is called whenever there is a parsing error. More...
 

Protected Member Functions

virtual CNMEAParserData::ERROR_E ProcessRxCommand (char *pCmd, char *pData)
 This method is redefined from CNMEAParserPacket::ProcessRxCommand(char *pCmd, char *pData) More...
 
virtual void DataAccessSemaphoreLock (void)
 This method will invoke a semaphore lock (mutex) for data access. More...
 
virtual void DataAccessSemaphoreUnlock (void)
 This method will invoke a semaphore unlock (mutex) for data access. More...
 
- Protected Member Functions inherited from CNMEAParserPacket
virtual void TimeTag (void)
 This method is called when receiving the start of message of the NMEA packet. More...
 

Private Attributes

CNMEASentenceGGA m_GPGGA
 GPGGA Specific sentence data. More...
 
CNMEASentenceGSV m_GPGSV
 GPGSV Satellite message (GPS) More...
 
CNMEASentenceGSA m_GPGSA
 GPGSA GNSS DOP and active satellites. More...
 
CNMEASentenceRMC m_GPRMC
 GPRMC Recommended minimum data for GPS. More...
 
CNMEASentenceGGA m_GAGGA
 GAGGA Specific sentence data. More...
 
CNMEASentenceGSA m_GAGSA
 GAGSA GNSS DOP and active satellites. More...
 
CNMEASentenceRMC m_GARMC
 GARMC Recommended minimum data for GPS. More...
 
CNMEASentenceGSA m_GNGSA
 GNGSA GNSS DOP and active satellites (usually GPS and GLONASS but can be GLONASS only) More...
 
CNMEASentenceGSV m_GLGSV
 GLGSV Satellite message (GLONASS) More...
 
CNMEASentenceGSA m_GLGSA
 GLGSA GNSS DOP and active satellites. More...
 
CNMEASentenceGSV m_QZGSV
 QZGSV Satellite message (BeiDou) More...
 
CNMEASentenceGSA m_QZGSA
 QZGSA GNSS DOP and active satellites. More...
 
CNMEASentenceGSV m_BDGSV
 BDGSV Satellite message (QZSS) More...
 
CNMEASentenceGSA m_BDGSA
 BDGSA GNSS DOP and active satellites. More...
 

Detailed Description

This class will parse NMEA data, store its data and report that it has received data.

Definition at line 42 of file NMEAParser.h.

Constructor & Destructor Documentation

◆ CNMEAParser()

CNMEAParser::CNMEAParser ( )

Definition at line 29 of file NMEAParser.cpp.

◆ ~CNMEAParser()

CNMEAParser::~CNMEAParser ( )
virtual

Definition at line 34 of file NMEAParser.cpp.

Member Function Documentation

◆ DataAccessSemaphoreLock()

virtual void CNMEAParser::DataAccessSemaphoreLock ( void  )
inlineprotectedvirtual

This method will invoke a semaphore lock (mutex) for data access.

Redefine this method if you will be access this class from different threads.

Definition at line 188 of file NMEAParser.h.

◆ DataAccessSemaphoreUnlock()

virtual void CNMEAParser::DataAccessSemaphoreUnlock ( void  )
inlineprotectedvirtual

This method will invoke a semaphore unlock (mutex) for data access.

Redefine this method if you will be access this class from different threads.

Definition at line 195 of file NMEAParser.h.

◆ GetBDGSA()

CNMEAParserData::ERROR_E CNMEAParser::GetBDGSA ( CNMEAParserData::GSA_DATA_T sentenseData)

Places a copy of the QZGSA data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSA object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 146 of file NMEAParser.cpp.

◆ GetBDGSV()

CNMEAParserData::ERROR_E CNMEAParser::GetBDGSV ( CNMEAParserData::GSV_DATA_T sentenseData)

Places a copy of the BDGSV data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSV object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 138 of file NMEAParser.cpp.

◆ GetGAGGA()

CNMEAParserData::ERROR_E CNMEAParser::GetGAGGA ( CNMEAParserData::GGA_DATA_T sentenseData)

Places a copy of the GAGGA data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGGA object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 154 of file NMEAParser.cpp.

◆ GetGAGSA()

CNMEAParserData::ERROR_E CNMEAParser::GetGAGSA ( CNMEAParserData::GSA_DATA_T sentenseData)

Places a copy of the GAGSA data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSA object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 162 of file NMEAParser.cpp.

◆ GetGARMC()

CNMEAParserData::ERROR_E CNMEAParser::GetGARMC ( CNMEAParserData::RMC_DATA_T sentenseData)

Places a copy of the GARMC data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSA object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 170 of file NMEAParser.cpp.

◆ GetGLGSA()

CNMEAParserData::ERROR_E CNMEAParser::GetGLGSA ( CNMEAParserData::GSA_DATA_T sentenseData)

Places a copy of the GLGSA data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSA object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 114 of file NMEAParser.cpp.

◆ GetGLGSV()

CNMEAParserData::ERROR_E CNMEAParser::GetGLGSV ( CNMEAParserData::GSV_DATA_T sentenseData)

Places a copy of the GLGSV data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSV object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 106 of file NMEAParser.cpp.

◆ GetGNGSA()

CNMEAParserData::ERROR_E CNMEAParser::GetGNGSA ( CNMEAParserData::GSA_DATA_T sentenseData)

Places a copy of the GNGSA data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSA object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 98 of file NMEAParser.cpp.

◆ GetGPGGA()

CNMEAParserData::ERROR_E CNMEAParser::GetGPGGA ( CNMEAParserData::GGA_DATA_T sentenseData)

Places a copy of the GPGGA data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGGA object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 66 of file NMEAParser.cpp.

◆ GetGPGSA()

CNMEAParserData::ERROR_E CNMEAParser::GetGPGSA ( CNMEAParserData::GSA_DATA_T sentenseData)

Places a copy of the GPGSA data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSA object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 82 of file NMEAParser.cpp.

◆ GetGPGSV()

CNMEAParserData::ERROR_E CNMEAParser::GetGPGSV ( CNMEAParserData::GSV_DATA_T sentenseData)

Places a copy of the GPGSV data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSV object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 74 of file NMEAParser.cpp.

◆ GetGPRMC()

CNMEAParserData::ERROR_E CNMEAParser::GetGPRMC ( CNMEAParserData::RMC_DATA_T sentenseData)

Places a copy of the GPRMC data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSA object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 90 of file NMEAParser.cpp.

◆ GetQZGSA()

CNMEAParserData::ERROR_E CNMEAParser::GetQZGSA ( CNMEAParserData::GSA_DATA_T sentenseData)

Places a copy of the QZGSA data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSA object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 130 of file NMEAParser.cpp.

◆ GetQZGSV()

CNMEAParserData::ERROR_E CNMEAParser::GetQZGSV ( CNMEAParserData::GSV_DATA_T sentenseData)

Places a copy of the QZGSV data into sentenseData.

Parameters
sentenseDatareference to a CNMEASentenceGSV object to place the data into.
Returns
Returns ERROR_OK if successful.

Definition at line 122 of file NMEAParser.cpp.

◆ ProcessRxCommand()

CNMEAParserData::ERROR_E CNMEAParser::ProcessRxCommand ( char *  pCmd,
char *  pData 
)
protectedvirtual

This method is redefined from CNMEAParserPacket::ProcessRxCommand(char *pCmd, char *pData)

Parameters
pCmdPointer to the NMEA command string
pDataComma separated data that belongs to the command
Returns
Returns CNMEAParserData::ERROR_OK If successful

Implements CNMEAParserPacket.

Definition at line 178 of file NMEAParser.cpp.

◆ ResetData()

void CNMEAParser::ResetData ( void  )

Resets or clears all NMEA data to a known default value.

Definition at line 38 of file NMEAParser.cpp.

Member Data Documentation

◆ m_BDGSA

CNMEASentenceGSA CNMEAParser::m_BDGSA
private

BDGSA GNSS DOP and active satellites.

Definition at line 64 of file NMEAParser.h.

◆ m_BDGSV

CNMEASentenceGSV CNMEAParser::m_BDGSV
private

BDGSV Satellite message (QZSS)

Definition at line 63 of file NMEAParser.h.

◆ m_GAGGA

CNMEASentenceGGA CNMEAParser::m_GAGGA
private

GAGGA Specific sentence data.

Definition at line 51 of file NMEAParser.h.

◆ m_GAGSA

CNMEASentenceGSA CNMEAParser::m_GAGSA
private

GAGSA GNSS DOP and active satellites.

Definition at line 52 of file NMEAParser.h.

◆ m_GARMC

CNMEASentenceRMC CNMEAParser::m_GARMC
private

GARMC Recommended minimum data for GPS.

Definition at line 53 of file NMEAParser.h.

◆ m_GLGSA

CNMEASentenceGSA CNMEAParser::m_GLGSA
private

GLGSA GNSS DOP and active satellites.

Definition at line 58 of file NMEAParser.h.

◆ m_GLGSV

CNMEASentenceGSV CNMEAParser::m_GLGSV
private

GLGSV Satellite message (GLONASS)

Definition at line 57 of file NMEAParser.h.

◆ m_GNGSA

CNMEASentenceGSA CNMEAParser::m_GNGSA
private

GNGSA GNSS DOP and active satellites (usually GPS and GLONASS but can be GLONASS only)

Definition at line 55 of file NMEAParser.h.

◆ m_GPGGA

CNMEASentenceGGA CNMEAParser::m_GPGGA
private

GPGGA Specific sentence data.

Definition at line 46 of file NMEAParser.h.

◆ m_GPGSA

CNMEASentenceGSA CNMEAParser::m_GPGSA
private

GPGSA GNSS DOP and active satellites.

Definition at line 48 of file NMEAParser.h.

◆ m_GPGSV

CNMEASentenceGSV CNMEAParser::m_GPGSV
private

GPGSV Satellite message (GPS)

Definition at line 47 of file NMEAParser.h.

◆ m_GPRMC

CNMEASentenceRMC CNMEAParser::m_GPRMC
private

GPRMC Recommended minimum data for GPS.

Definition at line 49 of file NMEAParser.h.

◆ m_QZGSA

CNMEASentenceGSA CNMEAParser::m_QZGSA
private

QZGSA GNSS DOP and active satellites.

Definition at line 61 of file NMEAParser.h.

◆ m_QZGSV

CNMEASentenceGSV CNMEAParser::m_QZGSV
private

QZGSV Satellite message (BeiDou)

Definition at line 60 of file NMEAParser.h.


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