QMsgClient.hh

Go to the documentation of this file.
00001 
00002 #ifndef _Q_MSG_CLIENT_HH_
00003 #define _Q_MSG_CLIENT_HH_
00004 
00005 #include "QCuore.hh"
00006 #include "QMessageDefs.hh"
00007 #include "QDaqCommonDefs.hh"
00008 #include "QBaseClient.hh"
00009 #include "QLogInfo.hh"
00010 
00011 #include <sys/types.h> // for pid_t
00012 #include <list>
00013 
00020 class QMsgClient: public QBaseClient
00021 {
00022 public:
00023 
00028    QMsgClient();
00029 
00035    QMsgClient(const std::string& address, const std::string& port);
00036    
00038    virtual ~QMsgClient();
00039 
00050    bool RegisterProcess(const std::string& processName,
00051                         const std::string& host,
00052                         pid_t processPid);
00053 
00054    
00061    bool UnregisterProcess(const std::string& processName);
00062 
00070    bool SendStatus(const std::string& processName,
00071                    QDaqCommonDefs::ProcessStatus_t status);
00072    
00081    bool SendLog(const std::string& processName,
00082                 const std::string& message,
00083                 MsgLevel           level = InfoMsg);
00084 
00093    bool GetStatus(const std::string& processName,
00094                   QDaqCommonDefs::ProcessStatus_t& status);
00095 
00101    bool GetRegisteredProcesses(std::list<std::string>& processes);
00102 
00112    bool IsRegistered(const std::string& processName, bool& isReg);
00113 
00122    bool GetMessageIdByTime(time_t time, int& id);
00123 
00130    bool GetFirstMessageId(int& id);
00131 
00139    bool GetLastMessageId(int& id);
00140 
00148    bool GetFormattedMessage(int id, std::string& message);
00149 
00157    bool GetMessage(int id, QLogInfo& logInfo);
00158 };
00159 
00160 #endif

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