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

rmEvent Class Reference

#include <rmEvent.h>

List of all members.

Public Methods

 rmEvent (subsystemInfo *aSubsystemInfo, resourceInfo *aResourceInfo, dataCaptureInfo *aDataCaptureInfo)
virtual ~rmEvent ()
int init ()
void addEvent (posix_log_recid_t aRecID, unsigned long aMonID)
 add an event into the event queue. More...

void processEvents ()
 process all the events in the queue. More...


Private Methods

int getEventType (posix_log_recid_t aRecID, long &aType)
int getEventText (posix_log_recid_t aRecID, char **aText)
int sendMonitorEvent (EventType aType, eventData &aEvent)
int processSystemEvent (EventType aType, eventData &aEvent)
int sendSubSystemEvent (EventName aEvent, uuid_t aUUID)
int sendResourceEvent (EventName aEvent, uuid_t aUUID, unsigned long aID, string aName)
int sendPluginEvent (EventName aEvent, uuid_t aUUID, unsigned long aID, string aName)

Private Attributes

queue< eventDatamEventQueue
bool mUpdating
posix_log_notify_t mSystemNotifyHandle
subsystemInfomSubsystemInfo
resourceInfomResourceInfo
dataCaptureInfomDataCaptureInfo


Detailed Description

rmEvent handles all the events received by the subagent.

Definition at line 38 of file rmEvent.h.


Constructor & Destructor Documentation

rmEvent::rmEvent subsystemInfo   aSubsystemInfo,
resourceInfo   aResourceInfo,
dataCaptureInfo   aDataCaptureInfo
[inline]
 

Definition at line 42 of file rmEvent.h.

References mDataCaptureInfo, mResourceInfo, and mSubsystemInfo.

virtual rmEvent::~rmEvent   [inline, virtual]
 

Definition at line 49 of file rmEvent.h.

References mSystemNotifyHandle.


Member Function Documentation

void rmEvent::addEvent posix_log_recid_t    aRecID,
unsigned long    aMonID
 

add an event into the event queue.

Subagent calls this function whenever an event is received. The event is stored into a queue for furthur processing.

Definition at line 61 of file rmEvent.cpp.

References mEventQueue, eventData::monid, and eventData::recid.

Referenced by rmClient::addEvent.

int rmEvent::getEventText posix_log_recid_t    aRecID,
char **    aText
[private]
 

Definition at line 135 of file rmEvent.cpp.

References EVENTLOG, EVENTLOG_STRING, and getString.

Referenced by processSystemEvent, and sendMonitorEvent.

int rmEvent::getEventType posix_log_recid_t    aRecID,
long &    aType
[private]
 

Definition at line 129 of file rmEvent.cpp.

References EVENTLOG, EVENTLOG_TYPE, and getInteger32.

Referenced by processEvents.

int rmEvent::init  
 

Definition at line 20 of file rmEvent.cpp.

References mSystemNotifyHandle, RMCLIENT_ERROR_NOTIFY_CREATE, RMCLIENT_ERROR_QUERY, and RMCLIENT_SUCCESS.

Referenced by rmClient::init.

void rmEvent::processEvents  
 

process all the events in the queue.

processEvents() gets called every time the select() loop returned when subagent gets interrupted by a signal.

It actually processes all the events inside the event queue.

Definition at line 80 of file rmEvent.cpp.

References getEventType, LEAKYBUCKET, mEventQueue, processSystemEvent, eventData::recid, RESOURCE, sendMonitorEvent, SUBSYSTEM, THRESHOLD, and THRESHOLDCANCEL.

Referenced by rmClient::processEvents.

int rmEvent::processSystemEvent EventType    aType,
eventData   aEvent
[private]
 

Definition at line 383 of file rmEvent.cpp.

References resourceInfo::addResource, subsystemInfo::addSubsystemByUUID, DATACAPTURE_ADDED, DATACAPTURE_REMOVED, DATACAPTUREPLUGININFO_NAME, EventType, getEventText, dataCaptureInfo::getIDByUUID, dataCaptureInfo::getString, dataCaptureInfo::init, mDataCaptureInfo, mResourceInfo, mSubsystemInfo, eventData::recid, resourceInfo::removeResource, subsystemInfo::removeSubsystemByUUID, RESOURCE, RESOURCE_ADDED, RESOURCE_REMOVED, RMCLIENT_SUCCESS, sendPluginEvent, sendResourceEvent, sendSubSystemEvent, SUBSYSTEM, SUBSYSTEM_ADDED, and SUBSYSTEM_REMOVED.

Referenced by processEvents.

int rmEvent::sendMonitorEvent EventType    aType,
eventData   aEvent
[private]
 

Definition at line 141 of file rmEvent.cpp.

References EventType, getEventText, getUnsigned, LEAKYBUCKET, eventData::monid, MONITOR, MONITOR_CONFIGID, MONITOR_CONTROLID, MONITOR_SUBSYSTEMID, eventData::recid, RMCLIENT_ERROR_NOSUCHNAME, RMCLIENT_SUCCESS, THRESHOLD, and THRESHOLDCANCEL.

Referenced by processEvents.

int rmEvent::sendPluginEvent EventName    aEvent,
uuid_t    aUUID,
unsigned long    aID,
string    aName
[private]
 

Definition at line 490 of file rmEvent.cpp.

References DATACAPTURE_ADDED, DATACAPTURE_REMOVED, EventName, and RMCLIENT_SUCCESS.

Referenced by processSystemEvent.

int rmEvent::sendResourceEvent EventName    aEvent,
uuid_t    aUUID,
unsigned long    aID,
string    aName
[private]
 

Definition at line 306 of file rmEvent.cpp.

References EventName, getString, subsystemInfo::getSubsystemIDByUUID, mSubsystemInfo, RESOURCE_ADDED, RESOURCE_REMOVED, RMCLIENT_SUCCESS, SUBSYSTEMINFO, and SUBSYSTEMINFO_NAME.

Referenced by processSystemEvent.

int rmEvent::sendSubSystemEvent EventName    aEvent,
uuid_t    aUUID
[private]
 

Definition at line 241 of file rmEvent.cpp.

References EventName, getString, subsystemInfo::getSubsystemIDByUUID, mSubsystemInfo, RMCLIENT_SUCCESS, SUBSYSTEM_ADDED, SUBSYSTEM_REMOVED, SUBSYSTEMINFO, and SUBSYSTEMINFO_NAME.

Referenced by processSystemEvent.


Member Data Documentation

dataCaptureInfo* rmEvent::mDataCaptureInfo [private]
 

Definition at line 83 of file rmEvent.h.

Referenced by processSystemEvent, and rmEvent.

queue<eventData> rmEvent::mEventQueue [private]
 

Definition at line 75 of file rmEvent.h.

Referenced by addEvent, and processEvents.

resourceInfo* rmEvent::mResourceInfo [private]
 

Definition at line 82 of file rmEvent.h.

Referenced by processSystemEvent, and rmEvent.

subsystemInfo* rmEvent::mSubsystemInfo [private]
 

Definition at line 81 of file rmEvent.h.

Referenced by processSystemEvent, rmEvent, sendResourceEvent, and sendSubSystemEvent.

posix_log_notify_t rmEvent::mSystemNotifyHandle [private]
 

Definition at line 79 of file rmEvent.h.

Referenced by init, and ~rmEvent.

bool rmEvent::mUpdating [private]
 

Definition at line 77 of file rmEvent.h.


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