Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

enumpropAlarm.h

Go to the documentation of this file.
00001 #ifndef _enumpropAlarm_H 00002 #define _enumpropAlarm_H 00003 00004 /******************************************************************* 00005 * E.S.O. - ACS project 00006 * 00007 * "@(#) $Id: enumpropAlarm.h,v 1.37 2008/10/01 02:33:31 cparedes Exp $" 00008 * 00009 * who when what 00010 * -------- ---------- ---------------------------------------------- 00011 * bjeram 2001/08/27 created 00012 */ 00013 00014 #ifndef __cplusplus 00015 #error This is a C++ include file and cannot be used from plain C 00016 #endif 00017 00018 #include <baciEvent.h> 00019 #include <baciRecoverableObject.h> 00020 #include <ACSErrTypeAlarmC.h> 00021 #include <acscommonC.h> 00022 00023 NAMESPACE_BEGIN(baci); 00024 00025 class MonitorenumpropEventDispatcher : 00026 public MonitorEventDispatcher<ACS::pattern, ACS::CBpattern, POA_ACS::CBpattern> 00027 { 00028 public: 00029 MonitorenumpropEventDispatcher(const CBDescIn& descIn, 00030 const ACS::TimeInterval& interval, 00031 BACIProperty * property) : 00032 MonitorEventDispatcher<ACS::pattern, ACS::CBpattern, POA_ACS::CBpattern>(descIn, interval, property) 00033 { 00034 } 00035 00036 };//class MonitorenumpropEventDispatcher 00037 00038 template <class T, class ROT, class AlarmT> 00039 class AlarmenumpropEventStrategy : public EventStrategy 00040 { 00041 public: 00042 static const int maxFailureCount; 00043 #ifdef MAKE_VXWORKS 00044 AlarmenumpropEventStrategy(); 00045 #endif 00046 AlarmenumpropEventStrategy(ROT * property, EventDispatcher * eventDispatcher); 00047 00048 AlarmenumpropEventStrategy(Callback_ptr callback, 00049 const CBDescIn& descIn, 00050 const ACS::TimeInterval& interval, 00051 ROT * property, 00052 EventDispatcher * eventDispatcher); 00053 00054 virtual ~AlarmenumpropEventStrategy(); 00055 00056 bool failed(); 00057 00058 void succeeded(); 00059 00060 CORBA::Object_ptr getCORBAReference() const 00061 { 00062 return reference_mp; 00063 } 00064 00065 virtual bool isSuspended() 00066 { 00067 return suspended_m; 00068 } 00069 00070 virtual void check(BACIValue &value, 00071 const ACSErr::Completion & c, 00072 const ACS::CBDescOut & desc 00073 00074 ); 00075 00076 /* ------------------- [ Recoverable interface ] --------------------*/ 00077 00078 virtual int getId(void); 00079 virtual const char* getName(void); 00080 virtual char* getObjectState(void); 00081 virtual void setObjectState(const char * state); 00082 00083 /* --------------- [ Subscription interface ] --------------- */ 00084 00085 virtual void suspend ( ); 00086 00087 virtual void resume ( ) ; 00088 00089 virtual void destroy ( ) ; 00090 00091 private: 00093 ACE_CString name_m; 00094 00096 bool suspended_m; 00097 00099 int failureCount_m; 00100 00102 AlarmT *callback_mp; 00103 00105 CBDescIn m_descIn; 00106 00108 ACS::TimeInterval interval_m; 00109 00111 ROT * property_mp; 00112 00114 EventDispatcher * eventDispatcher_mp; 00115 00117 CORBA::Object_ptr reference_mp; 00118 00120 int alarmRaised_m; 00121 }; 00122 00123 #include "enumpropAlarm.i" 00124 NAMESPACE_END(baci); 00125 00126 #endif 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142

Generated on Thu Apr 30 02:30:51 2009 for ACS C++ API by doxygen 1.3.8