Represents an AddAgentCaps-PDU. More...
#include <AddAgentCapsPDU.hpp>
Public Member Functions | |
AddAgentCapsPDU (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian) | |
Parse constructor. More... | |
AddAgentCapsPDU () | |
Default Constructor. More... | |
AddAgentCapsPDU (Oid id, OctetStringVariable descr) | |
Constructor. More... | |
void | set_id (Oid id) |
Set the id field. More... | |
Oid | get_id () |
Get the id field. More... | |
void | set_descr (OctetStringVariable descr) |
Set the descr field. More... | |
OctetStringVariable | get_descr () |
Get the descr field. More... | |
virtual binary | serialize () |
Serialize the PDU. More... | |
![]() | |
bool | has_context () |
Whether the PDU has a context. More... | |
OctetStringVariable | get_context () |
Get context. More... | |
void | set_context (OctetStringVariable value) |
Set the PDU's context. More... | |
void | remove_context () |
Removes the context from the PDU. More... | |
![]() | |
virtual | ~PDU () |
Destructor. More... | |
bool | get_new_index () |
Get new_index flag. More... | |
void | set_new_index (bool new_index) |
Set new_index flag. More... | |
bool | get_any_index () |
Get any_index flag. More... | |
void | set_any_index (bool any_index) |
Set any_index flag. More... | |
quint32 | get_sessionID () |
Get sessionID. More... | |
void | set_sessionID (quint32 id) |
Set sessionID. More... | |
quint32 | get_transactionID () |
Get transactionID. More... | |
void | set_transactionID (quint32 id) |
Set transactionID. More... | |
quint32 | get_packetID () |
Get packetID. More... | |
void | set_packetID (quint32 packetID) |
Set packetID. More... | |
virtual binary | serialize () const =0 |
Serialize function for concrete PDUs. More... | |
Private Attributes | |
Oid | id |
The Object Identifier containing the value of an invocation of the AGENT-CAPABILITIES macro. More... | |
OctetStringVariable | descr |
An Octet String containing a DisplayString to be used as the value of sysORDescr corresponding to the sysORID value above. More... | |
Additional Inherited Members | |
![]() | |
static QSharedPointer< PDU > | parse_pdu (binary buf) |
Parse a PDU from a buffer. More... | |
![]() | |
enum | type_t { agentxOpenPDU = 1, agentxClosePDU = 2, agentxRegisterPDU = 3, agentxUnregisterPDU = 4, agentxGetPDU = 5, agentxGetNextPDU = 6, agentxGetBulkPDU = 7, agentxTestSetPDU = 8, agentxCommitSetPDU = 9, agentxUndoSetPDU = 10, agentxCleanupSetPDU = 11, agentxNotifyPDU = 12, agentxPingPDU = 13, agentxIndexAllocatePDU = 14, agentxIndexDeallocatePDU = 15, agentxAddAgentCapsPDU = 16, agentxRemoveAgentCapsPDU = 17, agentxResponsePDU = 18 } |
The PDU types. More... | |
![]() | |
PDUwithContext (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian) | |
Parse constructor. More... | |
void | add_header (type_t type, binary &payload) const |
Add PDU header and context field to the payload. More... | |
PDUwithContext () | |
Default Constructor. More... | |
![]() | |
PDU (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian) | |
Parse constructor. More... | |
void | add_header (type_t type, binary &payload) const |
Construct the PDU header and add it to the payload. More... | |
PDU () | |
Default constructor. More... | |
![]() | |
bool | instance_registration |
the instance_registration flag More... | |
bool | non_default_context |
Whether the PDU has a non-default context. More... | |
quint32 | packetID |
h.packetID field according to RFC 2741, 6.1. "AgentX PDU
Header". More... | |
Represents an AddAgentCaps-PDU.
Definition at line 33 of file AddAgentCapsPDU.hpp.
AddAgentCapsPDU::AddAgentCapsPDU | ( | binary::const_iterator & | pos, |
const binary::const_iterator & | end, | ||
bool | big_endian | ||
) |
Parse constructor.
Construct the object by parsing a stream. See Parsing incoming PDUs for details about PDU parsing.
pos | Iterator pointing to the current stream position. The iterator is advanced while reading the header. |
end | Iterator pointing one element past the end of the current stream. This is needed to mark the end of the buffer. |
big_endian | Whether the serialized form of the PDU is in big_endian format. |
parse_error | If parsing fails, for example because reading the stream fails or the PDU is malformed. |
Definition at line 26 of file AddAgentCapsPDU.cpp.
References descr, and agentxcpp::OidVariable::value().
|
inline |
Default Constructor.
Sets the state of the object to the defaults as set by the PDU::PDUwithContext() constructor. The fields 'id' and 'descr' are initialized to be empty.
Definition at line 87 of file AddAgentCapsPDU.hpp.
AddAgentCapsPDU::AddAgentCapsPDU | ( | Oid | id, |
OctetStringVariable | descr | ||
) |
Constructor.
Sets the state of the object to the defaults as set by the PDU::PDUwithContext() constructor. The fields id and descr are initialized according to the parameters.
id | The value of the id field. |
descr | The value of the descr field. |
Definition at line 58 of file AddAgentCapsPDU.cpp.
|
inline |
Get the descr field.
Definition at line 137 of file AddAgentCapsPDU.hpp.
References descr.
|
inline |
Get the id field.
Definition at line 117 of file AddAgentCapsPDU.hpp.
References id.
|
virtual |
Serialize the PDU.
Definition at line 42 of file AddAgentCapsPDU.cpp.
References agentxcpp::PDUwithContext::add_header(), agentxcpp::PDU::agentxAddAgentCapsPDU, descr, agentxcpp::OctetStringVariable::serialize(), and agentxcpp::OidVariable::serialize().
|
inline |
Set the descr field.
descr | The new descr value. |
Definition at line 127 of file AddAgentCapsPDU.hpp.
References descr.
|
inline |
Set the id field.
id | The new id value. |
Definition at line 107 of file AddAgentCapsPDU.hpp.
References id.
|
private |
An Octet String containing a DisplayString to be used as the value of sysORDescr corresponding to the sysORID value above.
See RFC 2741, 6.2.14. "The agentx-AddAgentCaps-PDU" for details.
Definition at line 52 of file AddAgentCapsPDU.hpp.
Referenced by AddAgentCapsPDU(), get_descr(), serialize(), and set_descr().
|
private |
The Object Identifier containing the value of an invocation of the AGENT-CAPABILITIES macro.
See RFC 2741, 6.2.14. "The agentx-AddAgentCaps-PDU" for details.
Definition at line 43 of file AddAgentCapsPDU.hpp.
Referenced by AddAgentCapsPDU(), get_id(), and set_id().