Represents an Open-PDU. More...
#include <OpenPDU.hpp>
Public Member Functions | |
| OpenPDU (data_t::const_iterator &pos, const data_t::const_iterator &end, bool big_endian) | |
| Parse constructor. | |
| OpenPDU () | |
| Default Constructor. | |
| byte_t | get_timeout () |
| Get timeout. | |
| void | set_timeout (byte_t timeout) |
| Set timeout. | |
| oid | get_id () |
| Get ID. | |
| void | set_id (oid id) |
| Set ID. | |
| Octet_String | get_descr () |
| Get descr. | |
| void | set_descr (Octet_String descr) |
| Set descr. | |
| data_t | serialize () const |
| Serialize the PDU. | |
Private Attributes | |
| byte_t | timeout |
| oid | id |
| Octet_String | descr |
Represents an Open-PDU.
Definition at line 33 of file OpenPDU.hpp.
| OpenPDU::OpenPDU | ( | 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 OpenPDU.cpp.
| OpenPDU::OpenPDU | ( | ) |
Default Constructor.
Sets the state of the object to the defaults as set by the PDU::PDU() constructor, plus the following:
Definition at line 46 of file OpenPDU.cpp.
| Octet_String agentxcpp::OpenPDU::get_descr | ( | ) | [inline] |
| oid agentxcpp::OpenPDU::get_id | ( | ) | [inline] |
| byte_t agentxcpp::OpenPDU::get_timeout | ( | ) | [inline] |
| data_t OpenPDU::serialize | ( | ) | const [virtual] |
Serialize the PDU.
Implements agentxcpp::PDU.
Definition at line 52 of file OpenPDU.cpp.
References agentxcpp::PDU::add_header(), agentxcpp::PDU::agentxOpenPDU, descr, agentxcpp::Octet_String::serialize(), and timeout.
| void agentxcpp::OpenPDU::set_descr | ( | Octet_String | descr | ) | [inline] |
| void agentxcpp::OpenPDU::set_id | ( | oid | id | ) | [inline] |
Set ID.
Definition at line 112 of file OpenPDU.hpp.
References id.
Referenced by agentxcpp::master_proxy::connect().
| void agentxcpp::OpenPDU::set_timeout | ( | byte_t | timeout | ) | [inline] |
Set timeout.
| timeout | The length of time, in seconds, that a master agent should allow to elapse after dispatching a message on a session before it regards the subagent as not responding. This is the default value for the session, and may be overridden by values associated with specific registered MIB regions. The default value of 0 indicates that there is no session-wide default value. |
Definition at line 96 of file OpenPDU.hpp.
References timeout.
Referenced by agentxcpp::master_proxy::connect().
Octet_String agentxcpp::OpenPDU::descr [private] |
Definition at line 38 of file OpenPDU.hpp.
Referenced by get_descr(), OpenPDU(), serialize(), and set_descr().
oid agentxcpp::OpenPDU::id [private] |
Definition at line 37 of file OpenPDU.hpp.
byte_t agentxcpp::OpenPDU::timeout [private] |
Definition at line 36 of file OpenPDU.hpp.
Referenced by get_timeout(), OpenPDU(), serialize(), and set_timeout().