AgentXcpp  Revision:0.1.1
Internals Documentation
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Pages
agentxcpp::AddAgentCapsPDU Class Reference

Represents an AddAgentCaps-PDU. More...

#include <AddAgentCapsPDU.hpp>

Inheritance diagram for agentxcpp::AddAgentCapsPDU:
Collaboration diagram for agentxcpp::AddAgentCapsPDU:

List of all members.

Public Member Functions

 AddAgentCapsPDU (binary::const_iterator &pos, const binary::const_iterator &end, bool big_endian)
 Parse constructor.
 AddAgentCapsPDU ()
 Default Constructor.
 AddAgentCapsPDU (oid id, Octet_String descr)
 Constructor.
void set_id (oid id)
 Set the id field.
oid get_id ()
 Get the id field.
void set_descr (Octet_String descr)
 Set the descr field.
Octet_String get_descr ()
 Get the descr field.
virtual binary serialize ()
 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.
virtual binary serialize () const =0
 Serialize function for concrete PDUs.

Private Attributes

oid id
 The Object Identifier containing the value of an invocation of the AGENT-CAPABILITIES macro.
Octet_String descr
 An Octet String containing a DisplayString to be used as the value of sysORDescr corresponding to the sysORID value above.

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.

Detailed Description

Represents an AddAgentCaps-PDU.

Definition at line 33 of file AddAgentCapsPDU.hpp.


Constructor & Destructor Documentation

AddAgentCapsPDU::AddAgentCapsPDU ( 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.

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

References descr.

agentxcpp::AddAgentCapsPDU::AddAgentCapsPDU ( )
inline

Default Constructor.

Sets the state of the object to the defaults as set by the PDU::PDUwithContext() constructor. The fields 'id' and 'descr' are initialized to be empty.

Definition at line 87 of file AddAgentCapsPDU.hpp.

AddAgentCapsPDU::AddAgentCapsPDU ( oid  id,
Octet_String  descr 
)

Constructor.

Sets the state of the object to the defaults as set by the PDU::PDUwithContext() constructor. The fields id and descr are initialized according to the parameters.

Parameters:
idThe value of the id field.
descrThe value of the descr field.

Definition at line 56 of file AddAgentCapsPDU.cpp.

References descr, and id.


Member Function Documentation

Octet_String agentxcpp::AddAgentCapsPDU::get_descr ( )
inline

Get the descr field.

Returns:
The descr value.

Definition at line 137 of file AddAgentCapsPDU.hpp.

References descr.

oid agentxcpp::AddAgentCapsPDU::get_id ( )
inline

Get the id field.

Returns:
The id value.

Definition at line 117 of file AddAgentCapsPDU.hpp.

References id.

binary AddAgentCapsPDU::serialize ( )
virtual
void agentxcpp::AddAgentCapsPDU::set_descr ( Octet_String  descr)
inline

Set the descr field.

Parameters:
descrThe new descr value.

Definition at line 127 of file AddAgentCapsPDU.hpp.

References descr.

void agentxcpp::AddAgentCapsPDU::set_id ( oid  id)
inline

Set the id field.

Parameters:
idThe new id value.

Definition at line 107 of file AddAgentCapsPDU.hpp.

References id.


Member Data Documentation

Octet_String agentxcpp::AddAgentCapsPDU::descr
private

An Octet String containing a DisplayString to be used as the value of sysORDescr corresponding to the sysORID value above.

See RFC 2741, 6.2.14. "The agentx-AddAgentCaps-PDU" for details.

Definition at line 52 of file AddAgentCapsPDU.hpp.

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

oid agentxcpp::AddAgentCapsPDU::id
private

The Object Identifier containing the value of an invocation of the AGENT-CAPABILITIES macro.

See RFC 2741, 6.2.14. "The agentx-AddAgentCaps-PDU" for details.

Definition at line 43 of file AddAgentCapsPDU.hpp.

Referenced by AddAgentCapsPDU(), get_id(), and set_id().


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