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 #ifndef SWITCHDIGITALINAPCI1032_HPP
00031 #define SWITCHDIGITALINAPCI1032_HPP
00032
00033 #include <rtt/dev/DigitalInInterface.hpp>
00034
00035 namespace RTT
00036 {
00041 class SwitchDigitalInapci1032 :
00042 public DigitalInInterface
00043 {
00044
00045 public:
00046 SwitchDigitalInapci1032( const std::string& name );
00047 virtual ~SwitchDigitalInapci1032();
00048
00049 virtual bool isOn( unsigned int bit = 0) const;
00050
00051 virtual bool isOff( unsigned int bit = 0) const;
00052
00053 virtual bool readBit( unsigned int bit = 0) const;
00054
00055 virtual unsigned int readSequence(unsigned int start_bit, unsigned int stop_bit) const;
00056
00057 virtual unsigned int nbOfInputs() const { return 32; }
00058
00059 private:
00060 int checkAndGetPCISlotNumber();
00061 int setBoardInformation();
00062 int getHardwareInformation( unsigned int * pui_BaseAddress, unsigned char * pb_InterruptNbr, unsigned char * pb_SlotNumber );
00063 int closeBoardHandle();
00064
00065 int BoardHandle;
00066 unsigned char SlotNumber;
00067 unsigned char SlotNumberArray[ 10 + 1 ];
00068 static int bh;
00069 };
00070 }
00071
00072 #endif