DUNE: Uniform Navigational Environment  2019.02.0
DUNE::Parsers::NMEAWriter Class Reference

Detailed Description

NMEA Writer.

Public Member Functions

 NMEAWriter (const std::string &code)
 
NMEAWriteroperator<< (const bool &value)
 
NMEAWriteroperator<< (const int &value)
 
NMEAWriteroperator<< (const unsigned &value)
 
NMEAWriteroperator<< (const double &value)
 
NMEAWriteroperator<< (const char *value)
 
NMEAWriteroperator<< (const std::string &value)
 
std::string sentence (void)
 

Constructor & Destructor Documentation

DUNE::Parsers::NMEAWriter::NMEAWriter ( const std::string &  code)

Initialize a NMEA sentence of type code.

Parameters
codesentence type (without the $, eg. GPGGA)

Member Function Documentation

NMEAWriter & DUNE::Parsers::NMEAWriter::operator<< ( const bool &  value)

Append a boolean to the current sentence.

Parameters
valueboolean to be appended.
Returns
*this.
NMEAWriter & DUNE::Parsers::NMEAWriter::operator<< ( const int &  value)

Append an integer to the current sentence.

Parameters
valueinteger to be appended.
Returns
*this.
NMEAWriter & DUNE::Parsers::NMEAWriter::operator<< ( const unsigned &  value)

Append an unsigned integer to the current sentence.

Parameters
valueunsigned integer to be appended.
Returns
*this.
NMEAWriter & DUNE::Parsers::NMEAWriter::operator<< ( const double &  value)

Append a double to the current sentence.

Parameters
valuedouble to be appended.
Returns
*this.
NMEAWriter & DUNE::Parsers::NMEAWriter::operator<< ( const char *  value)

Append a string value to the current sentence.

Parameters
valuestring to be appended.
Returns
*this.
NMEAWriter & DUNE::Parsers::NMEAWriter::operator<< ( const std::string &  value)

Append a string value to the current sentence.

Parameters
valuestring to be appended.
Returns
*this.
std::string DUNE::Parsers::NMEAWriter::sentence ( void  )

Retrieve NMEA compliant sentence with checksum and line termination.

Returns
NMEA compliant sentence.
Collaboration diagram for DUNE::Parsers::NMEAWriter:
Collaboration graph