Base class for SNMP variables. More...
#include <AbstractVariable.hpp>
Public Types | |
enum | testset_result_t { noError = 0, genErr = 5, noAccess = 6, wrongType = 7, wrongLength = 8, wrongValue = 10, noCreation = 11, inconsistentValue = 12, resourceUnavailable = 13, notWritable = 17, inconsistentName = 18 } |
Result type for the TestSet validation. More... |
Public Member Functions | |
virtual | ~AbstractVariable () |
Destructor. | |
virtual shared_ptr< AbstractValue > | handle_get ()=0 |
Handle AgentX Get request. | |
virtual testset_result_t | handle_testset (shared_ptr< AbstractValue >)=0 |
Validate whether a Set operation would be successful. | |
virtual void | handle_cleanupset ()=0 |
Release resources after a Set operation. | |
virtual bool | handle_commitset ()=0 |
Actually perform the Set operation. | |
virtual bool | handle_undoset ()=0 |
Undo a Set operation which was already performed. |
Base class for SNMP variables.
This class is the base class for SNMP variable implementations. It provides the interface which is used internally by agentXcpp to perform operations on variables.
Result type for the TestSet validation.
A value of this type is returned during a TestSet operation according to RFC 2741, 7.2.4.1. "Subagent Processing of the agentx-TestSet-PDU".
|
inlinevirtual |
Destructor.
|
pure virtual |
Release resources after a Set operation.
This method is called when a CleanupSet request is received. It shall release all resources previously allocated by handle_testset() (if any). If no resources were allocated, this method is not required to do anything.
|
pure virtual |
Actually perform the Set operation.
This method is called when a CommitSet request is received for the variable. It shall perform the Set operation. It shall report whether the operation succeeded.
|
pure virtual |
Handle AgentX Get request.
This method is called when a get request is received for the variable. It shall return the current value of the variable.
generic_error | If obtaining the current value fails. No other exception shall be thrown. |
|
pure virtual |
Validate whether a Set operation would be successful.
This method is called when a TestSet request is received. It shall check whether a Set operation is possible for the variable. It shall acquire the resources needed to perform the Set operation (but the Set shall not yet performed).
|
pure virtual |
Undo a Set operation which was already performed.
This method is called when an UndoSet request is received. It shall undo the operation performed by handle_commitset().