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 <ace/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
00061
00062 void registerNonCollocatedMonitoredDevice (const char * componentName, const char* serialNumber);
00063 void registerCollocatedMonitoredDevice (const char * componentName, const char* serialNumber);
00065 void registerMonitoredDevice (const char * componentName, const char* serialNumber);
00066
00067 void registerNonCollocatedMonitoredDeviceWithMultipleSerial(const char*componentName, const TMCDB::propertySerialNumberSeq& serialNumbers);
00068 void registerCollocatedMonitoredDeviceWithMultipleSerial(const char*componentName, const TMCDB::propertySerialNumberSeq& serialNumbers);
00070 void registerMonitoredDeviceWithMultipleSerial(const char*componentName, const TMCDB::propertySerialNumberSeq& serialNumbers);
00071
00072 void deregisterMonitoredDevice (const char * componentName);
00073
00074 void startMonitoring (const char * componentName);
00075
00076 void stopMonitoring (const char * componentName);
00077
00078 TMCDB::MonitorDataBlocks * getMonitorData ();
00079
00080 void set_archiving_interval(const char* componentName, const char* propertyName, ACS::TimeInterval time);
00081
00082 void suppress_archiving(const char* componentName, const char* propertyName);
00083
00084 void enable_archiving(const char* componentName, const char* propertyName);
00085
00086 private:
00087
00089 void registerMonitoredComponentWithSerial(const char * componentName, const char* serialNumber, bool checkCollocation);
00091 void registerMonitoredComponentWithMultipleSerial(const char*componentName, const TMCDB::propertySerialNumberSeq& serialNumbers, bool checkCollocation);
00092
00095 MonitorComponent* registerMonitoredComponent (const char * componentName, bool checkCollocation=true);
00096
00097 ACE_Hash_Map_Manager <ACE_CString, MonitorComponent*, ACE_Recursive_Thread_Mutex> monitorComponents_m;
00098
00099 ACE_Recursive_Thread_Mutex mcMutex_m;
00100
00101 unsigned int numOfComponents_m;
00102
00104 maci::ContainerServices *contServ_m;
00105
00107 MonitorArchiver::Controller_var archiveMonitorController_m;
00108 };
00109
00110
00111
00112 };
00113
00114
00115 #endif