Orocos Real-Time Toolkit  2.9.0
FileDescriptorActivityInterface.hpp
Go to the documentation of this file.
1 /***************************************************************************
2 
3  ***************************************************************************
4  * This library is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public *
6  * License as published by the Free Software Foundation; *
7  * version 2 of the License. *
8  * *
9  * As a special exception, you may use this file as part of a free *
10  * software library without restriction. Specifically, if other files *
11  * instantiate templates or use macros or inline functions from this *
12  * file, or you compile this file and link it with other files to *
13  * produce an executable, this file does not by itself cause the *
14  * resulting executable to be covered by the GNU General Public *
15  * License. This exception does not however invalidate any other *
16  * reasons why the executable file might be covered by the GNU General *
17  * Public License. *
18  * *
19  * This library is distributed in the hope that it will be useful, *
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22  * Lesser General Public License for more details. *
23  * *
24  * You should have received a copy of the GNU General Public *
25  * License along with this library; if not, write to the Free Software *
26  * Foundation, Inc., 59 Temple Place, *
27  * Suite 330, Boston, MA 02111-1307 USA *
28  * *
29  ***************************************************************************/
30 
31 #ifndef FILEDESCRIPTOR_ACTIVITY_INTERFACE_HPP
32 #define FILEDESCRIPTOR_ACTIVITY_INTERFACE_HPP
33 
34 #include "../Activity.hpp"
35 #include <set>
36 
37 namespace RTT { namespace extras {
38 
96  {
97  public:
99 
106  virtual void watch(int fd) = 0;
107 
114  virtual void unwatch(int fd) = 0;
115 
117  virtual void clearAllWatches() = 0;
118 
123  virtual bool isWatched(int fd) const = 0;
124 
133  virtual bool isUpdated(int fd) const = 0;
134 
142  virtual bool hasTimeout() const = 0;
143 
151  virtual bool hasError() const = 0;
152 
160  virtual void setTimeout(int timeout) = 0;
161 
169  virtual void setTimeout_us(int timeout_us) = 0;
170 
176  virtual int getTimeout() const = 0;
177 
183  virtual int getTimeout_us() const = 0;
184  };
185 }}
186 
187 #endif
#define RTT_API
Definition: rtt-config.h:97
An activity which is triggered by the availability of data on a set of file descriptors.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:52