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

MonitorCollectorImpl.h

Go to the documentation of this file.
00001 #ifndef MONITOR_COLLECTOR_IMPL_H
00002 #define MONITOR_COLLECTOR_IMPL_H
00003 /*******************************************************************************
00004 * ALMA - Atacama Large Millimiter Array
00005 * (c) European Southern Observatory, 2009
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: MonitorCollectorImpl.h,v 1.2 2011/03/30 18:11:18 tstaig Exp $"
00022 *
00023 * who       when      what
00024 * --------  --------  ----------------------------------------------
00025 * bjeram  2009-02-11  created
00026 */
00027 
00028 #ifndef __cplusplus
00029 #error This is a C++ include file and cannot be used from plain C
00030 #endif
00031 
00032 #include "MonitorComponent.h"
00033 #include <ace/Synch.h>
00034 #include <Hash_Map_Manager_T.h>
00035 #include <MonitorArchiverIFC.h>
00036 
00037 namespace TMCDB
00038 {
00039 
00043 class MonitorCollectorImpl :
00044 public acscomponent::ACSComponentImpl,
00045 public POA_TMCDB::MonitorCollector
00046 {
00047 public:
00048         MonitorCollectorImpl(const ACE_CString& name,
00049                         maci::ContainerServices * containerServices);
00050 
00051         ~MonitorCollectorImpl();
00052 
00053         // componnet's life cycle
00054         void initialize();
00055 
00056         void cleanUp();
00057 
00058 
00059         // implementations of IDL's methods
00060         void registerMonitoredDevice (const char * componentName, const char* serialNumber);
00061 
00062         void registerMonitoredDeviceWithMultipleSerial(const char*componentName, const TMCDB::propertySerialNumberSeq& serialNumbers);
00063 
00064         void deregisterMonitoredDevice (const char * componentName);
00065 
00066         void startMonitoring (const char * componentName);
00067 
00068         void stopMonitoring (const char * componentName);
00069 
00070         TMCDB::MonitorDataBlocks * getMonitorData ();
00071 
00072         void set_archiving_interval(const char* componentName, const char* propertyName, ACS::TimeInterval time);
00073 
00074         void suppress_archiving(const char* componentName, const char* propertyName);
00075 
00076         void enable_archiving(const char* componentName, const char* propertyName);
00077 
00078 private:
00079 
00080         MonitorComponent* registerMonitoredComponent (const char * componentName);
00081 
00082         ACE_Hash_Map_Manager <ACE_CString, MonitorComponent*, ACE_Recursive_Thread_Mutex> monitorComponents_m;
00083 
00084         ACE_Recursive_Thread_Mutex mcMutex_m; 
00085 
00086         unsigned int numOfComponents_m; 
00087 
00089         maci::ContainerServices *contServ_m;
00090 
00092         MonitorArchiver::Controller_var archiveMonitorController_m;
00093 };//class MonitorCollectorImpl
00094 
00095 
00096 
00097 };//namespace TMCDB
00098 
00099 
00100 #endif 

Generated on Thu Jan 12 2012 23:13:51 for ACS-10.0 C++ API by  doxygen 1.7.0