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

Represents an GetBulk-PDU. More...

#include <GetBulkPDU.hpp>

Inheritance diagram for agentxcpp::GetBulkPDU:
Collaboration diagram for agentxcpp::GetBulkPDU:

List of all members.

Public Member Functions

 GetBulkPDU (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian)
 Parse constructor.
 GetBulkPDU ()
 Default Constructor.
vector< pair< oid, oid > > & get_sr ()
 Get the SearchRange list.
uint16_t get_non_repeaters ()
 Get non_repeaters field.
void set_non_repeaters (uint16_t value)
 Set non_repeaters field.
uint16_t get_max_repititions ()
 Get max_repititions field.
void set_max_repititions (uint16_t value)
 Set max_repititions field.
virtual binary serialize () const
 Serialize the PDU.
- 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

vector< pair< oid, oid > > sr
 The SearchRange list.
uint16_t non_repeaters
 The number of variables in the SearchRangeList that are not repeaters.
uint16_t max_repititions
 The maximum number of repetitions requested for repeating variables.

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

Represents an GetBulk-PDU.

Definition at line 41 of file GetBulkPDU.hpp.


Constructor & Destructor Documentation

GetBulkPDU::GetBulkPDU ( 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 26 of file GetBulkPDU.cpp.

References max_repititions, non_repeaters, agentxcpp::read16(), and sr.

agentxcpp::GetBulkPDU::GetBulkPDU ( )
inline

Default Constructor.

Sets the state of the object to the defaults as set by the PDU::PDU() constructor, sets non_repeaters to 0, max_repititions to 0 and initializes sr to be empty.

Definition at line 97 of file GetBulkPDU.hpp.

References max_repititions, and non_repeaters.


Member Function Documentation

uint16_t agentxcpp::GetBulkPDU::get_max_repititions ( )
inline

Get max_repititions field.

Definition at line 135 of file GetBulkPDU.hpp.

References max_repititions.

uint16_t agentxcpp::GetBulkPDU::get_non_repeaters ( )
inline

Get non_repeaters field.

Definition at line 119 of file GetBulkPDU.hpp.

References non_repeaters.

vector< pair<oid,oid> >& agentxcpp::GetBulkPDU::get_sr ( )
inline

Get the SearchRange list.

This function returns a reference to the internal SearchRange list, which can then be modified in place.

Note:
There is no set_sr() function, because the SearchRange list can be modified in place.

Definition at line 111 of file GetBulkPDU.hpp.

References sr.

binary GetBulkPDU::serialize ( ) const
virtual
void agentxcpp::GetBulkPDU::set_max_repititions ( uint16_t  value)
inline

Set max_repititions field.

Definition at line 143 of file GetBulkPDU.hpp.

References max_repititions.

void agentxcpp::GetBulkPDU::set_non_repeaters ( uint16_t  value)
inline

Set non_repeaters field.

Definition at line 127 of file GetBulkPDU.hpp.

References non_repeaters.


Member Data Documentation

uint16_t agentxcpp::GetBulkPDU::max_repititions
private

The maximum number of repetitions requested for repeating variables.

Definition at line 63 of file GetBulkPDU.hpp.

Referenced by get_max_repititions(), GetBulkPDU(), serialize(), and set_max_repititions().

uint16_t agentxcpp::GetBulkPDU::non_repeaters
private

The number of variables in the SearchRangeList that are not repeaters.

Definition at line 57 of file GetBulkPDU.hpp.

Referenced by get_non_repeaters(), GetBulkPDU(), serialize(), and set_non_repeaters().

vector< pair<oid,oid> > agentxcpp::GetBulkPDU::sr
private

The SearchRange list.

A GetBulk PDU can have multiple SearchRanges. A SearchRange consists of two oid's. We store them in a pair<>, and store the pais<>'s in a vector< pair<> >.

Definition at line 51 of file GetBulkPDU.hpp.

Referenced by get_sr(), GetBulkPDU(), and serialize().


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