The protocol handler for a different NMEA data types. More...
#include <nmea_protocolhandler.h>
Public Member Functions | |
XsMessage | convertToMessage (MessageLocation &location, const XsByteArray &raw) const override |
Converts raw data using location into a XsMessage object. More... | |
MessageLocation | findMessage (XsProtocolType &type, const XsByteArray &raw) const override |
Find the first message in the raw byte stream. More... | |
int | maximumMessageSize () const override |
int | minimumMessageSize () const override |
ProtocolHandler () | |
Default constructor. More... | |
int | type () const override |
virtual | ~ProtocolHandler () throw () |
Deafult destructor. More... | |
![]() | |
virtual void | ignoreMaximumMessageSize (bool ignore) |
Tells the protocol handler to ignore/expand its maximum message size. More... | |
virtual bool | setEnable (bool enable) |
Enables or disables the protocol handler if supported. A disabled protocol handler ignores and discards all data provided through the findMessage function. More... | |
virtual | ~IProtocolHandler () |
Destructor. More... | |
Static Private Attributes | |
static const int | MAXIMUM_MESSAGE_SIZE = 128 |
static const int | MINIMUM_MESSAGE_SIZE = 16 |
The protocol handler for a different NMEA data types.
Definition at line 76 of file nmea_protocolhandler.h.
ProtocolHandler::ProtocolHandler | ( | ) |
Default constructor.
Definition at line 84 of file nmea_protocolhandler.cpp.
|
virtual |
Deafult destructor.
Definition at line 90 of file nmea_protocolhandler.cpp.
|
overridevirtual |
Converts raw data using location into a XsMessage object.
location | The location of a message to convert from raw data. |
raw | The raw byte stream. |
Implements IProtocolHandler.
Definition at line 151 of file nmea_protocolhandler.cpp.
|
overridevirtual |
Find the first message in the raw byte stream.
This function scans raw for a sequence of bytes that can contain a full message. It returns the location and total byte size of the message so that the caller can remove those bytes from the stream. The return value can also describe that a partial message has been found. Return values:
type | The protocol type that was used. |
raw | The raw byte stream to analyze. |
Implements IProtocolHandler.
Definition at line 96 of file nmea_protocolhandler.cpp.
|
overridevirtual |
Implements IProtocolHandler.
Definition at line 167 of file nmea_protocolhandler.cpp.
|
overridevirtual |
Implements IProtocolHandler.
Definition at line 160 of file nmea_protocolhandler.cpp.
|
overridevirtual |
Implements IProtocolHandler.
Definition at line 173 of file nmea_protocolhandler.cpp.
|
staticprivate |
Definition at line 90 of file nmea_protocolhandler.h.
|
staticprivate |
Definition at line 89 of file nmea_protocolhandler.h.