QSlowBridgeClient.hh

00001 #ifndef _Q_SLOW_BRIDGE_CLIENT_HH_
00002 #define _Q_SLOW_BRIDGE_CLIENT_HH_
00003 
00004 #include "QApolloSocketClient.hh"
00005 
00006 #include <string>
00007 
00008 class QSlowBridgeClient
00009 {
00010 public:
00017    QSlowBridgeClient();
00023    QSlowBridgeClient(const std::string& address, const std::string& port);
00024 
00025    virtual ~QSlowBridgeClient();
00026 
00033    void SetConnectionMode(bool alwaysOpen) { fConnMode = alwaysOpen; }
00034 
00040    bool GetConnectionMode() const { return fConnMode; }
00041 
00049    int Open();
00050    
00054    int Close();
00055    
00073    int WritePulserAttenuation(int addr, char byte);
00074 
00105    int WritePulserStatus(int addr, char duration, char byte1, char byte2);
00106 
00124    int ReadPulserAttenuation(int addr, char &byte);
00125 
00137    int ReadPulserStatus(int addr, char &duration, char &byte1, char &byte2);
00138 
00139 private:
00144    bool fConnMode;
00145    QApolloSocketClient fClient;
00146    static const int fErr = -2; 
00154    std::string ExecCommand(const std::string& cmdStr);
00155    
00156 };
00157 
00158 
00159 #endif

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