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

subagentBase Class Reference

Inheritance diagram for subagentBase:

rmClient List of all members.

Public Methods

 subagentBase ()
virtual ~subagentBase ()
virtual int init ()=0
 initialize the subagent. More...

virtual void shutdown ()=0
 shutdown the subagent. More...

virtual int getInteger32 (RMEntity aEntity, RMAttribute aName, unsigned long aID, long &aValue)
virtual int setInteger32 (RMEntity aEntity, RMAttribute aName, unsigned long aID, long aValue)
virtual int getUnsigned (RMEntity aEntity, RMAttribute aName, unsigned long aID, unsigned long &aValue)
virtual int setUnsigned (RMEntity aEntity, RMAttribute aName, unsigned long aID, unsigned long aValue)
virtual int getUnsigned64 (RMEntity aEntity, RMAttribute aName, unsigned long aID, u_int64_t &aValue)
virtual int setUnsigned64 (RMEntity aEntity, RMAttribute aName, unsigned long aID, u_int64_t aValue)
virtual int getUUID (RMEntity aEntity, RMAttribute aName, unsigned long aID, uuid_t aUUID)
virtual int getUUIDString (RMEntity aEntity, RMAttribute aName, unsigned long aID, char *aBuf)
virtual int setUUIDString (RMEntity aEntity, RMAttribute aName, unsigned long aID, char *aUUID)
virtual int getString (RMEntity aEntity, RMAttribute aName, unsigned long aID, char *&aBuf)
virtual int setString (RMEntity aEntity, RMAttribute aName, unsigned long aID, char *aBuf)
virtual int getBinary (RMEntity aEntity, RMAttribute aName, unsigned long aID, char *&aBuf, unsigned long &aLength)
virtual int newEntry (RMEntity aEntity, unsigned long aID)
virtual int deleteEntry (RMEntity aEntity, unsigned long aID)
virtual unsigned long getNewId (RMEntity aEntity)
 get the ID of the next entry to be created. More...

virtual int findId (RMEntity aEntity, unsigned long aID)
 find if a certain ID exists. More...

virtual int getNextId (RMEntity aEntity, unsigned long aID, unsigned long &aNextID)
 get the next ID exists in the table. More...

virtual size_t getCount (RMEntity aEntity)
 get the total count. More...

virtual void addEvent (posix_log_recid_t aRecid, unsigned long aId)=0
 add event for a subagent. More...

virtual void processEvents ()=0
 process all the events. More...


Protected Methods

virtual IBaseAccessorgetEntity (RMEntity aEntity)=0
 get the class that implements aEntity. More...


Detailed Description

subagentBase is the glue between the C interface and C++ implementation.

The subagentBase contains all the methods that are defined in the rmClient.h. This class is the proxy between the C API and the C++ functions.

Subagents, ResourceMonitor subagent, EventLog subagent, all inheriate this interface.

Definition at line 40 of file rmClient.cpp.


Constructor & Destructor Documentation

subagentBase::subagentBase   [inline]
 

Definition at line 43 of file rmClient.cpp.

virtual subagentBase::~subagentBase   [inline, virtual]
 

Definition at line 44 of file rmClient.cpp.


Member Function Documentation

virtual void subagentBase::addEvent posix_log_recid_t    aRecid,
unsigned long    aId
[pure virtual]
 

add event for a subagent.

Implemented in rmClient.

Referenced by addEvent.

int subagentBase::deleteEntry RMEntity    aEntity,
unsigned long    aID
[virtual]
 

Delegates the deleteEntry() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aID  the ID of the entry in the table.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 480 of file rmClient.cpp.

References getEntity, IBaseAccessor::removeElement, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by deleteEntry.

int subagentBase::findId RMEntity    aEntity,
unsigned long    aID
[virtual]
 

find if a certain ID exists.

Delegates the findId() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aID  the ID of the entry in the table.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 524 of file rmClient.cpp.

References IBaseAccessor::findExactId, getEntity, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by findId.

int subagentBase::getBinary RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
char *&    aBuf,
unsigned long &    aLength
[virtual]
 

Delegates the getBinary() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aBuf  pointer to the buffer that contains the binary data string.
aLength  the length of the binary buffer.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:
Buffer is dynamically allocated. Caller needs to call free().

Definition at line 436 of file rmClient.cpp.

References IBaseAccessor::getBinary, getEntity, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by getBinary.

size_t subagentBase::getCount RMEntity    aEntity [virtual]
 

get the total count.

Delegates the getCount() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 570 of file rmClient.cpp.

References IBaseAccessor::getCount, getEntity, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by getCount.

virtual IBaseAccessor* subagentBase::getEntity RMEntity    aEntity [protected, pure virtual]
 

get the class that implements aEntity.

Implemented in rmClient.

Referenced by deleteEntry, findId, getBinary, getCount, getInteger32, getNewId, getNextId, getString, getUnsigned, getUnsigned64, getUUID, getUUIDString, newEntry, setInteger32, setString, setUnsigned, setUnsigned64, and setUUIDString.

int subagentBase::getInteger32 RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
long &    aValue
[virtual]
 

