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 <string>
00034 #include <vector>
00035 
00036 namespace RTT
00037 {
00043     class AxisInterface
00044     {
00045     public:
00046 
00047         AxisInterface() {};
00048         virtual ~AxisInterface() {};
00049 
00054         virtual bool stop() = 0;
00055 
00060         virtual bool lock() = 0;
00061 
00066         virtual bool unlock() = 0;
00067 
00071         virtual bool drive( double v ) = 0;
00072 
00076         virtual double getDriveValue() const = 0;
00077 
00081         virtual bool isLocked() const = 0;
00082 
00086         virtual bool isStopped() const = 0;
00087 
00091         virtual bool isDriven() const = 0;
00092 
00096         virtual DigitalOutput* getBrake() = 0;
00097 
00101         virtual DigitalOutput* getEnable() = 0;
00102 
00106         virtual SensorInterface<double>* getSensor(const std::string& name) const = 0;
00107 
00111         virtual std::vector<std::string> sensorList() const = 0;
00112 
00116         virtual DigitalInput* getSwitch(const std::string& name) const = 0;
00117 
00121         virtual std::vector<std::string> switchList() const = 0;
00122 
00126         virtual SensorInterface<int>* getCounter(const std::string& name) const = 0;
00127 
00131         virtual std::vector<std::string> counterList() const = 0;
00132 
00133     };
00134 
00135 
00136 } // namespace RTT
00137 
00138 #endif //_AXISINTERFACE_HPP
00139 

Generated on Tue Aug 25 14:17:22 2009 for Orocos Real-Time Toolkit by  doxygen 1.5.8