Orocos Real-Time Toolkit  2.9.0
AxisInterface.hpp
Go to the documentation of this file.
1 /***************************************************************************
2 
3  AxisInterface.hpp - description
4  -------------------
5  begin : Thu October 21 2004
6  copyright : (C) 2002 Johan Rutgeerts
7  email : Johan.Rutgeerts@mech.kuleuven.be
8 
9  ***************************************************************************
10  * This library is free software; you can redistribute it and/or *
11  * modify it under the terms of the GNU Lesser General Public *
12  * License as published by the Free Software Foundation; either *
13  * version 2.1 of the License, or (at your option) any later version. *
14  * *
15  * This library is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18  * Lesser General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU Lesser General Public *
21  * License along with this library; if not, write to the Free Software *
22  * Foundation, Inc., 59 Temple Place, *
23  * Suite 330, Boston, MA 02111-1307 USA *
24  * *
25  ***************************************************************************/
26 
27 #ifndef _AXISINTERFACE_HPP
28 #define _AXISINTERFACE_HPP
29 
30 #include "SensorInterface.hpp"
31 #include "DigitalInput.hpp"
32 #include "DigitalOutput.hpp"
33 #include "../../rtt-config.h"
34 #include <string>
35 #include <vector>
36 
37 namespace RTT
38 { namespace dev {
39 
46  {
47  public:
48 
50  virtual ~AxisInterface() {};
51 
56  virtual bool stop() = 0;
57 
62  virtual bool lock() = 0;
63 
68  virtual bool unlock() = 0;
69 
73  virtual bool drive( double v ) = 0;
74 
78  virtual double getDriveValue() const = 0;
79 
83  virtual bool isLocked() const = 0;
84 
88  virtual bool isStopped() const = 0;
89 
93  virtual bool isDriven() const = 0;
94 
98  virtual DigitalOutput* getBrake() = 0;
99 
103  virtual DigitalOutput* getEnable() = 0;
104 
108  virtual SensorInterface<double>* getSensor(const std::string& name) const = 0;
109 
113  virtual std::vector<std::string> sensorList() const = 0;
114 
118  virtual DigitalInput* getSwitch(const std::string& name) const = 0;
119 
123  virtual std::vector<std::string> switchList() const = 0;
124 
128  virtual SensorInterface<int>* getCounter(const std::string& name) const = 0;
129 
133  virtual std::vector<std::string> counterList() const = 0;
134 
135  };
136 
137 
138 }} // namespace RTT
139 
140 #endif //_AXISINTERFACE_HPP
141 
A class representing a switch which can be on or off.
#define RTT_API
Definition: rtt-config.h:97
A DigitalOut represents any on/off output.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
Definition: Activity.cpp:52
The AxisInterface represents an axis from a control point of view.
An interface that describes a general sensor You can read a value/structure.
Definition: rtt-dev-fwd.hpp:61