Represents an GetBulk-PDU. More...
#include <GetBulkPDU.hpp>
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. | |
Represents an GetBulk-PDU.
Definition at line 41 of file GetBulkPDU.hpp.
| 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.
| 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, agentxcpp::read16(), and sr.
|
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.
|
inline |
Get max_repititions field.
Definition at line 135 of file GetBulkPDU.hpp.
References max_repititions.
|
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 111 of file GetBulkPDU.hpp.
References sr.
|
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 agentxcpp::write16().
|
inline |
Set max_repititions field.
Definition at line 143 of file GetBulkPDU.hpp.
References max_repititions.
|
inline |
|
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().
|
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().
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().