00001 /*************************************************************************** 00002 tag: Peter Soetens Thu Oct 10 16:22:43 CEST 2002 Relaycardapci2200.hpp 00003 00004 Relaycardapci2200.hpp - description 00005 ------------------- 00006 begin : Thu October 10 2002 00007 copyright : (C) 2002 Peter Soetens 00008 email : peter.soetens@mech.kuleuven.ac.be 00009 00010 *************************************************************************** 00011 * This library is free software; you can redistribute it and/or * 00012 * modify it under the terms of the GNU Lesser General Public * 00013 * License as published by the Free Software Foundation; either * 00014 * version 2.1 of the License, or (at your option) any later version. * 00015 * * 00016 * This library is distributed in the hope that it will be useful, * 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00019 * Lesser General Public License for more details. * 00020 * * 00021 * You should have received a copy of the GNU Lesser General Public * 00022 * License along with this library; if not, write to the Free Software * 00023 * Foundation, Inc., 59 Temple Place, * 00024 * Suite 330, Boston, MA 02111-1307 USA * 00025 * * 00026 ***************************************************************************/ 00027 00028 /* koen.muylkens@esat.kuleuven.ac.be */ 00029 00030 #ifndef RELAYCARDAPCI12200_HPP 00031 #define RELAYCARDAPCI12200_HPP 00032 00033 #include <rtt/dev/DigitalOutInterface.hpp> 00034 00035 /* Forward declarations */ 00036 00037 namespace RTT 00038 { 00042 class RelayCardapci2200 00043 : public DigitalOutInterface 00044 { 00045 00046 public: 00053 RelayCardapci2200( const std::string& name ); 00054 00055 virtual ~RelayCardapci2200(); 00056 00057 virtual void switchOn( unsigned int n ); 00058 00059 virtual void switchOff( unsigned int n ); 00060 00061 virtual void setBit( unsigned int bit, bool value ); 00062 00063 virtual void setSequence(unsigned int start_bit, unsigned int stop_bit, unsigned int value); 00064 00065 virtual bool checkBit(unsigned int n) const; 00066 00067 virtual unsigned int checkSequence( unsigned int start_bit, unsigned int stop_bit ) const; 00068 00069 virtual unsigned int nbOfOutputs() const; 00070 00071 private: 00075 void *apci2200; 00076 00080 unsigned int output_cache; 00081 }; 00082 } 00083 00084 #endif