AxisInterface.hpp

00001 /***************************************************************************
00002 
00003                        AxisInterface.hpp -  description
00004                           -------------------
00005    begin                : Thu October 21 2004
00006    copyright            : (C) 2002 Johan Rutgeerts
00007    email                : Johan.Rutgeerts@mech.kuleuven.be
00008 
00009    ***************************************************************************
00010    *   This library is free software; you can redistribute it and/or         *
00011    *   modify it under the terms of the GNU Lesser General Public            *
00012    *   License as published by the Free Software Foundation; either          *
00013    *   version 2.1 of the License, or (at your option) any later version.    *
00014    *                                                                         *
00015    *   This library is distributed in the hope that it will be useful,       *
00016    *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00017    *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00018    *   Lesser General Public License for more details.                       *
00019    *                                                                         *
00020    *   You should have received a copy of the GNU Lesser General Public      *
00021    *   License along with this library; if not, write to the Free Software   *
00022    *   Foundation, Inc., 59 Temple Place,                                    *
00023    *   Suite 330, Boston, MA  02111-1307  USA                                *
00024    *                                                                         *
00025    ***************************************************************************/
00026 
00027 #ifndef _AXISINTERFACE_HPP
00028 #define _AXISINTERFACE_HPP
00029 
00030 #include "SensorInterface.hpp"
00031 #include "DigitalInput.hpp"
00032 #include "DigitalOutput.hpp"
00033 #include "../rtt-config.h"
00034 #include <string>
00035 #include <vector>
00036 
00037 namespace RTT
00038 {
00044     class RTT_API AxisInterface
00045     {
00046     public:
00047 
00048         AxisInterface() {};
00049         virtual ~AxisInterface() {};
00050 
00055         virtual bool stop() = 0;
00056 
00061         virtual bool lock() = 0;
00062 
00067         virtual bool unlock() = 0;
00068 
00072         virtual bool drive( double v ) = 0;
00073 
00077         virtual double getDriveValue() const = 0;
00078 
00082         virtual bool isLocked() const = 0;
00083 
00087         virtual bool isStopped() const = 0;
00088 
00092         virtual bool isDriven() const = 0;
00093 
00097         virtual DigitalOutput* getBrake() = 0;
00098 
00102         virtual DigitalOutput* getEnable() = 0;
00103 
00107         virtual SensorInterface<double>* getSensor(const std::string& name) const = 0;
00108 
00112         virtual std::vector<std::string> sensorList() const = 0;
00113 
00117         virtual DigitalInput* getSwitch(const std::string& name) const = 0;
00118 
00122         virtual std::vector<std::string> switchList() const = 0;
00123 
00127         virtual SensorInterface<int>* getCounter(const std::string& name) const = 0;
00128 
00132         virtual std::vector<std::string> counterList() const = 0;
00133 
00134     };
00135 
00136 
00137 } // namespace RTT
00138 
00139 #endif //_AXISINTERFACE_HPP
00140 
Generated on Thu Dec 23 13:22:37 2010 for Orocos Real-Time Toolkit by  doxygen 1.6.3