MibGroup Class Reference

#include <mib_context.h>

Inheritance diagram for MibGroup:

MibEntry ThreadManager Synchronized agentpp_simulation_mib simSysGroup snmp_notification_mib snmp_proxy_mib snmp_target_mib snmpGroup sysGroup VacmMIB

List of all members.

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< MibEntryget_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< MibEntrycontent
NS_SNMP OctetStr * persistencyName
unsigned int timeout

Friends

class Mib


Constructor & Destructor Documentation

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.

Parameters:
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.

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


Member Function Documentation

mib_type MibGroup::type (  )  const [virtual]

Return the type of the receiver.

Returns:
GROUP

Reimplemented from MibEntry.

MibEntryPtr MibGroup::add ( MibEntryPtr  item  ) 

Add a MibEntry object to the receiver group.

Parameters:
item a pointer to the MibEntry instance to be added.

void MibGroup::remove ( const Oidx  ) 

Remove a MibEntry object from the receiver group and delete it.

Parameters:
key the oid (key) of the MibEntry instance to be removed.

ListCursor<MibEntry> MibGroup::get_content (  ) 

Get content.

Returns:
a ListCursor at the first element of the receiver.

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.

Parameters:
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.

Parameters:
fname - A file name.

Reimplemented from MibEntry.

boolean MibGroup::is_persistent (  )  [inline]

Return whether objects in this group are persistent or not.

Returns:
TRUE if objects of this group should be stored persistently, FALSE otherwise.

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.

Parameters:
timeout a timeout value in seconds. 0 sets the systems default timeout.
Since:
3.5

unsigned int MibGroup::get_timeout (  )  [inline]

Get the timeout (in seconds) for this MIB group.

Returns:
a timeout value in seconds or 0 if default timeout should be used.
Since:
3.5


Friends And Related Function Documentation

friend class Mib [friend]

Reimplemented from MibEntry.


Member Data Documentation

NS_SNMP OctetStr* MibGroup::persistencyName [protected]

unsigned int MibGroup::timeout [protected]


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

Generated on Fri May 29 22:36:54 2009 for AGENT++ by  doxygen 1.5.6