#include <agentx_request.h>
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. | |
AgentXSlave * | get_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 | |
AgentXSlave * | agentx |
AgentXRequestList::AgentXRequestList | ( | ) |
Default constructor.
AgentXRequestList::AgentXRequestList | ( | AgentXSlave * | ) |
Constructor with AgentX protocol services.
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.
virtual Request* AgentXRequestList::receive | ( | int | ) | [virtual] |
Wait a given time for an incoming request.
timeout | the maximum time in 1/100 seconds to wait for an incoming request. |
virtual void AgentXRequestList::answer | ( | Request * | ) | [virtual] |
Answer a Request by sending the corresponding response PDU.
req | - A pointer to a processed Request. |
void AgentXRequestList::remove | ( | Request * | ) |
Remove a given request from the request list and delete it.
request | a pointer to a request |
AgentXSlave* AgentXRequestList::get_agentx | ( | ) | [inline] |
Get the agentx protocol service provider for sub-agents.
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.
req | - A pointer to a Request. |
AgentXSlave* AgentXRequestList::agentx [protected] |