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



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019