00001 #ifndef baciTestAlarmClassImpl_h 00002 #define baciTestAlarmClassImpl_h 00003 00004 /******************************************************************************* 00005 * ALMA - Atacama Large Millimiter Array 00006 * (c) European Southern Observatory, 2004 00007 * 00008 *This library is free software; you can redistribute it and/or 00009 *modify it under the terms of the GNU Lesser General Public 00010 *License as published by the Free Software Foundation; either 00011 *version 2.1 of the License, or (at your option) any later version. 00012 * 00013 *This library is distributed in the hope that it will be useful, 00014 *but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 *Lesser General Public License for more details. 00017 * 00018 *You should have received a copy of the GNU Lesser General Public 00019 *License along with this library; if not, write to the Free Software 00020 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 * 00022 * "@(#) $Id: baciTestAlarmClassImpl.h,v 1.4 2009/09/25 13:50:08 bjeram Exp $" 00023 * 00024 * who when what 00025 * -------- -------- ---------------------------------------------- 00026 * oat 2008-02-28 created 00027 */ 00028 00034 #ifndef __cplusplus 00035 #error This is a C++ include file and cannot be used from plain C 00036 #endif 00037 00038 #include <acsutil.h> 00039 00040 #include <baci.h> 00041 #include <baciTestS.h> 00042 00043 #include <baciROpattern.h> 00044 #include <baciRWpattern.h> 00045 00046 #include <baciCharacteristicComponentImpl.h> 00047 00048 #include <baciSmartPropertyPointer.h> 00049 00050 00051 class MyROPatternProperty : public baci::RWpattern 00052 { 00053 public: 00062 MyROPatternProperty(const ACE_CString &name, 00063 baci::BACIComponent *component_p, 00064 baci::ROpattern *roPatternProperty_p); 00065 00078 virtual void 00079 setValue (baci::BACIProperty *property_p, 00080 baci::BACIValue *value_p, 00081 Completion &completion, 00082 CBDescOut &descOut); 00083 00084 00085 private: 00091 baci::ROpattern *m_roPatternProperty_p; 00092 00093 void operator=(const MyROPatternProperty&); 00094 }; 00095 00096 00097 00098 00104 class BaciTestAlarmClassImpl: public baci::CharacteristicComponentImpl, 00105 public POA_BACI_TEST::BaciTestAlarmClass 00106 { 00107 00108 public: 00109 // Constructors & Destructors 00110 BaciTestAlarmClassImpl(const ACE_CString& name, 00111 maci::ContainerServices* containerServices, 00112 bool monitoring=true); 00113 00117 virtual ~BaciTestAlarmClassImpl(); 00118 00119 00120 /* ----------------------------------------------------------------*/ 00121 /* --------------------- [ CORBA interface ] ----------------------*/ 00122 /* ----------------------------------------------------------------*/ 00123 00127 virtual void shutdown (); 00128 00134 void changeAlarmFFFM(const char*, const char*); 00135 00139 virtual CORBA::Boolean isPropertiesMonitoringActive(); 00140 00141 virtual ACS::ROpattern_ptr roPatternProperty(); 00142 00143 virtual ACS::RWpattern_ptr rwPatternProperty(); 00144 00145 00146 private: 00147 00149 bool m_shutdown; 00150 00152 baci::SmartPropertyPointer<baci::ROpattern> m_roPatternProperty_sp; 00153 baci::SmartPropertyPointer<MyROPatternProperty> m_rwPatternProperty_sp; 00154 00158 void operator=(const BaciTestAlarmClassImpl&); 00159 }; 00160 00161 #endif /* baciTestAlarmClassImpl_h */