MRPT  1.9.9
protocolhandler.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef PROTOCOLHANDLER_H
10 #define PROTOCOLHANDLER_H
11 
12 #include "iprotocolhandler.h"
13 #include "xcommunicationconfig.h"
14 
15 //--------------------------------------------------------------------------------
16 class ProtocolHandler : public virtual IProtocolHandler
17 {
18  public:
20  ~ProtocolHandler() override;
21 
23  XsMessage& rcv, const XsByteArray& raw) const override;
24  int minimumMessageSize() const override;
25  int maximumMessageSize() const override;
26  int type() const override;
27  static int composeMessage(XsByteArray& raw, const XsMessage& msg);
28 
30 };
31 
32 //--------------------------------------------------------------------------------
33 
34 #endif // file guard
struct XsByteArray XsByteArray
Definition: xsbytearray.h:26
int minimumMessageSize() const override
Returns the minimum size of a valid message of this protocol including preambles and checksums...
~ProtocolHandler() override
Destructor.
Stores the location of a message in a buffer using a start position and a size.
Structure for storing a single message.
Definition: xsmessage.h:202
MessageLocation findMessage(XsMessage &rcv, const XsByteArray &raw) const override
Find the first message in the raw byte stream.
int type() const override
Returns the type of the protocol handler.
static int composeMessage(XsByteArray &raw, const XsMessage &msg)
Compose a message for transmission.
#define XSENS_DISABLE_COPY(className)
Add this macro to the start of a class definition to prevent automatic creation of copy functions...
int maximumMessageSize() const override
Returns the maximum size of a valid message of this protocol including preambles and checksums...
Message protocol handling class.
ProtocolHandler()
Default constructor.
Interface class for protocol handlers.



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