AgentXcpp  Revision:4ac4848
Internals Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
agentxcpp::GetNextPDU Class Reference

Represents an GetNext-PDU. More...

#include <GetNextPDU.hpp>

Inheritance diagram for agentxcpp::GetNextPDU:
[legend]
Collaboration diagram for agentxcpp::GetNextPDU:
[legend]

List of all members.

Public Member Functions

 GetNextPDU (data_t::const_iterator &pos, const data_t::const_iterator &end, bool big_endian)
 Parse constructor.
 GetNextPDU ()
 Default Constructor.
vector< pair< oid, oid > > & get_sr ()
 Get the SearchRange list.
virtual data_t serialize () const
 Serialize the PDU.

Private Attributes

vector< pair< oid, oid > > sr
 The SearchRange list.

Detailed Description

Represents an GetNext-PDU.

Definition at line 38 of file GetNextPDU.hpp.


Constructor & Destructor Documentation

GetNextPDU::GetNextPDU ( data_t::const_iterator &  pos,
const data_t::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 GetNextPDU.cpp.

References sr.

Default Constructor.

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

Definition at line 81 of file GetNextPDU.hpp.


Member Function Documentation

vector< pair<oid,oid> >& agentxcpp::GetNextPDU::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 92 of file GetNextPDU.hpp.

References sr.

data_t GetNextPDU::serialize ( ) const [virtual]

Serialize the PDU.

Implements agentxcpp::PDU.

Definition at line 43 of file GetNextPDU.cpp.

References agentxcpp::PDUwithContext::add_header(), agentxcpp::PDU::agentxGetNextPDU, and sr.


Member Data Documentation

vector< pair<oid,oid> > agentxcpp::GetNextPDU::sr [private]

The SearchRange list.

A GetNext 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 48 of file GetNextPDU.hpp.

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


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