AgentX++  2.0.5
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
AgentXRequestList Class Reference

The AgentXRequestList implements a RequestList for AgentX sub-agents. More...

#include <agentx_request.h>

Inheritance diagram for AgentXRequestList:

Public Member Functions

 AgentXRequestList ()
 Default constructor.
 
 AgentXRequestList (AgentXSlave *)
 Constructor with AgentX protocol services.
 
virtual ~AgentXRequestList ()
 Destructor.
 
virtual Request * receive (int)
 Wait a given time for an incoming request.
 
virtual void answer (Request *)
 Answer a Request by sending the corresponding response PDU.
 
void remove (Request *)
 Remove a given request from the request list and delete it.
 
AgentXSlaveget_agentx ()
 Get the agentx protocol service provider for sub-agents.
 
void timeout_set_requests ()
 Time out any unfinished set requests that have not reached their next state within AGENTX_TIMEOUT seconds.
 
void terminate_set_requests ()
 Terminate any pending set requests and call cleanup_set_request() on any allocated resources.
 

Protected Member Functions

virtual Request * add_request (Request *)
 Add a Request to the RequestList.
 

Protected Attributes

AgentXSlaveagentx
 

Detailed Description

The AgentXRequestList implements a RequestList for AgentX sub-agents.

Author
Frank Fock
Version
1.5

Constructor & Destructor Documentation

AgentXRequestList::AgentXRequestList ( )

Default constructor.

AgentXRequestList::AgentXRequestList ( AgentXSlave )

Constructor with AgentX protocol services.

Parameters
agentxProtocola pointer to an AgentXSlave instance that provides the AgentX protocol operations needed for sending and receiving AgentX PDUs.
virtual AgentXRequestList::~AgentXRequestList ( )
virtual

Destructor.

Member Function Documentation

virtual Request* AgentXRequestList::add_request ( Request *  )
protectedvirtual

Add a Request to the RequestList.

Parameters
req- A pointer to a Request.
Returns
A pointer to the added Request.
virtual void AgentXRequestList::answer ( Request *  )
virtual

Answer a Request by sending the corresponding response PDU.

Parameters
req- A pointer to a processed Request.
AgentXSlave* AgentXRequestList::get_agentx ( )
inline

Get the agentx protocol service provider for sub-agents.

Returns
a pointer to an AgentXSlave instance.
virtual Request* AgentXRequestList::receive ( int  )
virtual

Wait a given time for an incoming request.

Parameters
timeoutthe maximum time in 1/100 seconds to wait for an incoming request.
Returns
a pointer to the received request or 0 if within the timeout period no request has been received.
void AgentXRequestList::remove ( Request *  )

Remove a given request from the request list and delete it.

Parameters
requesta pointer to a request
void AgentXRequestList::terminate_set_requests ( )

Terminate any pending set requests and call cleanup_set_request() on any allocated resources.

This method should be called when connection to the master agent got lost.

void AgentXRequestList::timeout_set_requests ( )

Time out any unfinished set requests that have not reached their next state within AGENTX_TIMEOUT seconds.

These requests allocate locks on corresponding MIB entries and probably resources on that entries. Thus, the cleanup_set_request method has to be called for these entries and the locks have to be released.

Note: This method is not synchronized! Call RequestList::lock() before using it. This method is automatically called within AgentXRequestList::add_request.

Member Data Documentation

AgentXSlave* AgentXRequestList::agentx
protected

The documentation for this class was generated from the following file: