MRPT
1.9.9
|
Interface class for protocol handlers.
Describes the interfaces of the protocol handling classes. The protocol handlers are used to convert a binary data stream into XsMessage objects.
Definition at line 22 of file iprotocolhandler.h.
#include <xSens_MT4/xcommunication/include/xsens/iprotocolhandler.h>
Public Member Functions | |
virtual | ~IProtocolHandler () |
Destructor. More... | |
virtual MessageLocation | findMessage (XsMessage &rcv, const XsByteArray &raw) const =0 |
Find the first message in the raw byte stream. More... | |
virtual int | minimumMessageSize () const =0 |
Returns the minimum size of a valid message. More... | |
virtual int | maximumMessageSize () const =0 |
Returns the maximum size of a valid message. More... | |
virtual int | type () const =0 |
Returns the type of the protocol handler. More... | |
|
inlinevirtual |
Destructor.
Definition at line 26 of file iprotocolhandler.h.
|
pure virtual |
Find the first message in the raw byte stream.
This function scans raw for a sequence of bytes that it can convert into an XsMessage object. 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:
rcv | If a message is read, it will be put in this object. |
raw | The raw byte stream to analyze. |
Implemented in ProtocolHandler.
|
pure virtual |
Returns the maximum size of a valid message.
This value may differ for different protocols.
Implemented in ProtocolHandler.
|
pure virtual |
Returns the minimum size of a valid message.
This value may differ for different protocols, but is always at least 1.
Implemented in ProtocolHandler.
|
pure virtual |
Returns the type of the protocol handler.
Each protocol handler has a locally unique id that can be used for instantiation of the correct protocol handler.
Implemented in ProtocolHandler.
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019 |