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

rmConfig.h

Go to the documentation of this file.
00001 #ifndef __rmMonConfig_
00002 #define __rmMonConfig_
00003 
00004 #include "ResourceMonitor/ResourceMonitorTypes.h"
00005 #include "rmRefArray.h"
00006 #include "rmClientTypes.h"
00007 #include "rmSysInfo.h"
00008 
00038 struct GenericConfig 
00039 {
00040   rmMonitorConfiguration config; 
00041   unsigned long subsystemId; 
00042   unsigned long thresholdConfigId; 
00043   unsigned long watermarkConfigId; 
00044   unsigned long leakyBucketConfigId; 
00045 
00046   long refCnt; 
00047   int status;
00048   // unsigned long id;
00049 };
00050 
00068 struct ThresholdConfig
00069 {
00070   rmThresholdConfiguration config;
00071 
00072   long refCnt;
00073   int status;
00074   // unsigned long id;
00075 };
00076 
00094 struct WatermarkConfig
00095 {
00096   rmWatermarkConfiguration config;
00097 
00098   long refCnt;
00099   int status;
00100   // unsigned long id;
00101 };
00102 
00103 struct LeakyBucketConfig
00104 {
00105   rmLeakyBucketConfiguration config;
00106 
00107   long refCnt;
00108   int status;
00109 };
00110 
00117 class rmThresholdMonitorConfig;
00118 class rmWatermarkMonitorConfig;
00119 class rmLeakyBucketMonitorConfig;
00120 
00121 class rmGenericMonitorConfig : public rmRefArray<GenericConfig>
00122 {
00123   public: 
00124     rmGenericMonitorConfig(subsystemInfo * aSubsystemInfo, 
00125                            rmThresholdMonitorConfig * aThresholdConfig, 
00126                            rmWatermarkMonitorConfig * aWatermarkConfig,
00127                            rmLeakyBucketMonitorConfig * aleakyBucketConfig) : 
00128       mSubsystemInfo(aSubsystemInfo), 
00129       mThresholdConfig(aThresholdConfig),
00130       mWatermarkConfig(aWatermarkConfig),
00131       mLeakyBucketConfig(aleakyBucketConfig) {}
00132 
00133     virtual ~rmGenericMonitorConfig(){}
00134 
00136     virtual int removeElement(unsigned long aID);
00137 
00138     virtual bool elementIsReady(const GenericConfig & aElement) const;
00139 
00140     virtual int getInteger32(RMAttribute aName, unsigned long aID, long & aValue);
00141     virtual int setInteger32(RMAttribute aName, unsigned long aID, long aValue);
00142 
00143     virtual int getUnsigned(RMAttribute aName, unsigned long aID, unsigned long & aValue);
00144     virtual int setUnsigned(RMAttribute aName, unsigned long aID, unsigned long aValue);
00145 
00146   private:
00147     subsystemInfo * mSubsystemInfo;
00148     rmThresholdMonitorConfig * mThresholdConfig;
00149     rmWatermarkMonitorConfig * mWatermarkConfig;
00150     rmLeakyBucketMonitorConfig * mLeakyBucketConfig;
00151 
00152 };
00153 
00160 class rmThresholdMonitorConfig : public rmRefArray<ThresholdConfig>
00161 {
00162   public: 
00163     rmThresholdMonitorConfig(){}
00164     virtual ~rmThresholdMonitorConfig(){}
00165 
00166     virtual bool elementIsReady(const ThresholdConfig & aElement) const;
00167 
00168     virtual int getInteger32(RMAttribute aName, unsigned long aID, long & aValue);
00169     virtual int setInteger32(RMAttribute aName, unsigned long aID, long aValue);
00170 
00171     virtual int getUnsigned(RMAttribute aName, unsigned long aID, unsigned long & aValue);
00172     virtual int setUnsigned(RMAttribute aName, unsigned long aID, unsigned long aValue);
00173 
00174     virtual int getUnsigned64(RMAttribute aName, unsigned long aID, u_int64_t & aValue);
00175     virtual int setUnsigned64(RMAttribute aName, unsigned long aID, u_int64_t aValue);
00176 
00177   private:
00178 };
00179 
00186 class rmWatermarkMonitorConfig : public rmRefArray<WatermarkConfig>
00187 {
00188   public: 
00189     rmWatermarkMonitorConfig(){}
00190     virtual ~rmWatermarkMonitorConfig(){}
00191 
00192     virtual bool elementIsReady(const WatermarkConfig & aElement) const;
00193 
00194     virtual int getInteger32(RMAttribute aName, unsigned long aID, long & aValue);
00195     virtual int setInteger32(RMAttribute aName, unsigned long aID, long aValue);
00196 
00197   private:
00198 };
00199 
00206 class rmLeakyBucketMonitorConfig : public rmRefArray<LeakyBucketConfig>
00207 {
00208   public: 
00209     rmLeakyBucketMonitorConfig(){}
00210     virtual ~rmLeakyBucketMonitorConfig(){}
00211 
00212     virtual bool elementIsReady(const LeakyBucketConfig & aElement) const;
00213 
00214     virtual int getInteger32(RMAttribute aName, unsigned long aID, long & aValue);
00215     virtual int setInteger32(RMAttribute aName, unsigned long aID, long aValue);
00216 
00217     virtual int getUnsigned(RMAttribute aName, unsigned long aID, unsigned long & aValue);
00218     virtual int setUnsigned(RMAttribute aName, unsigned long aID, unsigned long aValue);
00219 
00220     virtual int getUnsigned64(RMAttribute aName, unsigned long aID, u_int64_t & aValue);
00221     virtual int setUnsigned64(RMAttribute aName, unsigned long aID, u_int64_t aValue);
00222 
00223   private:
00224 };
00225 
00226 
00227 #endif // __rmMonConfig_

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