ROSaic
Public Member Functions | Protected Attributes
NMEASentence Class Reference

Struct to split an NMEA sentence into its ID and its body, the latter tokenized into a vector of strings. More...

#include <nmea_sentence.hpp>

Collaboration diagram for NMEASentence:
Collaboration graph
[legend]

Public Member Functions

 NMEASentence (std::string id, std::vector< std::string > body)
 
std::vector< std::string > get_body () const
 

Protected Attributes

std::string id_
 
std::vector< std::string > body_
 

Detailed Description

Struct to split an NMEA sentence into its ID and its body, the latter tokenized into a vector of strings.

By ID, we mean either a standardized ID, e.g. "$GPGGA", or proprietary ID such as "$PSSN,HRP". The STL Container Vector can be used to dynamically allocate arrays (C++ feature). Also note that the ID of !all! (not just those defined by Septentrio) proprietary NMEA messages starts with "$P". The body_ member variable shall exclude the NMEA checksum (also hinted at in files that implement the parsing).

Definition at line 53 of file nmea_sentence.hpp.

Constructor & Destructor Documentation

◆ NMEASentence()

NMEASentence::NMEASentence ( std::string  id,
std::vector< std::string >  body 
)
inline

Definition at line 56 of file nmea_sentence.hpp.

56 : id_(id), body_(body) {}
std::vector< std::string > body_
std::string id_

Member Function Documentation

◆ get_body()

std::vector<std::string> NMEASentence::get_body ( ) const
inline

Definition at line 57 of file nmea_sentence.hpp.

References body_.

57 {return body_;}
std::vector< std::string > body_

Field Documentation

◆ body_

std::vector<std::string> NMEASentence::body_
protected

Definition at line 60 of file nmea_sentence.hpp.

Referenced by get_body().

◆ id_

std::string NMEASentence::id_
protected

Definition at line 59 of file nmea_sentence.hpp.


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