AGENT++
4.0.3
|
The class SnmpAdminString implements the textual convention SnmpAdminString as it is defined in the SNMP-FRAMEWORK-MIB: An octet string containing administrative information, preferably in human-readable form. More...
#include <snmp_textual_conventions.h>
Public Member Functions | |
SnmpAdminString (const Oidx &, mib_access, NS_SNMP OctetStr *) | |
Construct a SnmpAdminString with initial value. | |
SnmpAdminString (const Oidx &, mib_access, NS_SNMP OctetStr *, int) | |
Construct a SnmpAdminString with initial value. | |
SnmpAdminString (const Oidx &, mib_access, NS_SNMP OctetStr *, int, int, int) | |
Construct a SnmpAdminString with initial value. | |
virtual | ~SnmpAdminString () |
virtual MibEntryPtr | clone () |
Clone the receiver object. | |
NS_SNMP OctetStr | get () |
Return the AdminString. | |
Public Member Functions inherited from OctetStrMinMax | |
OctetStrMinMax (const Oidx &, mib_access, NS_SNMP OctetStr *, int, u_int, u_int) | |
Construct a OctetStrMinMax with initial value. | |
OctetStrMinMax (const Oidx &, mib_access, u_int, u_int) | |
Construct a SnmpIn32MinMax without initial value (will be 0). | |
virtual int | prepare_set_request (Request *, int &) |
Let the receiver prepare a SNMP SET subrequest. | |
int | get () |
Return the integer value of the receiver. | |
Public Member Functions inherited from MibLeaf | |
MibLeaf () | |
Default constructor. | |
MibLeaf (const Oidx &, mib_access, NS_SNMP SmiUINT32) | |
Construct a MibLeaf object. | |
MibLeaf (const Oidx &, mib_access, NS_SNMP SnmpSyntax *) | |
Construct a MibLeaf object. | |
MibLeaf (const Oidx &, mib_access, NS_SNMP SnmpSyntax *, int) | |
Construct a MibLeaf object. | |
MibLeaf (const MibLeaf &) | |
Copy Constructor. | |
virtual | ~MibLeaf () |
Destructor. | |
virtual void | init (NS_SNMP SnmpSyntax *, int) |
Initialize a MibLeaf object. | |
virtual mib_type | type () const |
Return the type of the receiver. | |
virtual bool | serialize (char *&, int &) |
Serialize the value of the receiver. | |
virtual bool | deserialize (char *, int &) |
Read the value of the receiver from a byte stream. | |
virtual NS_SNMP SmiUINT32 | get_syntax () const |
Get the syntax of the receiver's value. | |
virtual Vbx | get_value () const |
Get the value of the receiver. | |
virtual int | get_value (NS_SNMP SnmpSyntax &s) const |
Get the value of the receiver. | |
virtual int | get_value (int &i) const |
Get the value of the receiver. | |
virtual int | get_value (long &i) const |
Get the value of the receiver. | |
virtual int | get_value (unsigned long &i) const |
Get the value of the receiver. | |
virtual int | get_value (char *c) const |
Get the value of the receiver. | |
virtual void | set_value (const NS_SNMP SnmpSyntax &) |
Set the value of the receiver by value. | |
virtual void | set_value (const unsigned long) |
Set the unsigned integer value of the receiver. | |
virtual int | set_value (const Vbx &) |
Set the value of the receiver from a variable binding and checks for validity of the variable binding and compatible syntax and oid. | |
virtual void | replace_value (NS_SNMP SnmpSyntax *s) |
Set the value of the receiver by reference. | |
virtual OidxPtr | max_key () |
Return the immediate successor of the greatest object identifier within the receiver's scope. | |
virtual void | get_request (Request *, int) |
Interface methods dispatch table <-> instrumentation. | |
virtual void | get_next_request (Request *, int) |
Let the receiver process a SNMP GETNEXT subrequest. | |
virtual int | commit_set_request (Request *, int) |
Let the receiver commit a SNMP SET subrequest. | |
virtual int | undo_set_request (Request *, int &) |
Let the receiver undo a SNMP SET subrequest. | |
virtual void | cleanup_set_request (Request *, int &) |
Clean up resources used for performing (or undoing) set requests. | |
virtual bool | value_ok (const Vbx &) |
Check whether the receiver's value may be set to the given new value. | |
virtual int | set (const Vbx &vb) |
Set the receiver's value and backup its old value for a later undo. | |
virtual int | unset () |
Undo a previous set. | |
MibTable * | get_reference_to_table () |
Return a pointer to the table the receiver belongs to. | |
MibTableRow * | get_reference_to_row () |
Return a pointer to the row the receiver belongs to. | |
int | valid () |
Gets the flags (bits) that determine the type/stage of validity of the leaf's value. | |
bool | has_default () |
Return whether the receiver has a default value. | |
bool | is_locked () |
Return whether the receiver has a default value. | |
void | set_reference_to_table (MibTable *t) |
Set the receiver's reference to its table. | |
void | set_reference_to_row (MibTableRow *r) |
Set the receiver's reference to its row. | |
void | set_access (mib_access a) |
Set the maximum access rights of the receiver. | |
Oidx | get_oid () const |
Get the instance OID of the MibLeaf object. | |
Public Member Functions inherited from MibEntry | |
MibEntry () | |
Default constructor. | |
MibEntry (const Oidx &, mib_access) | |
Construct a MibEntry instance with a given object identifier and maximum access rights. | |
MibEntry (const MibEntry &) | |
Copy constructor. | |
virtual | ~MibEntry () |
Destructor. | |
virtual Oidx | find_succ (const Oidx &, Request *req=0) |
Return the successor of a given object identifier within the receiver's scope and the context of a given Request. | |
virtual void | load_from_file (const char *) |
Load the value(s) of the receiver node from a file. | |
virtual void | save_to_file (const char *) |
Save the value(s) of the receiver node to a file. | |
virtual bool | is_empty () |
Check whether the receiver node contains any instance of a managed object. | |
virtual void | notify_change (const Oidx &, mib_change) |
Notify all registered nodes of changes to an object managed by the receiver node. | |
virtual void | register_for_notifications (MibEntry *) |
Register an MibEntry object to receive notifications about changes of the receiver node. | |
virtual void | add_change_notification (MibEntry *e) |
Wrapper function for register_for_notifications. | |
virtual void | change_notification (const Oidx &, mib_change) |
Receive a notification about changes to a managed object. | |
OidxPtr | key () |
Return a pointer to the key (object identifier) of the receiver. | |
virtual mib_access | get_access () |
Return the maximum access rights for the managed object represented by the receiver node. | |
virtual bool | is_volatile () |
Check whether the entry is volatile or not. | |
virtual void | reset () |
Resets (clears) the content of this entry. | |
int | operator< (const MibEntry &) const |
int | operator> (const MibEntry &) const |
int | operator== (const MibEntry &) const |
int | operator< (const Oidx &) const |
int | operator> (const Oidx &) const |
int | operator<= (const Oidx &) const |
int | operator>= (const Oidx &) const |
int | operator== (const Oidx &) const |
Public Member Functions inherited from ThreadManager | |
ThreadManager () | |
Default constructor. | |
virtual | ~ThreadManager () |
Destructor. | |
void | start_synch () |
Start synchronized execution. | |
void | end_synch () |
End synchronized execution. | |
Public Member Functions inherited from Synchronized | |
Synchronized () | |
~Synchronized () | |
void | wait () |
Causes current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object. | |
bool | wait (unsigned long timeout) |
Causes current thread to wait until either another thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed. | |
void | notify () |
Wakes up a single thread that is waiting on this object's monitor. | |
void | notify_all () |
Wakes up all threads that are waiting on this object's monitor. | |
bool | lock () |
Enter a critical section. | |
TryLockResult | trylock () |
Try to enter a critical section. | |
bool | unlock () |
Leave a critical section. | |
Additional Inherited Members | |
Public Types inherited from Synchronized | |
enum | TryLockResult { LOCKED = 1, BUSY = 0, OWNED = -1 } |
Static Public Member Functions inherited from ThreadManager | |
static void | start_global_synch () |
Start global synchronized execution. | |
static void | end_global_synch () |
End global synchronized execution. | |
Protected Member Functions inherited from MibLeaf | |
int | get_value_mode () |
Return the value handle mode. | |
void | set_validity (int flags) |
Sets the flags (bits) that determine the type/stage of validity of the leaf's value. | |
void | set_syntax (NS_SNMP SmiUINT32) |
Set the syntax of the receiver's value and delete the old value. | |
void | free_value () |
Frees the receiver's value and sets it to NULL. | |
Protected Attributes inherited from OctetStrMinMax | |
unsigned int | min |
unsigned int | max |
The class SnmpAdminString implements the textual convention SnmpAdminString as it is defined in the SNMP-FRAMEWORK-MIB: An octet string containing administrative information, preferably in human-readable form.
To facilitate internationalization, this information is represented using the ISO/IEC IS 10646-1 character set, encoded as an octet string using the UTF-8 transformation format described in [RFC2279].
Since additional code points are added by amendments to the 10646 standard from time to time, implementations must be prepared to encounter any code point from 0x00000000 to 0x7fffffff. Byte sequences that do not correspond to the valid UTF-8 encoding of a code point or are outside this range are prohibited.
The use of control codes should be avoided.
When it is necessary to represent a newline, the control code sequence CR LF should be used.
The use of leading or trailing white space should be avoided.
For code points not directly supported by user interface hardware or software, an alternative means of entry and display, such as hexadecimal, may be provided.
For information encoded in 7-bit US-ASCII, the UTF-8 encoding is identical to the US-ASCII encoding.
UTF-8 may require multiple bytes to represent a single character / code point; thus the length of this object in octets may be different from the number of characters encoded. Similarly, size constraints refer to the number of encoded octets, not the number of characters represented by an encoding.
Note that when this TC is used for an object that is used or envisioned to be used as an index, then a SIZE restriction MUST be specified so that the number of sub-identifiers for any object instance does not exceed the limit of 128, as defined by [RFC1905].
Note that the size of an SnmpAdminString object is measured in octets, not characters.
SnmpAdminString::SnmpAdminString | ( | const Oidx & | , |
mib_access | , | ||
NS_SNMP OctetStr * | |||
) |
Construct a SnmpAdminString with initial value.
oid | the oid of the leaf or the column of the columnar object. |
access | the max-access rights for the object. |
octetstr | a pointer to an OctetStr containing the initial value for the object. |
SnmpAdminString::SnmpAdminString | ( | const Oidx & | , |
mib_access | , | ||
NS_SNMP OctetStr * | , | ||
int | |||
) |
Construct a SnmpAdminString with initial value.
oid | the oid of the leaf or the column of the columnar object. |
access | the max-access rights for the object. |
octetstr | a pointer to an OctetStr containing the initial value for the object. |
valueMode | contains an ored value of one or more of the following modes: VMODE_DEFAULT: the value of the object pointed by value will be used as default value, otherwise the managed object has no default value. VMODE_LOCKED: value is locked (cannot be modified) while the row status of the receiver's row is active(1). This mode has no effect, if the the leaf is a scalar or otherwise if the receiver's row has no snmpRowStatus. |
SnmpAdminString::SnmpAdminString | ( | const Oidx & | , |
mib_access | , | ||
NS_SNMP OctetStr * | , | ||
int | , | ||
int | , | ||
int | |||
) |
Construct a SnmpAdminString with initial value.
oid | the oid of the leaf or the column of the columnar object. |
access | the max-access rights for the object. |
octetstr | a pointer to an OctetStr containing the initial value for the object. |
valueMode | contains an ored value of one or more of the following modes: VMODE_DEFAULT: the value of the object pointed by value will be used as default value, otherwise the managed object has no default value. VMODE_LOCKED: value is locked (cannot be modified) while the row status of the receiver's row is active(1). This mode has no effect, if the the leaf is a scalar or otherwise if the receiver's row has no snmpRowStatus. |
min_size | the minimum size of the SnmpAdminString. |
max_size | the maxmimum size of the SnmpAdminString. |
|
virtual |
|
virtual |
NS_SNMP OctetStr SnmpAdminString::get | ( | ) |
Return the AdminString.