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

rmMonitor Class Reference

#include <rmMonitor.h>

Inheritance diagram for rmMonitor:

rmBaseArray< Monitor > IBaseAccessor List of all members.

Public Methods

 rmMonitor (unsigned long aSystemStartupTime, subsystemInfo *aSubsystemInfo, rmGenericMonitorConfig *aGenericConfig, rmThresholdMonitorConfig *aThresholdConfig, rmWatermarkMonitorConfig *aWatermarkConfig, rmLeakyBucketMonitorConfig *aLeakyBucketConfig, rmGenericMonitorControl *aGenericControl, rmThresholdMonitorControl *aThresholdControl, rmLeakyBucketMonitorControl *aLeakyBucketControl)
virtual ~rmMonitor ()
virtual int init ()
 Initializes the monitor table. More...

virtual int removeElement (unsigned long aID)
 Remove an entry from the table. More...

virtual bool elementIsReady (const Monitor &aElement) const
virtual int getInteger32 (RMAttribute aName, unsigned long aID, long &aValue)
virtual int setInteger32 (RMAttribute aName, unsigned long aID, long aValue)
virtual int getUnsigned (RMAttribute aName, unsigned long aID, unsigned long &aValue)
virtual int setUnsigned (RMAttribute aName, unsigned long aID, unsigned long aValue)
virtual int getUnsigned64 (RMAttribute aName, unsigned long aID, u_int64_t &aValue)
virtual int getUUIDString (RMAttribute aName, unsigned long aID, char *aUUIDStr)
virtual int getUUID (RMAttribute aName, unsigned long aID, uuid_t aUUID)

Private Attributes

subsystemInfomSubsystemInfo
rmGenericMonitorConfigmGenericConfig
rmThresholdMonitorConfigmThresholdConfig
rmWatermarkMonitorConfigmWatermarkConfig
rmLeakyBucketMonitorConfigmLeakyBucketConfig
rmGenericMonitorControlmGenericControl
rmThresholdMonitorControlmThresholdControl
rmLeakyBucketMonitorControlmLeakyBucketControl

Detailed Description

The class manages the monitor table.

Definition at line 45 of file rmMonitor.h.


Constructor & Destructor Documentation

rmMonitor::rmMonitor unsigned long    aSystemStartupTime,
subsystemInfo   aSubsystemInfo,
rmGenericMonitorConfig   aGenericConfig,
rmThresholdMonitorConfig   aThresholdConfig,
rmWatermarkMonitorConfig   aWatermarkConfig,
rmLeakyBucketMonitorConfig   aLeakyBucketConfig,
rmGenericMonitorControl   aGenericControl,
rmThresholdMonitorControl   aThresholdControl,
rmLeakyBucketMonitorControl   aLeakyBucketControl
[inline]
 

Definition at line 48 of file rmMonitor.h.

References mGenericConfig, mGenericControl, mLeakyBucketConfig, mLeakyBucketControl, mSubsystemInfo, mThresholdConfig, mThresholdControl, and mWatermarkConfig.

virtual rmMonitor::~rmMonitor   [inline, virtual]
 

Definition at line 67 of file rmMonitor.h.


Member Function Documentation

bool rmMonitor::elementIsReady const Monitor   aElement const [virtual]
 

Reimplemented from rmBaseArray< Monitor >.

Definition at line 261 of file rmMonitor.cpp.

References Monitor::configId, and Monitor::controlId.

int rmMonitor::getInteger32 RMAttribute    aName,
unsigned long    aID,
long &    aValue
[virtual]
 

Reimplemented from rmBaseArray< Monitor >.

Definition at line 273 of file rmMonitor.cpp.

References Monitor::command, GenericControl::control, Monitor::controlId, rmBaseArray< GenericControl >::getConstElement, rmBaseArray< Monitor >::getConstElement, mGenericControl, MONITOR_COMMAND, MONITOR_LOCATION, MONITOR_NOTIFICATIONPAUSED, MONITOR_SNMPTRAP, MONITOR_STATUS, MONITOR_TYPE, Monitor::nfHandle, NOTEXIST, RMAttribute, RMCLIENT_ERROR_GENERIC_CONTROL, RMCLIENT_ERROR_MONITOR, RMCLIENT_ERROR_MONITOR_STATE, RMCLIENT_ERROR_NOSUCHNAME, RMCLIENT_SUCCESS, and Monitor::uuid.

