Main MRPT website > C++ reference for MRPT 1.9.9
streaminterface.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 STREAMINTERFACE_H
10 #define STREAMINTERFACE_H
11 
12 #include "iointerface.h"
13 
14 enum XsResultValue;
15 
16 /*! \brief A stream interface
17  \details This class provides an interface for dealing with streaming I/O
18  devices, such as a COM
19  port or a USB port.
20 */
22 {
23  public:
24  /*! \brief Destroy the stream interface
25  */
26  inline ~StreamInterface() {}
27  /*! \brief Set the read/write timeout to \a ms
28  A timeout of 0 means non-blocking operation of writeData() and
29  readData().
30  */
31  virtual XsResultValue setTimeout(uint32_t ms) = 0;
32 
33  /*! \brief The timeout used for read/write operations
34  */
35  virtual uint32_t getTimeout(void) const = 0;
36 
38  protected:
39  /*! \brief Create a stream interface
40  */
41  inline StreamInterface() {}
42 };
43 
44 #endif // file guard
StreamInterface::setTimeout
virtual XsResultValue setTimeout(uint32_t ms)=0
Set the read/write timeout to ms A timeout of 0 means non-blocking operation of writeData() and readD...
iointerface.h
XsResultValue
XsResultValue
Xsens result values.
Definition: xsresultvalue.h:27
StreamInterface::getTimeout
virtual uint32_t getTimeout(void) const =0
The timeout used for read/write operations.
StreamInterface
A stream interface.
Definition: streaminterface.h:21
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
IoInterface
An abstract IO interface.
Definition: iointerface.h:42
StreamInterface::StreamInterface
StreamInterface()
Create a stream interface.
Definition: streaminterface.h:41
StreamInterface::~StreamInterface
~StreamInterface()
Destroy the stream interface.
Definition: streaminterface.h:26
uint32_t
unsigned __int32 uint32_t
Definition: rptypes.h:47



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