Main MRPT website > C++ reference for MRPT 1.5.6
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-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 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 devices, such as a COM
18  port or a USB port.
19 */
21 {
22 public:
23  /*! \brief Destroy the stream interface
24  */
25  inline ~StreamInterface() {}
26 
27  /*! \brief Set the read/write timeout to \a ms
28  A timeout of 0 means non-blocking operation of writeData() and readData().
29  */
30  virtual XsResultValue setTimeout (uint32_t ms) = 0;
31 
32  /*! \brief The timeout used for read/write operations
33  */
34  virtual uint32_t getTimeout (void) const = 0;
35 
37 protected:
38  /*! \brief Create a stream interface
39  */
40  inline StreamInterface() {}
41 };
42 
43 #endif // file guard
44 
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...
A stream interface.
virtual uint32_t getTimeout(void) const =0
The timeout used for read/write operations.
XsResultValue
Xsens result values.
Definition: xsresultvalue.h:26
#define XSENS_DISABLE_COPY(className)
Add this macro to the start of a class definition to prevent automatic creation of copy functions...
StreamInterface()
Create a stream interface.
~StreamInterface()
Destroy the stream interface.
An abstract IO interface.
Definition: iointerface.h:42
unsigned __int32 uint32_t
Definition: rptypes.h:49



Page generated by Doxygen 1.8.14 for MRPT 1.5.6 Git: 4c65e8431 Tue Apr 24 08:18:17 2018 +0200 at lun oct 28 01:35:26 CET 2019