int rmMonitor::getUnsigned RMAttribute    aName,
unsigned long    aID,
unsigned long &    aValue
[virtual]
 

Reimplemented from rmBaseArray< Monitor >.

Definition at line 501 of file rmMonitor.cpp.

References GenericConfig::config, Monitor::configId, Monitor::controlId, rmBaseArray< GenericConfig >::getConstElement, rmBaseArray< Monitor >::getConstElement, mGenericConfig, MONITOR_CONFIGID, MONITOR_CONTROLID, MONITOR_LASTVALUE32, MONITOR_LEAKYBUCKETLASTEVENTTIME, MONITOR_LEAKYBUCKETLEVEL32, MONITOR_RESORUCEID, MONITOR_STARTTIME, MONITOR_STATISTICID, MONITOR_STOPTIME, MONITOR_SUBSYSTEMID, MONITOR_THRESHOLDLASTEVENTTIME, MONITOR_WATERMARKHIGH32, MONITOR_WATERMARKHIGHTIME, MONITOR_WATERMARKLOW32, MONITOR_WATERMARKLOWTIME, RMAttribute, RMCLIENT_ERROR_GENERIC_CONFIG, RMCLIENT_ERROR_MONITOR, RMCLIENT_ERROR_MONITOR_STATE, RMCLIENT_ERROR_NOSUCHNAME, RMCLIENT_SUCCESS, GenericConfig::subsystemId, and Monitor::uuid.

int rmMonitor::getUnsigned64 RMAttribute    aName,
unsigned long    aID,
u_int64_t &    aValue
[virtual]
 

Reimplemented from rmBaseArray< Monitor >.

Definition at line 704 of file rmMonitor.cpp.

References rmBaseArray< Monitor >::getConstElement, MONITOR_LASTVALUE64, MONITOR_LEAKYBUCKETLEVEL64, MONITOR_WATERMARKHIGH64, MONITOR_WATERMARKLOW64, RMAttribute, RMCLIENT_ERROR_ACCESS_MONITOR, RMCLIENT_ERROR_MONITOR, RMCLIENT_ERROR_MONITOR_STATE, RMCLIENT_ERROR_NOSUCHNAME, RMCLIENT_SUCCESS, and Monitor::uuid.

int rmMonitor::getUUID RMAttribute    aName,
unsigned long    aID,
uuid_t    aUUID
[virtual]
 

Reimplemented from rmBaseArray< Monitor >.

Definition at line 808 of file rmMonitor.cpp.

References GenericConfig::config, Monitor::configId, rmBaseArray< GenericConfig >::getConstElement, rmBaseArray< Monitor >::getConstElement, mGenericConfig, MONITOR_SUBSYSTEMUUID, MONITOR_UUID, RMAttribute, RMCLIENT_ERROR_BAD_POINTER, RMCLIENT_ERROR_MONITOR, RMCLIENT_ERROR_MONITOR_CONFIG, RMCLIENT_ERROR_NOSUCHNAME, RMCLIENT_ERROR_NOSUCHVALUE, RMCLIENT_SUCCESS, and Monitor::uuid.

int rmMonitor::getUUIDString RMAttribute    aName,
unsigned long    aID,
char *    aUUIDStr
[virtual]
 

Reimplemented from rmBaseArray< Monitor >.

Definition at line 765 of file rmMonitor.cpp.

References GenericConfig::config, Monitor::configId, rmBaseArray< GenericConfig >::getConstElement, rmBaseArray< Monitor >::getConstElement, mGenericConfig, MONITOR_SUBSYSTEMUUID, MONITOR_UUID, RMAttribute, RMCLIENT_ERROR_BAD_POINTER, RMCLIENT_ERROR_MONITOR, RMCLIENT_ERROR_MONITOR_CONFIG, RMCLIENT_ERROR_NOSUCHNAME, RMCLIENT_ERROR_NOSUCHVALUE, RMCLIENT_SUCCESS, and Monitor::uuid.

