#include <ossimNmeaMessage.h>
Definition at line 26 of file ossimNmeaMessage.h.
◆ FieldListType
◆ ossimNmeaMessage()
ossimNmeaMessage::ossimNmeaMessage |
( |
const std::string & |
acceptedStartingCharacters = "!$" | ) |
|
|
inline |
◆ checksum()
ossim_uint32 ossimNmeaMessage::checksum |
( |
std::string::const_iterator |
start, |
|
|
std::string::const_iterator |
end |
|
) |
| |
|
static |
Definition at line 18 of file ossimNmeaMessage.cpp.
22 while(start!=end&&((*start)!=
'*'))
24 sum ^= ((*start)%128);
unsigned int ossim_uint32
◆ getField()
const std::string& ossimNmeaMessage::getField |
( |
ossim_uint32 |
idx | ) |
|
|
inline |
◆ isValidStartChar()
bool ossimNmeaMessage::isValidStartChar |
( |
char |
c | ) |
const |
|
protected |
◆ message()
const std::string& ossimNmeaMessage::message |
( |
| ) |
const |
|
inline |
◆ numberOfFields()
◆ operator[]()
const std::string& ossimNmeaMessage::operator[] |
( |
int |
idx | ) |
const |
|
inline |
◆ parseMessage()
void ossimNmeaMessage::parseMessage |
( |
std::istream & |
in | ) |
|
throw | ( | ossimException |
| ) | | |
|
virtual |
Parses a standard formatted NMEA message.
No exceptions are created for checksums. The checksum needs to be checked after parsing by calling validCheckSum().
Definition at line 60 of file ossimNmeaMessage.cpp.
References ossimString::downcase(), and ossim::skipws().
Referenced by ossimNmeaMessageSequencer::next().
72 char c =
static_cast<char>(in.get());
73 while(((c!=
'\n')&&(c!=
'\r'))&&
77 c =
static_cast<char>(in.get());
86 out << std::setw(2) << std::setfill(
'0') << std::hex << check;
87 std::string::iterator endChecksumIter = iter+1;
88 while((endChecksumIter!=
m_message.end())&&(*endChecksumIter!=
',')) ++endChecksumIter;
96 throw ossimException(
"Terminating * indicator for cbecksum not found in NMEA message format");
static ossim_uint32 checksum(std::string::const_iterator start, std::string::const_iterator end)
bool isValidStartChar(char c) const
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
OSSIM_DLL std::istream & skipws(std::istream &in)
unsigned int ossim_uint32
static ossimString downcase(const ossimString &aString)
virtual void setFields(std::string::const_iterator start, std::string::const_iterator end)
◆ reset()
virtual void ossimNmeaMessage::reset |
( |
void |
| ) |
|
|
inlinevirtual |
◆ setFields()
void ossimNmeaMessage::setFields |
( |
std::string::const_iterator |
start, |
|
|
std::string::const_iterator |
end |
|
) |
| |
|
protectedvirtual |
◆ setStartChars()
void ossimNmeaMessage::setStartChars |
( |
const std::string & |
acceptedStartingCharacters = "!$" | ) |
|
|
inline |
◆ valid()
virtual bool ossimNmeaMessage::valid |
( |
| ) |
const |
|
inlinevirtual |
◆ validCheckSum()
bool ossimNmeaMessage::validCheckSum |
( |
| ) |
const |
|
inline |
◆ m_fields
◆ m_message
std::string ossimNmeaMessage::m_message |
|
protected |
◆ m_startChars
std::string ossimNmeaMessage::m_startChars |
|
protected |
◆ m_validCheckSum
bool ossimNmeaMessage::m_validCheckSum |
|
protected |
The documentation for this class was generated from the following files: