Public Member Functions | Static Public Attributes | Private Attributes | List of all members
GpggaParser Class Reference

Derived class for parsing GGA messages. More...

#include <gpgga.hpp>

Inheritance diagram for GpggaParser:
Inheritance graph
[legend]

Public Member Functions

const std::string getMessageID () const override
 Returns the ASCII message ID, here "$GPGGA". More...
 
 GpggaParser ()
 Constructor of the class GpggaParser. More...
 
GpggaMsg parseASCII (const NMEASentence &sentence, const std::string &frame_id, bool use_gnss_time, Timestamp time_obj) noexcept(false) override
 Parses one GGA message. More...
 
bool wasLastGPGGAValid () const
 Tells us whether the last GGA message was valid or not. More...
 
- Public Member Functions inherited from BaseParser< GpggaMsg >
 BaseParser ()=default
 Default constructor of the class BaseParser. More...
 
virtual const std::string getMessageID () const=0
 Returns the ASCII message name. More...
 
virtual ~BaseParser ()=default
 Default destructor of the class BaseParser. More...
 

Static Public Attributes

static const std::string MESSAGE_ID = "$GPGGA"
 Declares the string MESSAGE_ID. More...
 

Private Attributes

bool was_last_gpgga_valid_
 Declares a boolean representing whether or not the last GPGGA message was valid. More...
 

Detailed Description

Derived class for parsing GGA messages.

Date
13/08/20

Definition at line 76 of file gpgga.hpp.

Constructor & Destructor Documentation

◆ GpggaParser()

GpggaParser::GpggaParser ( )
inline

Constructor of the class GpggaParser.

Definition at line 82 of file gpgga.hpp.

Member Function Documentation

◆ getMessageID()

const std::string GpggaParser::getMessageID ( ) const
override

Returns the ASCII message ID, here "$GPGGA".

Returns
The message ID

Definition at line 41 of file gpgga.cpp.

◆ parseASCII()

GpggaMsg GpggaParser::parseASCII ( const NMEASentence sentence,
const std::string &  frame_id,
bool  use_gnss_time,
Timestamp  time_obj 
)
overridevirtualnoexcept

Parses one GGA message.

Parameters
[in]sentenceThe GGA message to be parsed
Returns
A ROS message pointer of ROS type GpggaMsg

Caution: Due to the occurrence of the throw keyword, this method parseASCII should be called within a try / catch framework... Note: This method is called from within the read() method of the RxMessage class by including the checksum part in the argument "sentence" here, though the checksum is never parsed: It would be sentence.get_body()[15] if anybody ever needs it.

Reimplemented from BaseParser< GpggaMsg >.

Definition at line 53 of file gpgga.cpp.

◆ wasLastGPGGAValid()

bool GpggaParser::wasLastGPGGAValid ( ) const

Tells us whether the last GGA message was valid or not.

Returns
True if last GGA message was valid, false if not

Definition at line 156 of file gpgga.cpp.

Member Data Documentation

◆ MESSAGE_ID

const std::string GpggaParser::MESSAGE_ID = "$GPGGA"
static

Declares the string MESSAGE_ID.

Definition at line 108 of file gpgga.hpp.

◆ was_last_gpgga_valid_

bool GpggaParser::was_last_gpgga_valid_
private

Declares a boolean representing whether or not the last GPGGA message was valid.

Definition at line 115 of file gpgga.hpp.


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


septentrio_gnss_driver
Author(s): Tibor Dome
autogenerated on Wed Nov 22 2023 04:04:28