GPIBBaseInterface.hh

Go to the documentation of this file.
00001 
00012 #ifndef GPIB_BASE_INTERFACE_HH
00013 #define GPIB_BASE_INTERFACE_HH
00014 
00015 
00016 // C/C++ includes
00017 #include <string>
00018 
00019 #include "QSlowTypes.hh"
00020 
00021 
00022 class GPIBBaseInterface 
00023 {
00024 public:
00025 
00033    GPIBBaseInterface(int board_idx, int primary_add, int secondary_add);
00034  
00035    
00039    virtual ~GPIBBaseInterface(); 
00040 
00041    
00051    virtual bool DoCommand(const std::string& cmd)=0;
00052 
00053    
00064    virtual bool DoCommand(const std::string& cmd, std::string& answer)=0;
00065    
00066    
00070    virtual bool IsError()=0;
00071 
00076    virtual size_t GetErrorCode()=0;
00077 
00078    
00084    virtual std::string GetErrorMsg()=0;
00085 
00086    
00090    virtual size_t GetStatusCode()=0;
00091 
00092    
00098    virtual std::string GetStatusMsg()=0;
00099 
00100    
00104    inline const int GetBoardIndex() const {return f_board_idx;}
00105 
00106    
00110    inline const int GetPrimaryAddress() const {return f_primary_add;}
00111 
00112    
00116    inline const int GetSecondaryAddress() const {return f_secondary_add;}
00117 
00121    inline const QSlowTypes::QSlowEleInterface_t GetType() const {return f_type;}
00122 
00123    
00124 protected:
00125 
00133    virtual bool Open()=0;
00134 
00135    
00143    virtual bool Close()=0;
00144 
00145 
00153    virtual bool Clear()=0;
00154 
00155    
00156   
00157 private:
00158    
00159    const int   f_board_idx;      
00160    const int   f_primary_add;    
00161    const int   f_secondary_add;  
00163    const QSlowTypes::QSlowEleInterface_t f_type; 
00164 };
00165 
00166 #endif // GPIB_BASE_INTERFACE_HH
00167 

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