The AgentXRequestList implements a RequestList for AgentX sub-agents.
More...
#include <agentx_request.h>
|
| | 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.
|
| |
|
| virtual Request * | add_request (Request *) |
| | Add a Request to the RequestList.
|
| |
The AgentXRequestList implements a RequestList for AgentX sub-agents.
- Author
- Frank Fock
- Version
- 1.5
| AgentXRequestList::AgentXRequestList |
( |
| ) |
|
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 |
| 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. |
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
-
| 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.
| void AgentXRequestList::remove |
( |
Request * |
| ) |
|
Remove a given request from the request list and delete it.
- Parameters
-
| request | a 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.
The documentation for this class was generated from the following file: