Represents an Get-PDU. More...
#include <GetPDU.hpp>
Public Member Functions | |
| GetPDU (data_t::const_iterator &pos, const data_t::const_iterator &end, bool big_endian) | |
| Parse constructor. | |
| GetPDU () | |
| Default Constructor. | |
| vector< oid > & | get_sr () |
| Get the SearchRange list. | |
| virtual data_t | serialize () const |
| Serialize the PDU. | |
Private Attributes | |
| vector< oid > | sr |
| The SearchRange list. | |
Represents an Get-PDU.
Definition at line 35 of file GetPDU.hpp.
| GetPDU::GetPDU | ( | 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 25 of file GetPDU.cpp.
References sr.
| agentxcpp::GetPDU::GetPDU | ( | ) | [inline] |
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 78 of file GetPDU.hpp.
| vector<oid>& agentxcpp::GetPDU::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 89 of file GetPDU.hpp.
References sr.
| data_t GetPDU::serialize | ( | ) | const [virtual] |
Serialize the PDU.
Implements agentxcpp::PDU.
Definition at line 41 of file GetPDU.cpp.
References agentxcpp::PDUwithContext::add_header(), agentxcpp::PDU::agentxGetPDU, and sr.
vector<oid> agentxcpp::GetPDU::sr [private] |
The SearchRange list.
A SearchRange consists of two OID's, but for GetPDU's the second OID is always the null OID. We simply store the OID's for the getPDU into a vector<>.
Definition at line 45 of file GetPDU.hpp.
Referenced by get_sr(), GetPDU(), and serialize().