Delegates the getInteger32() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aValue  the value of the attribute that gets returned.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 159 of file rmClient.cpp.

References getEntity, IBaseAccessor::getInteger32, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by getInteger32.

unsigned long subagentBase::getNewId RMEntity    aEntity [virtual]
 

get the ID of the next entry to be created.

Delegates the getNewId() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 502 of file rmClient.cpp.

References getEntity, IBaseAccessor::getNewId, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by getNewId.

int subagentBase::getNextId RMEntity    aEntity,
unsigned long    aID,
unsigned long &    aNextID
[virtual]
 

get the next ID exists in the table.

Delegates the getNextId() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aNextId  the ID of the entry that is immediately following aID.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 549 of file rmClient.cpp.

References getEntity, IBaseAccessor::getNextId, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by getNextId.

int subagentBase::getString RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
char *&    aBuf
[virtual]
 

Delegates the getString() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aBuf  pointer to the buffer contains the string.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:
Buffer is dynamically allocated using malloc(). Caller needs to free().

Definition at line 385 of file rmClient.cpp.

References getEntity, IBaseAccessor::getString, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by getString.

int subagentBase::getUnsigned RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
unsigned long &    aValue
[virtual]
 

Delegates the getUnsigned() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aValue  the value of the attribute that gets returned.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 208 of file rmClient.cpp.

References getEntity, IBaseAccessor::getUnsigned, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by getUnsigned.

int subagentBase::getUnsigned64 RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
u_int64_t &    aValue
[virtual]
 

Delegates the getUnsigned64() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aValue  the value of the attribute that gets returned.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 258 of file rmClient.cpp.

References getEntity, IBaseAccessor::getUnsigned64, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by getUnsigned64.

int subagentBase::getUUID RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
uuid_t    aUUID
[virtual]
 

Delegates the getUUID() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aUUID  the uuid that gets returned.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:
caller allocates memory since the uuid length is pre-determined.

Definition at line 308 of file rmClient.cpp.

References getEntity, IBaseAccessor::getUUID, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by getUUID.

int subagentBase::getUUIDString RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
char *    aBuf
[virtual]
 

Delegates the getUUIDString() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aBuf  the pointer to the buffer that gets returned.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:
Buffer is dynamically allocated using malloc(). Caller has to call free().

Definition at line 334 of file rmClient.cpp.

References getEntity, IBaseAccessor::getUUIDString, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by getUUIDString.

virtual int subagentBase::init   [pure virtual]
 

initialize the subagent.

Implemented in rmClient.

Referenced by initRMClient.

int subagentBase::newEntry RMEntity    aEntity,
unsigned long    aID
[virtual]
 

Delegates the newEntry() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aID  the ID of the entry in the table.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 458 of file rmClient.cpp.

References IBaseAccessor::addDefaultElement, getEntity, RMCLIENT_ERROR_NOSUCHENTITY, and RMEntity.

Referenced by newEntry.

virtual void subagentBase::processEvents   [pure virtual]
 

process all the events.

Implemented in rmClient.

Referenced by processEvents.

int subagentBase::setInteger32 RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
long    aValue
[virtual]
 

Delegates the setInteger32() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aValue  the desired value of the attribute.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 183 of file rmClient.cpp.

References getEntity, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, RMEntity, and IBaseAccessor::setInteger32.

Referenced by setInteger32.

int subagentBase::setString RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
char *    aBuf
[virtual]
 

Delegates the setString() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aBuf  pointer to the string.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 410 of file rmClient.cpp.

References getEntity, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, RMEntity, and IBaseAccessor::setString.

Referenced by setString.

int subagentBase::setUnsigned RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
unsigned long    aValue
[virtual]
 

Delegates the setUnsigned() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aValue  the value of the attribute.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 233 of file rmClient.cpp.

References getEntity, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, RMEntity, and IBaseAccessor::setUnsigned.

Referenced by setUnsigned.

int subagentBase::setUnsigned64 RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
u_int64_t    aValue
[virtual]
 

Delegates the setUnsigned64() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aValue  the value of the attribute.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 283 of file rmClient.cpp.

References getEntity, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, RMEntity, and IBaseAccessor::setUnsigned64.

Referenced by setUnsigned64.

int subagentBase::setUUIDString RMEntity    aEntity,
RMAttribute    aName,
unsigned long    aID,
char *    aUUID
[virtual]
 

Delegates the setUUIDString() request to the object based on aEntity.

Parameters:
aEntity  the name of the entity object.
aName  the name of the attribute.
aID  the ID of the entry in the table.
aUUID  pointer to the UUID string.
Returns:
RMCLIENT_SUCCESS or other error numbers.
Remarks:

Definition at line 359 of file rmClient.cpp.

References getEntity, RMAttribute, RMCLIENT_ERROR_NOSUCHENTITY, RMEntity, and IBaseAccessor::setUUIDString.

Referenced by setUUIDString.

virtual void subagentBase::shutdown   [pure virtual]
 

shutdown the subagent.

Implemented in rmClient.

Referenced by shutdownRMClient.


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