AgentXcpp  Revision:0.2
Internals Documentation
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Pages
agentxcpp::UnregisterPDU Class Reference

This class represents an Unregister-PDU. More...

#include <UnregisterPDU.hpp>

Inheritance diagram for agentxcpp::UnregisterPDU:
Collaboration diagram for agentxcpp::UnregisterPDU:

Public Member Functions

void set_upper_bound (uint32_t upper_bound)
 Set the upper_bound.
uint32_t get_upper_bound ()
 Get the upper_bound.
void set_subtree (OidValue subtree)
 Set the subtree.
OidValue get_subtree ()
 Get the subtree.
void set_range_subid (uint8_t range_subid)
 Set the range_subid.
uint8_t get_range_subid ()
 Get the range_subid.
void set_priority (uint8_t priority)
 Set the priority.
uint8_t get_priority ()
 Get the priority.
 UnregisterPDU (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian)
 Parse constructor.
binary serialize () const
 Serialize the PDU.
 UnregisterPDU ()
 Default Constructor.
- Public Member Functions inherited from agentxcpp::PDUwithContext
bool has_context ()
 Whether the PDU has a context.
OctetStringValue get_context ()
 Get context.
void set_context (OctetStringValue value)
 Set the PDU's context.
void remove_context ()
 Removes the context from the PDU.
- Public Member Functions inherited from agentxcpp::PDU
bool get_new_index ()
 Get new_index flag.
void set_new_index (bool new_index)
 Set new_index flag.
bool get_any_index ()
 Get any_index flag.
void set_any_index (bool any_index)
 Set any_index flag.
uint32_t get_sessionID ()
 Get sessionID.
void set_sessionID (uint32_t id)
 Set sessionID.
uint32_t get_transactionID ()
 Get transactionID.
void set_transactionID (uint32_t id)
 Set transactionID.
uint32_t get_packetID ()
 Get packetID.
void set_packetID (uint32_t packetID)
 Set packetID.

Private Attributes

uint8_t priority
uint8_t range_subid
OidValue subtree
uint32_t upper_bound

Additional Inherited Members

- Static Public Member Functions inherited from agentxcpp::PDU
static shared_ptr< PDUparse_pdu (binary buf)
 Parse a PDU from a buffer.
- Protected Types inherited from agentxcpp::PDU
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...
- Protected Member Functions inherited from agentxcpp::PDUwithContext
 PDUwithContext (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian)
 Parse constructor.
void add_header (type_t type, binary &payload) const
 Add PDU header and context field to the payload.
 PDUwithContext ()
 Default Constructor.
- Protected Attributes inherited from agentxcpp::PDU
bool instance_registration
 the instance_registration flag
bool non_default_context
 Whether the PDU has a non-default context.
uint32_t packetID
 h.packetID field according to RFC 2741, 6.1. "AgentX PDU Header".

Detailed Description

This class represents an Unregister-PDU.

Definition at line 36 of file UnregisterPDU.hpp.

Constructor & Destructor Documentation

UnregisterPDU::UnregisterPDU ( 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.

Parameters
posIterator pointing to the current stream position. The iterator is advanced while reading the header.
endIterator pointing one element past the end of the current stream. This is needed to mark the end of the buffer.
big_endianWhether the serialized form of the PDU is in big_endian format.
Exceptions
parse_errorIf parsing fails, for example because reading the stream fails or the PDU is malformed.

Definition at line 24 of file UnregisterPDU.cpp.

References priority, range_subid, agentxcpp::read32(), subtree, and upper_bound.

UnregisterPDU::UnregisterPDU ( )

Default Constructor.

Sets the state of the object to the defaults as set by the PDU::PDU() constructor, plus the following:

  • priority = 127 (The default when registering an object according to RFC 2741, section '6.2.3. The agentx-Register-PDU')
  • subtree = null Object Identifier
  • range_subid = 0
  • upper_bound = null Object Identifier

Definition at line 76 of file UnregisterPDU.cpp.

Member Function Documentation

uint8_t agentxcpp::UnregisterPDU::get_priority ( )
inline

Get the priority.

Definition at line 100 of file UnregisterPDU.hpp.

References priority.

uint8_t agentxcpp::UnregisterPDU::get_range_subid ( )
inline

Get the range_subid.

Definition at line 85 of file UnregisterPDU.hpp.

References range_subid.

OidValue agentxcpp::UnregisterPDU::get_subtree ( )
inline

Get the subtree.

Definition at line 70 of file UnregisterPDU.hpp.

References subtree.

uint32_t agentxcpp::UnregisterPDU::get_upper_bound ( )
inline

Get the upper_bound.

Definition at line 55 of file UnregisterPDU.hpp.

References upper_bound.

binary UnregisterPDU::serialize ( ) const
virtual
void agentxcpp::UnregisterPDU::set_priority ( uint8_t  priority)
inline

Set the priority.

Definition at line 93 of file UnregisterPDU.hpp.

References priority.

void agentxcpp::UnregisterPDU::set_range_subid ( uint8_t  range_subid)
inline

Set the range_subid.

Definition at line 78 of file UnregisterPDU.hpp.

References range_subid.

void agentxcpp::UnregisterPDU::set_subtree ( OidValue  subtree)
inline

Set the subtree.

Definition at line 63 of file UnregisterPDU.hpp.

References subtree.

void agentxcpp::UnregisterPDU::set_upper_bound ( uint32_t  upper_bound)
inline

Set the upper_bound.

Definition at line 48 of file UnregisterPDU.hpp.

References upper_bound.

Member Data Documentation

uint8_t agentxcpp::UnregisterPDU::priority
private

Definition at line 39 of file UnregisterPDU.hpp.

Referenced by get_priority(), serialize(), set_priority(), and UnregisterPDU().

uint8_t agentxcpp::UnregisterPDU::range_subid
private

Definition at line 40 of file UnregisterPDU.hpp.

Referenced by get_range_subid(), serialize(), set_range_subid(), and UnregisterPDU().

OidValue agentxcpp::UnregisterPDU::subtree
private

Definition at line 41 of file UnregisterPDU.hpp.

Referenced by get_subtree(), serialize(), set_subtree(), and UnregisterPDU().

uint32_t agentxcpp::UnregisterPDU::upper_bound
private

Definition at line 42 of file UnregisterPDU.hpp.

Referenced by get_upper_bound(), serialize(), set_upper_bound(), and UnregisterPDU().


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