Main MRPT website > C++ reference for MRPT 1.9.9
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-2018, 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 
23  XsMessage& rcv, const XsByteArray& raw) const;
24  virtual int minimumMessageSize() const;
25  virtual int maximumMessageSize() const;
26  virtual int type() const;
27  static int composeMessage(XsByteArray& raw, const XsMessage& msg);
28 
30 };
31 
32 //--------------------------------------------------------------------------------
33 
34 #endif // file guard
xcommunicationconfig.h
XsByteArray
struct XsByteArray XsByteArray
Definition: xsbytearray.h:25
ProtocolHandler
Message protocol handling class.
Definition: protocolhandler.h:16
IProtocolHandler
Interface class for protocol handlers.
Definition: iprotocolhandler.h:22
iprotocolhandler.h
ProtocolHandler::findMessage
virtual MessageLocation findMessage(XsMessage &rcv, const XsByteArray &raw) const
Find the first message in the raw byte stream.
Definition: protocolhandler.cpp:67
ProtocolHandler::~ProtocolHandler
virtual ~ProtocolHandler()
Destructor.
Definition: protocolhandler.cpp:30
MessageLocation
Stores the location of a message in a buffer using a start position and a size.
Definition: messagelocation.h:15
ProtocolHandler::composeMessage
static int composeMessage(XsByteArray &raw, const XsMessage &msg)
Compose a message for transmission.
Definition: protocolhandler.cpp:211
ProtocolHandler::minimumMessageSize
virtual int minimumMessageSize() const
Returns the minimum size of a valid message of this protocol including preambles and checksums.
Definition: protocolhandler.cpp:192
ProtocolHandler::maximumMessageSize
virtual int maximumMessageSize() const
Returns the maximum size of a valid message of this protocol including preambles and checksums.
Definition: protocolhandler.cpp:199
XSENS_DISABLE_COPY
#define XSENS_DISABLE_COPY(className)
Add this macro to the start of a class definition to prevent automatic creation of copy functions.
Definition: xcommunicationconfig.h:149
XsMessage
Structure for storing a single message.
Definition: xsmessage.h:198
ProtocolHandler::ProtocolHandler
ProtocolHandler()
Default constructor.
Definition: protocolhandler.cpp:28
ProtocolHandler::type
virtual int type() const
Returns the type of the protocol handler.
Definition: protocolhandler.cpp:221



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST