AgentXRequestList Class Reference

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

#include <agentx_request.h>

List of all members.

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:
agentxProtocol a 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::receive ( int   )  [virtual]

Wait a given time for an incoming request.

Parameters:
timeout the 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.

virtual void AgentXRequestList::answer ( Request *   )  [virtual]

Answer a Request by sending the corresponding response PDU.

Parameters:
req - A pointer to a processed Request.

void AgentXRequestList::remove ( Request *   ) 

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

Parameters:
request a pointer to a request

AgentXSlave* AgentXRequestList::get_agentx (  )  [inline]

Get the agentx protocol service provider for sub-agents.

Returns:
a pointer to an AgentXSlave instance.

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.

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.

virtual Request* AgentXRequestList::add_request ( Request *   )  [protected, virtual]

Add a Request to the RequestList.

Parameters:
req - A pointer to a Request.
Returns:
A pointer to the added Request.


Member Data Documentation


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

Generated on Tue May 26 23:32:15 2009 for AgentX++ by  doxygen 1.5.6