QSlowSetCommand.hh

00001  /*
00002  * APOLLO: A complete DAQ and Online Data Analysis Framework for Cuore
00003  * 
00004  * M.Pallavicini - A.Giachero created 17/01/07 - <Andrea.Giachero@ge.infn.it> 
00005  * 
00006  $ $Id: QSlowSetCommand.hh 2242 2008-11-20 09:01:05Z giachero $
00007  * $Revision: 2242 $
00008  *
00009  * Class QSlowSetCommand: set command (any parameter setting) 
00010  *                        for slow control server
00011  *
00012  */
00013 
00014 
00015 #ifndef _QSLOW_SET_COMMAND_HH_
00016 #define _QSLOW_SET_COMMAND_HH_
00017 
00018 // C/C++ Includes
00019 #include <map>
00020 #include <string>
00021 
00022 // Apollo Includes
00023 #include "QCuore.hh"
00024 #include "QSlowBaseCommand.hh"
00025 
00026 
00027 class QError;
00028 
00029 class QSlowSetCommand : public QSlowBaseCommand {
00030 public:    
00031   
00032 
00033   // ctor
00034   QSlowSetCommand();
00035   
00036   // dtor
00037   virtual ~QSlowSetCommand();
00038 
00039   // Execute Command
00040   virtual void Execute();
00041   
00042   // Check Commands Parameters
00043   virtual void CheckParams();
00044         
00045 protected:
00046   
00047  
00048 private:
00049   
00050   // Convert String with boolean value (ON/OFF) to string value (1/0)
00051   bool FromBoolString2Int(std::string& StringVal, unsigned int& Val, QSlowBoolType_t Type);
00052   
00053   // Do Setting
00054   void SetToHardware(QError& ErrorRet, QSlowTarget_t Target, QSlowEleCommand_t CmdCode, std::string sValue);
00055 
00056   // Do Boolean Setting
00057   void BooleanSetToHardware(QError& ErrorRet, QSlowTarget_t Target, QSlowEleCommand_t CmdCode, 
00058                             QSlowBoolType_t Type, std::string sValue);
00059 
00064    void SetToServer(QError& ErrorRet, QSlowEleCommand_t CmdCode, std::string sValue);
00065 
00070    void SetInterface(QError& ErrorRet, std::string sValue);
00071 
00076    void SetToPowerSupply(QError& ErrorRet, QSlowEleCommand_t CmdCode, std::string sValue);
00077   
00078 };
00079 
00080 
00081 
00082 #endif // _QSLOW_SET_COMMAND_HH_

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