#include <mib_context.h>
Public Member Functions | |
MibGroup (const Oidx &) | |
Construct a MibGroup with a given OID which has to uniquely identify the group. | |
MibGroup (const Oidx &, const NS_SNMP OctetStr &) | |
Construct a MibGroup with a given OID which has to uniquely identify the group. | |
~MibGroup () | |
Destructor (does not delete contained MibEntry instances). | |
mib_type | type () const |
Return the type of the receiver. | |
MibEntryPtr | add (MibEntryPtr item) |
Add a MibEntry object to the receiver group. | |
void | remove (const Oidx &) |
Remove a MibEntry object from the receiver group and delete it. | |
ListCursor< MibEntry > | get_content () |
Get content. | |
void | clearAll () |
Free content. | |
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. | |
boolean | is_persistent () |
Return whether objects in this group are persistent or not. | |
NS_SNMP OctetStr | get_persistency_name () |
void | set_timeout (unsigned int t) |
Set the timeout value characteristics for this group of MIB objects. | |
unsigned int | get_timeout () |
Get the timeout (in seconds) for this MIB group. | |
Protected Attributes | |
List< MibEntry > | content |
NS_SNMP OctetStr * | persistencyName |
unsigned int | timeout |
Friends | |
class | Mib |
MibGroup::MibGroup | ( | const Oidx & | ) |
Construct a MibGroup with a given OID which has to uniquely identify the group.
In version < 3.5.15 there was a check that ensured that only objects with an OID in the subtree of the group could have been added to it. This check has been removed because it has no real benefit but some drawbacks.
All objects added to this group will not be persistently stored or loaded.
o | - The oid of the new MibGroup. |
MibGroup::MibGroup | ( | const Oidx & | , | |
const NS_SNMP OctetStr & | ||||
) |
Construct a MibGroup with a given OID which has to uniquely identify the group.
All objects can be stored/loaded to/from persistent storage using the given identification name.
In version < 3.5.15 there was a check that ensured that only objects with an OID in the subtree of the group could have been added to it. This check has been removed because it has no real benefit but some drawbacks.
Whether a particular object is stored/loaded to/from disk depends on the value its is_volatile method returns false.
o | the oid of the new MibGroup. | |
persitentName | determines under which name the group should be stored persistently. |
MibGroup::~MibGroup | ( | ) |
Destructor (does not delete contained MibEntry instances).
mib_type MibGroup::type | ( | ) | const [virtual] |
MibEntryPtr MibGroup::add | ( | MibEntryPtr | item | ) |
void MibGroup::remove | ( | const Oidx & | ) |
ListCursor<MibEntry> MibGroup::get_content | ( | ) |
void MibGroup::clearAll | ( | ) |
Free content.
Deletes all contained MIB objects and removes them from this group.
virtual void MibGroup::load_from_file | ( | const char * | ) | [virtual] |
Load the value(s) of the receiver node from a file.
fname | - A file name. |
Reimplemented from MibEntry.
virtual void MibGroup::save_to_file | ( | const char * | ) | [virtual] |
Save the value(s) of the receiver node to a file.
fname | - A file name. |
Reimplemented from MibEntry.
boolean MibGroup::is_persistent | ( | ) | [inline] |
Return whether objects in this group are persistent or not.
NS_SNMP OctetStr MibGroup::get_persistency_name | ( | ) | [inline] |
void MibGroup::set_timeout | ( | unsigned int | t | ) | [inline] |
Set the timeout value characteristics for this group of MIB objects.
Within AGENT++ this value is currently not used, but AgentX++ is using this value to set the region timeout when registering a subagent. Future implementations may also use this value for setting region (or subtree) timeouts.
timeout | a timeout value in seconds. 0 sets the systems default timeout. |
unsigned int MibGroup::get_timeout | ( | ) | [inline] |
Get the timeout (in seconds) for this MIB group.
List<MibEntry> MibGroup::content [protected] |
NS_SNMP OctetStr* MibGroup::persistencyName [protected] |
unsigned int MibGroup::timeout [protected] |