AgentXcpp  Revision:0.1.1
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:

List of all members.

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 (oid subtree)
 Set the subtree.
oid 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.
void set_timeout (uint8_t timeout)
 Set the timeout.
uint8_t get_timeout ()
 Get the timeout.
 RegisterPDU (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian)
 Parse constructor.
binary serialize () const
 Serialize the PDU.
 RegisterPDU ()
 Default Constructor.
bool get_instance_registration ()
 Get instance_registration flag.
void set_instance_registration (bool ir)
 Set instance_registration flag.
- Public Member Functions inherited from agentxcpp::PDUwithContext
bool has_context ()
 Whether the PDU has a context.
Octet_String get_context ()
 Get context.
void set_context (Octet_String 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 timeout
uint8_t priority
oid subtree
uint8_t range_subid
uint32_t upper_bound

Additional Inherited Members

- 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 Member Functions inherited from agentxcpp::PDU
 PDU (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian)
 Parse constructor.
 PDU ()
 Default constructor.
virtual ~PDU ()
 Destructor.

Detailed Description

This class represents a Register-PDU.

Definition at line 36 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 24 of file RegisterPDU.cpp.

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

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 77 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 171 of file RegisterPDU.hpp.

References agentxcpp::PDU::instance_registration.

uint8_t agentxcpp::RegisterPDU::get_priority ( )
inline

Get the priority.

Definition at line 101 of file RegisterPDU.hpp.

References priority.

uint8_t agentxcpp::RegisterPDU::get_range_subid ( )
inline

Get the range_subid.

Definition at line 86 of file RegisterPDU.hpp.

References range_subid.

oid agentxcpp::RegisterPDU::get_subtree ( )
inline

Get the subtree.

Definition at line 71 of file RegisterPDU.hpp.

References subtree.

uint8_t agentxcpp::RegisterPDU::get_timeout ( )
inline

Get the timeout.

Definition at line 116 of file RegisterPDU.hpp.

References timeout.

uint32_t agentxcpp::RegisterPDU::get_upper_bound ( )
inline

Get the upper_bound.

Definition at line 56 of file RegisterPDU.hpp.

References upper_bound.

binary RegisterPDU::serialize ( ) const
virtual
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 183 of file RegisterPDU.hpp.

References agentxcpp::PDU::instance_registration.

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

Set the priority.

Definition at line 94 of file RegisterPDU.hpp.

References priority.

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

Set the range_subid.

Definition at line 79 of file RegisterPDU.hpp.

References range_subid.

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

Set the subtree.

Definition at line 64 of file RegisterPDU.hpp.

References subtree.

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

Set the timeout.

Definition at line 109 of file RegisterPDU.hpp.

References timeout.

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

Set the upper_bound.

Definition at line 49 of file RegisterPDU.hpp.

References upper_bound.


Member Data Documentation

uint8_t agentxcpp::RegisterPDU::priority
private

Definition at line 40 of file RegisterPDU.hpp.

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

uint8_t agentxcpp::RegisterPDU::range_subid
private

Definition at line 42 of file RegisterPDU.hpp.

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

oid agentxcpp::RegisterPDU::subtree
private

Definition at line 41 of file RegisterPDU.hpp.

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

uint8_t agentxcpp::RegisterPDU::timeout
private

Definition at line 39 of file RegisterPDU.hpp.

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

uint32_t agentxcpp::RegisterPDU::upper_bound
private

Definition at line 43 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: