00001 #ifndef ALARMTOQUEUE_H 00002 #define ALARMTOQUEUE_H 00003 /******************************************************************************* 00004 * ALMA - Atacama Large Millimiter Array 00005 * (c) European Southern Observatory, 2011 00006 * 00007 * This library is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public 00009 * License as published by the Free Software Foundation; either 00010 * version 2.1 of the License, or (at your option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 * Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with this library; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 * 00021 * "@(#) $Id: AlarmToQueue.h,v 1.1 2011/06/22 20:56:15 acaproni Exp $" 00022 * 00023 * who when what 00024 * -------- -------- ---------------------------------------------- 00025 * acaproni 2011-06-18 created 00026 */ 00027 00028 #include <string> 00029 00030 #include "Properties.h" 00031 00032 namespace acsalarm 00033 { 00037 class AlarmToQueue { 00038 private: 00039 // FaultFamily 00040 std::string m_FF; 00041 00042 // FaultMember 00043 std::string m_FM; 00044 00045 // FaultCode 00046 int m_FC; 00047 00048 // user properties 00049 Properties m_alarmProps; 00050 00051 // The state active/terminate 00052 bool m_active; 00053 00054 public: 00063 AlarmToQueue(std::string fF, std::string fM, int fC, bool activestate); 00064 00074 AlarmToQueue(std::string fF, std::string fM, int fC, Properties props, bool activestate); 00075 bool isActive() const 00076 { 00077 return m_active; 00078 } 00079 00080 Properties getAlarmProps() const 00081 { 00082 return m_alarmProps; 00083 } 00084 00085 int getFC() const 00086 { 00087 return m_FC; 00088 } 00089 00090 std::string getFF() const 00091 { 00092 return m_FF; 00093 } 00094 00095 std::string getFM() const 00096 { 00097 return m_FM; 00098 } 00099 00100 }; 00101 }; 00102 00103 00104 #endif