SNMP++
3.3.11
|
Abstract class used to provide a virtual interface into Targets. More...
#include <target.h>
Public Types | |
enum | target_type { type_base, type_ctarget, type_utarget } |
Enum to identify a target object through SnmpTarget::get_type() method. More... | |
Public Member Functions | |
SnmpTarget () | |
Create a SnmpTarget object with default values. More... | |
SnmpTarget (const Address &address) | |
Create a SnmpTarget object with the given Address. More... | |
virtual | ~SnmpTarget () |
Destructor that has nothing to do. More... | |
target_type | get_type () const |
Return the type of the target object. More... | |
bool | valid () const |
Returns the validity of the target object. More... | |
void | set_retry (const int r) |
Set the retry value. More... | |
int | get_retry () const |
Get the retry value. More... | |
void | set_timeout (const unsigned long t) |
Set the timeout for requests. More... | |
unsigned long | get_timeout () const |
Get the timeout. More... | |
virtual SnmpTarget * | clone () const |
Clone operator. More... | |
bool | get_address (GenAddress &address) const |
Get the address object. More... | |
const GenAddress & | get_address () const |
Get the address object. More... | |
virtual bool | set_address (const Address &address) |
Set the address object. More... | |
snmp_version | get_version () const |
Get the SNMP version for this target. More... | |
void | set_version (const snmp_version v) |
Set the SNMP version of this target. More... | |
int | operator== (const SnmpTarget &rhs) const |
Overloeaded compare operator. More... | |
virtual void | clear () |
Reset the object. More... | |
Static Public Member Functions | |
static void | set_default_timeout (const unsigned long t) |
Change the default timeout. More... | |
static void | set_default_retries (const int r) |
Change the default retries vlaue. More... | |
Protected Attributes | |
bool | validity |
Validity of the object. More... | |
unsigned long | timeout |
xmit timeout in 10 milli secs More... | |
int | retries |
number of retries More... | |
snmp_version | version |
SNMP version to use. More... | |
target_type | ttype |
Type of the target. More... | |
GenAddress | my_address |
Address object. More... | |
Static Protected Attributes | |
static unsigned long | default_timeout |
default timeout for new objects More... | |
static int | default_retries |
default retries for new objects More... | |
Abstract class used to provide a virtual interface into Targets.
Enum to identify a target object through SnmpTarget::get_type() method.
Enumerator | |
---|---|
type_base | It is a SnmpTarget object. |
type_ctarget | It is a CTarget object. |
type_utarget | It is a Utarget object. |
|
inline |
Create a SnmpTarget object with default values.
The validity of the target will be false.
|
inline |
Create a SnmpTarget object with the given Address.
|
inlinevirtual |
|
virtual |
Clone operator.
Virtual clone operation for creating a new SnmpTarget from an existing SnmpTarget.
bool SnmpTarget::get_address | ( | GenAddress & | address | ) | const |
Get the address object.
address | - GenAddress object to store the target address. |
|
inline |
|
inline |
|
inline |
|
inline |
Return the type of the target object.
If a SNMP message is received through a callback (that only passes a SnmpTarget pointer to the callback function), this method can be used to check the type of the object before doing a cast to CTarget or UTarget.
|
inline |
Get the SNMP version for this target.
int SnmpTarget::operator== | ( | const SnmpTarget & | rhs | ) | const |
Overloeaded compare operator.
Two SnmpTarget objects are considered equal, if all member variables are equal.
|
virtual |
Set the address object.
address | - The address that this target should use. |
Reimplemented in UTarget.
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |