Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

rmMonitor.h

Go to the documentation of this file.
00001 #ifndef __rmMonitor_
00002 #define __rmMonitor_
00003 
00004 #include "ResourceMonitor/ResourceMonitorTypes.h"
00005 #include "rmBaseArray.h"
00006 #include "rmClientTypes.h"
00007 #include "rmSysInfo.h"
00008 #include "rmConfig.h"
00009 #include "rmControl.h"
00010 
00029 struct Monitor
00030 {
00031   long controlId; 
00032   long configId; 
00033   long infoId; 
00034   uuid_t uuid; 
00035   // unsigned long id;
00036   int command; 
00037   posix_log_notify_t nfHandle; 
00038 };
00039 
00045 class rmMonitor : public rmBaseArray<Monitor>
00046 {
00047   public:
00048     rmMonitor(unsigned long aSystemStartupTime, 
00049               subsystemInfo * aSubsystemInfo,
00050               rmGenericMonitorConfig * aGenericConfig,
00051               rmThresholdMonitorConfig * aThresholdConfig,
00052               rmWatermarkMonitorConfig * aWatermarkConfig,
00053               rmLeakyBucketMonitorConfig * aLeakyBucketConfig,
00054               rmGenericMonitorControl * aGenericControl,
00055               rmThresholdMonitorControl * aThresholdControl,
00056               rmLeakyBucketMonitorControl * aLeakyBucketControl ) : 
00057       rmBaseArray<Monitor>(aSystemStartupTime), 
00058       mSubsystemInfo(aSubsystemInfo),
00059       mGenericConfig(aGenericConfig),
00060       mThresholdConfig(aThresholdConfig),
00061       mWatermarkConfig(aWatermarkConfig),
00062       mLeakyBucketConfig(aLeakyBucketConfig),
00063       mGenericControl(aGenericControl),
00064       mThresholdControl(aThresholdControl),
00065       mLeakyBucketControl(aLeakyBucketControl) {}
00066 
00067     virtual ~rmMonitor(){}
00068 
00070     virtual int init();
00071 
00073     virtual int removeElement(unsigned long aID);
00074 
00075     virtual bool elementIsReady(const Monitor & aElement) const;
00076 
00077     virtual int getInteger32(RMAttribute aName, unsigned long aID, long & aValue);
00078     virtual int setInteger32(RMAttribute aName, unsigned long aID, long aValue);
00079 
00080     virtual int getUnsigned(RMAttribute aName, unsigned long aID, unsigned long & aValue);
00081     virtual int setUnsigned(RMAttribute aName, unsigned long aID, unsigned long aValue);
00082 
00083     virtual int getUnsigned64(RMAttribute aName, unsigned long aID, u_int64_t & aValue);
00084 
00085     virtual int getUUIDString(RMAttribute aName, unsigned long aID, char * aUUIDStr);
00086 
00087     virtual int getUUID(RMAttribute aName, unsigned long aID, uuid_t aUUID);
00088    
00089   private:
00090 
00091     subsystemInfo * mSubsystemInfo;
00092     rmGenericMonitorConfig * mGenericConfig;
00093     rmThresholdMonitorConfig * mThresholdConfig;
00094     rmWatermarkMonitorConfig * mWatermarkConfig;
00095     rmLeakyBucketMonitorConfig * mLeakyBucketConfig;
00096     rmGenericMonitorControl * mGenericControl;
00097     rmThresholdMonitorControl * mThresholdControl;
00098     rmLeakyBucketMonitorControl * mLeakyBucketControl;
00099 };
00100 
00101 #endif // __rmMonitor_

Generated on Tue Sep 10 16:46:33 2002 for ResourceMonitorSNMPSubagent by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002