00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef COMEDISUBDEVICEDOUT_HPP
00032 #define COMEDISUBDEVICEDOUT_HPP
00033
00034 #include <rtt/dev/DigitalOutInterface.hpp>
00035 #include "ComediDevice.hpp"
00036
00037 namespace OCL
00038 {
00039
00043 class ComediSubDeviceDOut
00044 : public RTT::DigitalOutInterface
00045 {
00046
00047 public:
00062 ComediSubDeviceDOut( ComediDevice* cd, const std::string& name, unsigned int subdevice, bool configure_all_bits = true);
00063
00064 ComediSubDeviceDOut( ComediDevice* cd, unsigned int subdevice, bool configure_all_bits = true );
00065
00070 bool useBit( unsigned int bit );
00071
00072 virtual void switchOn( unsigned int bit);
00073
00074 virtual void switchOff( unsigned int bit);
00075
00076 virtual void setBit( unsigned int bit, bool value);
00077
00078 virtual void setSequence(unsigned int start_bit, unsigned int stop_bit, unsigned int value);
00079
00080 virtual bool checkBit( unsigned int bit) const;
00081
00082 virtual unsigned int checkSequence (unsigned int start_bit, unsigned int stop_bit) const;
00083
00084 virtual unsigned int nbOfOutputs() const;
00085
00086 protected:
00087 void init(bool all_bits);
00088
00092 ComediDevice* myCard;
00093
00097 unsigned int subDevice;
00098 unsigned int channels;
00099 };
00100
00101 }
00102
00103 #endif