• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

baciROcommonImpl_T.h

Go to the documentation of this file.
00001 #ifndef _baciROcommonImpl_T_H_
00002 #define _baciROcommonImpl_T_H_
00003 
00004 /*******************************************************************
00005 * ALMA - Atacama Large Millimiter Array
00006 * (c) European Southern Observatory, 2003 
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: baciROcommonImpl_T.h,v 1.31 2012/07/26 12:55:35 gchiozzi Exp $"
00023 *
00024 * who       when        what
00025 * --------  ----------  ----------------------------------------------
00026 * bjeram    07/02/2003  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 "baciAlarm_T.h"
00039 #include "baciAlarmSystemMonitor_T.h"
00040 #include <baciPcommonImpl_T.h>
00041 #include <baciErrTypeDevIO.h>
00042 #include <baciErrTypeProperty.h>
00043 
00044 
00045 //#define ACS_RO_T(T, TC) ACS_P_TL(T, TC),  POA_ACS::RO##T, ACS::Alarm##T
00049 #define ACS_RO_T(T, TC) TC, ACS::CB##T, ACS::T##Seq, ACS::T##Seq_out, ACS::Monitor##T, baci::Monitor##T, TC, TC, TC, POA_ACS::RO##T, ACS::Alarm##T, POA_ACS::CB##T, TC
00050 
00054 #define ACS_RO_TL ACS_P_TL, TAlarm, POA_CB, TIN
00055 //T, TCB, TSeq, TSeq_out, TMonitor, TMonitorImpl, TAlarm, POA_SK, TM, TS, TSM
00056 
00057 //#define ACS_RO_C class T, class TCB, class TSeq, class TSeq_out, class TMonitor, class TMonitorImpl, class POA_SK, class TM, class TS, class TSM, class TAlarm
00061 #define ACS_RO_C ACS_P_C, class TAlarm, class POA_CB, class TIN
00062 
00063 namespace baci {
00064 
00070 template<ACS_RO_C>
00071 class baci_EXPORT ROcommonImpl : public virtual POA_SK,
00072                                  public PcommonImpl<ACS_P_TL>
00073 {
00074 public:
00080 //  ROcommonImpl(const ACE_CString& name, BACIComponent *component_p, DevIO *devIO=0);
00081    
00087   ROcommonImpl(const ACE_CString& name, BACIComponent *component_p, DevIO<TM> *devIO, bool flagdeldevIO);
00088 
00093     ROcommonImpl(bool init, const ACE_CString& name, BACIComponent *component_p, DevIO<TM> *devIO, bool flagdeldevIO);
00094 
00098   virtual ~ROcommonImpl();
00099 
00100   virtual void enable_alarm_system();
00101   
00102   virtual void disable_alarm_system();
00103 
00104   virtual bool alarm_system_enabled();
00105 
00113   void setAlarmFaultFamily(const char* ff);
00114 
00122   void setAlarmFaultMember(const char* fm);
00123 
00127   const char* getAlarmFaultFamily() { return alarmFaultFamily_m.c_str(); }
00128 
00132   const char* getAlarmFaultMember() { return alarmFaultMember_m.c_str(); }
00133 
00137   int getAlarmLevel() { return this->alarmLevel_m;}
00138 
00139 
00140     /* -------------------- [ RO interface ] -------------------- */
00141   
00142   protected:
00143 
00149   virtual bool readCharacteristics();
00150   
00151 protected:
00152  
00154   EventDispatcher * monitorEventDispatcher_mp;
00155 
00156   // RO
00157   ACS::TimeInterval     alarmTimerTrig_m;
00158 
00159   ACE_CString alarmFaultFamily_m;
00160   ACE_CString alarmFaultMember_m;
00161   int alarmLevel_m;
00162   bool alarmSystemEnabled_m;
00163 
00168   baci::AlarmSystemMonitorBase *alarmSystemMonitor_mp;
00169 
00170   private:
00174     void operator=(const ROcommonImpl&);
00175 
00179     ROcommonImpl(const ROcommonImpl&);
00180 };// class ROcommonImpl
00181 
00182 };
00183 
00184 #endif
00185 
00186 
00187 
00188 
00189 
00190 
00191 
00192 

Generated on Mon May 4 2015 08:27:42 for ACS-2015.4 C++ API by  doxygen 1.7.0