Represents an GetBulk-PDU. More...
#include <GetBulkPDU.hpp>
Public Member Functions | |
| GetBulkPDU (data_t::const_iterator &pos, const data_t::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 data_t | serialize () const |
| Serialize the PDU. | |
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. | |
Represents an GetBulk-PDU.
Definition at line 38 of file GetBulkPDU.hpp.
| GetBulkPDU::GetBulkPDU | ( | 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.
| pos | Iterator pointing to the current stream position. The iterator is advanced while reading the header. |
| end | Iterator pointing one element past the end of the current stream. This is needed to mark the end of the buffer. |
| big_endian | Whether the serialized form of the PDU is in big_endian format. |
| parse_error | If 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, 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 94 of file GetBulkPDU.hpp.
References max_repititions, and non_repeaters.
| uint16_t agentxcpp::GetBulkPDU::get_max_repititions | ( | ) | [inline] |
Get max_repititions field.
Definition at line 132 of file GetBulkPDU.hpp.
References max_repititions.
| uint16_t agentxcpp::GetBulkPDU::get_non_repeaters | ( | ) | [inline] |
| 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.
Definition at line 108 of file GetBulkPDU.hpp.
References sr.
| data_t GetBulkPDU::serialize | ( | ) | const [virtual] |
Serialize the PDU.
Implements agentxcpp::PDU.
Definition at line 59 of file GetBulkPDU.cpp.
References agentxcpp::PDUwithContext::add_header(), agentxcpp::PDU::agentxGetNextPDU, max_repititions, non_repeaters, sr, and write16().
| void agentxcpp::GetBulkPDU::set_max_repititions | ( | uint16_t | value | ) | [inline] |
Set max_repititions field.
Definition at line 140 of file GetBulkPDU.hpp.
References max_repititions.
| void agentxcpp::GetBulkPDU::set_non_repeaters | ( | uint16_t | value | ) | [inline] |
The maximum number of repetitions requested for repeating variables.
Definition at line 60 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 54 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 48 of file GetBulkPDU.hpp.
Referenced by get_sr(), GetBulkPDU(), and serialize().