ROSaic
Public Member Functions | Protected Attributes
rosaic_driver::NMEASentence Class Reference

Struct to split an NMEA sentence into its ID (e.g. the standardized "$GPGGA" or proprietary "$PSSN,HRP") and its body, the latter tokenized into a vector of strings. More...

#include <nmea_sentence.hpp>

Collaboration diagram for rosaic_driver::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 (e.g. the standardized "$GPGGA" or proprietary "$PSSN,HRP") and its body, the latter tokenized into a vector of strings.

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 52 of file nmea_sentence.hpp.

Constructor & Destructor Documentation

◆ NMEASentence()

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

Definition at line 55 of file nmea_sentence.hpp.

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

Member Function Documentation

◆ get_body()

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

Definition at line 56 of file nmea_sentence.hpp.

References body_.

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

Field Documentation

◆ body_

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

Definition at line 59 of file nmea_sentence.hpp.

Referenced by get_body().

◆ id_

std::string rosaic_driver::NMEASentence::id_
protected

Definition at line 58 of file nmea_sentence.hpp.


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