int rmMonitor::init   [virtual]
 

Initializes the monitor table.

Called during initRMClient(). Loop through all the persistent monitors that are currently registered with ResourceMonitor daemon. Get all the rmMonitorControl and rmMonitorConfiguration informations and add those to the GenericControl and GenericConfig tables accordingly.

See also:
initRMClient().

Reimplemented from rmBaseArray< Monitor >.

Definition at line 77 of file rmMonitor.cpp.

References ACTIVE, rmRefArray< LeakyBucketConfig >::addRef, rmRefArray< LeakyBucketControl >::addRef, rmRefArray< WatermarkConfig >::addRef, rmRefArray< GenericConfig >::addRef, rmRefArray< ThresholdConfig >::addRef, rmGenericMonitorControl::addRef, rmRefArray< ThresholdControl >::addRef, Monitor::command, LeakyBucketConfig::config, WatermarkConfig::config, GenericConfig::config, ThresholdConfig::config, Monitor::configId, LeakyBucketControl::control, GenericControl::control, ThresholdControl::control, Monitor::controlId, subsystemInfo::getSubsystemIDByUUID, GenericConfig::leakyBucketConfigId, GenericControl::leakyBucketControlId, mGenericConfig, mGenericControl, mLeakyBucketConfig, mLeakyBucketControl, mSubsystemInfo, mThresholdConfig, mThresholdControl, mWatermarkConfig, rmBaseArray< Monitor >::newElement, rmBaseArray< LeakyBucketConfig >::newElement, rmBaseArray< LeakyBucketControl >::newElement, rmBaseArray< WatermarkConfig >::newElement, rmBaseArray< GenericConfig >::newElement, rmBaseArray< ThresholdConfig >::newElement, rmBaseArray< GenericControl >::newElement, rmBaseArray< ThresholdControl >::newElement, Monitor::nfHandle, RM_MONITOR_NAME, RMCLIENT_ERROR_ACCESS_MONITOR, RMCLIENT_ERROR_MEMORY, RMCLIENT_ERROR_MONITOR_CONFIG, RMCLIENT_ERROR_MONITOR_CONTROL, RMCLIENT_ERROR_MONITOR_STATE, RMCLIENT_ERROR_PERSISTENT_MONITOR, RMCLIENT_SUCCESS, LeakyBucketConfig::status, LeakyBucketControl::status, WatermarkConfig::status, GenericConfig::status, ThresholdConfig::status, GenericControl::status, ThresholdControl::status, GenericConfig::subsystemId, GenericConfig::thresholdConfigId, GenericControl::thresholdControlId, Monitor::uuid, and GenericConfig::watermarkConfigId.

Referenced by rmClient::init.

int rmMonitor::removeElement unsigned long    aID [virtual]
 

Remove an entry from the table.

Remove a monitor, also decrement the refCnt of the GenericConfig and GenericControl info this monitor is currently referencing.

Parameters:
aID  The id value of this monitor.
Returns:
RMCLIENT_SUCCESS if no error. RMCLIENT_ERROR_BASE_ID if aID invalid.

Reimplemented from rmBaseArray< Monitor >.

Definition at line 20 of file rmMonitor.cpp.

References DELETE_MONITOR, rmBaseArray< Monitor >::mElementArray, mGenericConfig, mGenericControl, rmBaseArray< Monitor >::mMaxId, rmRefArray< GenericConfig >::release, rmRefArray< GenericControl >::release, RMCLIENT_ERROR_BASE_ID, RMCLIENT_ERROR_MONITOR_COMMAND, and RMCLIENT_SUCCESS.

Referenced by setInteger32.

int rmMonitor::setInteger32 RMAttribute    aName,
unsigned long    aID,
long    aValue
[virtual]
 

Reimplemented from rmBaseArray< Monitor >.

Definition at line 349 of file rmMonitor.cpp.

