Main MRPT website > C++ reference for MRPT 1.5.6
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 int minimumMessageSize() const
Returns the minimum size of a valid message of this protocol including preambles and checksums...
virtual ~ProtocolHandler()
Destructor.
virtual int type() const
Returns the type of the protocol handler.
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.
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...
Message protocol handling class.
virtual int maximumMessageSize() const
Returns the maximum size of a valid message of this protocol including preambles and checksums...
ProtocolHandler()
Default constructor.
Interface class for protocol handlers.



Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018