Go to the documentation of this file.00001 #ifndef MONITOR_COLLECTOR_IMPL_H
00002 #define MONITOR_COLLECTOR_IMPL_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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
00054 void initialize();
00055
00056 void cleanUp();
00057
00058
00059
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 };
00094
00095
00096
00097 };
00098
00099
00100 #endif