References Monitor::command, GenericConfig::config, Monitor::configId, GenericControl::control, Monitor::controlId, CREATE_MONITOR, DELETE_MONITOR, rmBaseArray< GenericConfig >::getConstElement, rmBaseArray< GenericControl >::getElement, rmBaseArray< Monitor >::getElement, mGenericConfig, mGenericControl, MONITOR_COMMAND, MONITOR_SNMPTRAP, Monitor::nfHandle, PAUSE_NOTIFICATION, removeElement, RESET_MONITOR, RESET_NOTIFICATION, RM_MONITOR_NAME, RMAttribute, RMCLIENT_ERROR_ACCESS_MONITOR, RMCLIENT_ERROR_MONITOR, RMCLIENT_ERROR_MONITOR_COMMAND, RMCLIENT_ERROR_NOSUCHNAME, RMCLIENT_ERROR_NOSUCHVALUE, RMCLIENT_ERROR_NOTIFY_CREATE, RMCLIENT_ERROR_NOTIFY_DESTROY, RMCLIENT_ERROR_QUERY, RMCLIENT_SUCCESS, START_MONITOR, STOP_MONITOR, and Monitor::uuid.

int rmMonitor::setUnsigned RMAttribute    aName,
unsigned long    aID,
unsigned long    aValue
[virtual]
 

Reimplemented from rmBaseArray< Monitor >.

Definition at line 625 of file rmMonitor.cpp.

References ACTIVE, rmRefArray< GenericConfig >::addRef, rmGenericMonitorControl::addRef, GenericConfig::config, Monitor::configId, GenericControl::control, Monitor::controlId, rmBaseArray< GenericConfig >::getElement, rmBaseArray< GenericControl >::getElement, rmBaseArray< Monitor >::getElement, mGenericConfig, mGenericControl, MONITOR_CONFIGID, MONITOR_CONTROLID, GenericControl::refCnt, rmRefArray< GenericConfig >::release, rmRefArray< GenericControl >::release, RMAttribute, RMCLIENT_ERROR_CC_REFCNT, RMCLIENT_ERROR_MONITOR, RMCLIENT_ERROR_MONITOR_CONFIG, RMCLIENT_ERROR_MONITOR_CONTROL, RMCLIENT_ERROR_NOSUCHNAME, RMCLIENT_SUCCESS, GenericConfig::status, GenericControl::status, and Monitor::uuid.


Member Data Documentation

rmGenericMonitorConfig* rmMonitor::mGenericConfig [private]
 

Definition at line 92 of file rmMonitor.h.

Referenced by getUnsigned, getUUID, getUUIDString, init, removeElement, rmMonitor, setInteger32, and setUnsigned.

rmGenericMonitorControl* rmMonitor::mGenericControl [private]
 

Definition at line 96 of file rmMonitor.h.

Referenced by getInteger32, init, removeElement, rmMonitor, setInteger32, and setUnsigned.

rmLeakyBucketMonitorConfig* rmMonitor::mLeakyBucketConfig [private]
 

Definition at line 95 of file rmMonitor.h.

Referenced by init, and rmMonitor.

rmLeakyBucketMonitorControl* rmMonitor::mLeakyBucketControl [private]
 

Definition at line 98 of file rmMonitor.h.

Referenced by init, and rmMonitor.

subsystemInfo* rmMonitor::mSubsystemInfo [private]
 

Definition at line 91 of file rmMonitor.h.

Referenced by init, and rmMonitor.

rmThresholdMonitorConfig* rmMonitor::mThresholdConfig [private]
 

Definition at line 93 of file rmMonitor.h.

Referenced by init, and rmMonitor.

rmThresholdMonitorControl* rmMonitor::mThresholdControl [private]
 

Definition at line 97 of file rmMonitor.h.

Referenced by init, and rmMonitor.

rmWatermarkMonitorConfig* rmMonitor::mWatermarkConfig [private]
 

Definition at line 94 of file rmMonitor.h.

Referenced by init, and rmMonitor.


The documentation for this class was generated from the following files:
Generated on Tue Sep 10 16:46:34 2002 for ResourceMonitorSNMPSubagent by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002