QNiDigitalController.hh

Go to the documentation of this file.
00001 
00002 #ifndef _Q_NI_DIGITAL_CONTROLLER_HH_
00003 #define _Q_NI_DIGITAL_CONTROLLER_HH_
00004 
00005 #ifdef __NI_HARDWARE__
00006 #include <NIDAQmx.h>
00007 #endif
00008 
00009 #include <vector>
00010 
00017 class QNiDigitalController
00018 {
00019 public:
00020    
00027    QNiDigitalController(unsigned int nPorts, bool useDaqBoards = false);
00028    
00030    virtual ~QNiDigitalController();
00031 
00038    virtual bool SetupPort(unsigned int portId,
00039                           unsigned char word);
00040    
00046    virtual bool SetupPorts(const std::vector<unsigned char>& words);
00047 
00052    virtual bool Write();
00053 
00058    virtual bool ClearPorts();
00059 
00064    virtual bool ClearPort(unsigned int portId);
00065 
00066 protected:
00067 
00068 #ifdef __NI_HARDWARE__
00069    TaskHandle fTaskHandle;
00070 #endif
00071    const unsigned int fPorts;
00072    unsigned long fWords;
00073    const bool fUseDaqBoards;
00085    int HandleNiError(int niErrCode);
00086 
00088    void ClearTask();
00089 
00098    bool InitTask();
00099 };
00100 #endif

Generated on Tue Nov 16 10:49:55 2010 for CUORE Software by  doxygen 1.5.6