AgentXcpp  Revision:0.1
Internals Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
agentxcpp::OpenPDU Class Reference

Represents an Open-PDU. More...

#include <OpenPDU.hpp>

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

List of all members.

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

Detailed Description

Represents an Open-PDU.

Definition at line 33 of file OpenPDU.hpp.


Constructor & Destructor Documentation

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.

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 OpenPDU.cpp.

References descr, and timeout.

Default Constructor.

Sets the state of the object to the defaults as set by the PDU::PDU() constructor, plus the following:

  • timeout = 0
  • oid = null Object Identifier
  • descr = empty string

Definition at line 46 of file OpenPDU.cpp.


Member Function Documentation

Get descr.

Definition at line 120 of file OpenPDU.hpp.

References descr.

Get ID.

Definition at line 104 of file OpenPDU.hpp.

References id.

Get timeout.

Definition at line 79 of file OpenPDU.hpp.

References timeout.

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]

Set descr.

Definition at line 128 of file OpenPDU.hpp.

References descr.

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.

Parameters:
timeoutThe 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().


Member Data Documentation

Definition at line 38 of file OpenPDU.hpp.

Referenced by get_descr(), OpenPDU(), serialize(), and set_descr().

Definition at line 37 of file OpenPDU.hpp.

Referenced by get_id(), and set_id().

Definition at line 36 of file OpenPDU.hpp.

Referenced by get_timeout(), OpenPDU(), serialize(), and set_timeout().


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