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
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:27
#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:47



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020