DUNE: Uniform Navigational Environment
2016.09.0
|
NMEA Sentence reader is a simple NMEA parser capable of validating and converting sentence fields.
Public Member Functions | |
NMEAReader (const std::string &sentence) | |
~NMEAReader (void) | |
const char * | code (void) const |
NMEAReader & | skip (void) |
NMEAReader & | operator>> (bool &value) |
NMEAReader & | operator>> (int &value) |
NMEAReader & | operator>> (unsigned &value) |
NMEAReader & | operator>> (float &value) |
NMEAReader & | operator>> (double &value) |
NMEAReader & | operator>> (std::string &value) |
bool | eos (void) |
DUNE::Parsers::NMEAReader::NMEAReader | ( | const std::string & | sentence | ) |
Construct a NMEA Reader object.
The code of the sentence (ie. first field of the sentence, next to the dollar sign) will be extracted and accessible through the code() member function. If the sentence contains a checksum it will be validated.
sentence | string with NMEA sentence. |
DUNE::Parsers::NMEAReader::~NMEAReader | ( | void | ) |
Destructor.
|
inline |
Retrieve sentence code.
bool DUNE::Parsers::NMEAReader::eos | ( | void | ) |
Check if we reached the end of sentence and there are no more fields to extract.
NMEAReader & DUNE::Parsers::NMEAReader::operator>> | ( | bool & | value | ) |
Convert the next field in the input stream to boolean.
value | output variable. |
NMEAReader & DUNE::Parsers::NMEAReader::operator>> | ( | int & | value | ) |
Convert the next field in the input stream to integer.
value | output variable. |
NMEAReader & DUNE::Parsers::NMEAReader::operator>> | ( | unsigned & | value | ) |
Convert the next field in the input stream to unsigned integer.
value | output variable. |
NMEAReader & DUNE::Parsers::NMEAReader::operator>> | ( | float & | value | ) |
Convert the next field in the input stream to float.
value | output variable. |
NMEAReader & DUNE::Parsers::NMEAReader::operator>> | ( | double & | value | ) |
Convert the next field in the input stream to double.
value | output variable. |
NMEAReader & DUNE::Parsers::NMEAReader::operator>> | ( | std::string & | value | ) |
Read the next field in the input stream verbatim.
value | output variable. |
NMEAReader & DUNE::Parsers::NMEAReader::skip | ( | void | ) |
Skip the next field in the input stream.