AgentXcpp  Version:0.3
Internals Documentation
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Pages
agentxcpp::RegisterPDU Class Reference

This class represents a Register-PDU. More...

#include <RegisterPDU.hpp>

Inheritance diagram for agentxcpp::RegisterPDU:
Collaboration diagram for agentxcpp::RegisterPDU:

Public Member Functions

void set_upper_bound (quint32 upper_bound)
 Set the upper_bound. More...
 
quint32 get_upper_bound ()
 Get the upper_bound. More...
 
void set_subtree (Oid subtree)
 Set the subtree. More...
 
Oid get_subtree ()
 Get the subtree. More...
 
void set_range_subid (quint8 range_subid)
 Set the range_subid. More...
 
quint8 get_range_subid ()
 Get the range_subid. More...
 
void set_priority (quint8 priority)
 Set the priority. More...
 
quint8 get_priority ()
 Get the priority. More...
 
void set_timeout (quint8 timeout)
 Set the timeout. More...
 
quint8 get_timeout ()
 Get the timeout. More...
 
 RegisterPDU (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian)
 Parse constructor. More...
 
binary serialize () const
 Serialize the PDU. More...
 
 RegisterPDU ()
 Default Constructor. More...
 
bool get_instance_registration ()
 Get instance_registration flag. More...
 
void set_instance_registration (bool ir)
 Set instance_registration flag. More...
 
- Public Member Functions inherited from agentxcpp::PDUwithContext
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...
 
- Public Member Functions inherited from agentxcpp::PDU
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...
 

Private Attributes

quint8 timeout
 
quint8 priority
 
Oid subtree
 
quint8 range_subid
 
quint32 upper_bound
 

Additional Inherited Members

- Static Public Member Functions inherited from agentxcpp::PDU
static QSharedPointer< PDUparse_pdu (binary buf)
 Parse a PDU from a buffer. More...
 
- 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. More...
 
void add_header (type_t type, binary &payload) const
 Add PDU header and context field to the payload. More...
 
 PDUwithContext ()
 Default Constructor. More...
 
- Protected Member Functions inherited from agentxcpp::PDU
 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...
 
- Protected Attributes inherited from agentxcpp::PDU
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...
 

Detailed Description

This class represents a Register-PDU.

Definition at line 34 of file RegisterPDU.hpp.

Constructor & Destructor Documentation

RegisterPDU::RegisterPDU ( 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 25 of file RegisterPDU.cpp.

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

RegisterPDU::RegisterPDU ( )

Default Constructor.

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

  • timeout = 0
  • priority = 127 (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 78 of file RegisterPDU.cpp.

Member Function Documentation

bool agentxcpp::RegisterPDU::get_instance_registration ( )
inline

Get instance_registration flag.

The instance_registration flag is part of the PDU header and therefore located in the PDU class. However, it is used only by Register-PDUs, therefore the getter method is located here.

Definition at line 169 of file RegisterPDU.hpp.

References agentxcpp::PDU::instance_registration.

quint8 agentxcpp::RegisterPDU::get_priority ( )
inline

Get the priority.

Definition at line 99 of file RegisterPDU.hpp.

References priority.

quint8 agentxcpp::RegisterPDU::get_range_subid ( )
inline

Get the range_subid.

Definition at line 84 of file RegisterPDU.hpp.

References range_subid.

Oid agentxcpp::RegisterPDU::get_subtree ( )
inline

Get the subtree.

Definition at line 69 of file RegisterPDU.hpp.

References subtree.

quint8 agentxcpp::RegisterPDU::get_timeout ( )
inline

Get the timeout.

Definition at line 114 of file RegisterPDU.hpp.

References timeout.

quint32 agentxcpp::RegisterPDU::get_upper_bound ( )
inline

Get the upper_bound.

Definition at line 54 of file RegisterPDU.hpp.

References upper_bound.

void agentxcpp::RegisterPDU::set_instance_registration ( bool  ir)
inline

Set instance_registration flag.

The instance_registration flag is part of the PDU header and therefore located in the PDU class. However, it is used only by Register-PDUs, therefore the setter method is located here.

Definition at line 181 of file RegisterPDU.hpp.

References agentxcpp::PDU::instance_registration.

void agentxcpp::RegisterPDU::set_priority ( quint8  priority)
inline

Set the priority.

Definition at line 92 of file RegisterPDU.hpp.

References priority.

void agentxcpp::RegisterPDU::set_range_subid ( quint8  range_subid)
inline

Set the range_subid.

Definition at line 77 of file RegisterPDU.hpp.

References range_subid.

void agentxcpp::RegisterPDU::set_subtree ( Oid  subtree)
inline

Set the subtree.

Definition at line 62 of file RegisterPDU.hpp.

References subtree.

void agentxcpp::RegisterPDU::set_timeout ( quint8  timeout)
inline

Set the timeout.

Definition at line 107 of file RegisterPDU.hpp.

References timeout.

void agentxcpp::RegisterPDU::set_upper_bound ( quint32  upper_bound)
inline

Set the upper_bound.

Definition at line 47 of file RegisterPDU.hpp.

References upper_bound.

Member Data Documentation

quint8 agentxcpp::RegisterPDU::priority
private

Definition at line 38 of file RegisterPDU.hpp.

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

quint8 agentxcpp::RegisterPDU::range_subid
private

Definition at line 40 of file RegisterPDU.hpp.

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

Oid agentxcpp::RegisterPDU::subtree
private

Definition at line 39 of file RegisterPDU.hpp.

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

quint8 agentxcpp::RegisterPDU::timeout
private

Definition at line 37 of file RegisterPDU.hpp.

Referenced by get_timeout(), RegisterPDU(), serialize(), and set_timeout().

quint32 agentxcpp::RegisterPDU::upper_bound
private

Definition at line 41 of file RegisterPDU.hpp.

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


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