AGENT++  4.0.3
Public Member Functions | Protected Attributes | Friends | List of all members
MibComplexEntry Class Referenceabstract

The MibComplexEntry class is an abstract class that represents complex MIB nodes. More...

#include <mib_complex_entry.h>

Inheritance diagram for MibComplexEntry:
MibEntry ThreadManager Synchronized MibStaticTable

Public Member Functions

 MibComplexEntry (const Oidx &, mib_access)
 Construct a MibComplexEntry instance with a given object identifier and maximum access rights.
 
 MibComplexEntry (const MibComplexEntry &)
 Copy constructor.
 
virtual ~MibComplexEntry ()
 Destructor.
 
virtual mib_type type () const
 Return the type of the receiver MIB node.
 
virtual MibEntryclone ()=0
 Return a clone of the receiver.
 
virtual Oidx find_succ (const Oidx &, Request *req=0)=0
 Return the successor of a given object identifier within the receiver's scope and the context of a given Request.
 
virtual void get_request (Request *, int)=0
 Let the receiver process a SNMP GET subrequest.
 
virtual void get_next_request (Request *, int)=0
 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 prepare_set_request (Request *, int &)
 Let the receiver prepare 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 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 bool is_empty ()
 Check whether the receiver node contains any instance of a managed object.
 
virtual OidxPtr max_key ()
 Return the immediate successor of the greatest object identifier within the receiver's scope.
 
- 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 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 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.
 

Protected Attributes

Oidx upperBound
 
- Protected Attributes inherited from MibEntry
Oidx oid
 
mib_access access
 
List< MibEntrynotifies
 

Friends

class Mib
 

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 MibEntry
void set_oid (const Oidx &)
 Set the object identifier of the receiver node.
 

Detailed Description

The MibComplexEntry class is an abstract class that represents complex MIB nodes.

Complex nodes access their managed objects (e.g., MibLeafs) via an implementation specific way. This interface can be used to implement light weight tables, i.e. tables that access their management information through a proprietary protocol (other than SNMP or AgentX).

Author
Frank Fock
Version
3.4

Constructor & Destructor Documentation

MibComplexEntry::MibComplexEntry ( const Oidx ,
mib_access   
)

Construct a MibComplexEntry instance with a given object identifier and maximum access rights.

Parameters
oidan object identifier.
accessthe maximum access rights for the receiver.
MibComplexEntry::MibComplexEntry ( const MibComplexEntry )

Copy constructor.

Parameters
otheranother MibComplexEntry instance.
virtual MibComplexEntry::~MibComplexEntry ( )
virtual

Destructor.

Member Function Documentation

virtual void MibComplexEntry::cleanup_set_request ( Request ,
int &   
)
inlinevirtual

Clean up resources used for performing (or undoing) set requests.

Parameters
req- A pointer to the whole SNMP SET request.
ind- The index of the subrequest to be processed.

Reimplemented from MibEntry.

virtual MibEntry* MibComplexEntry::clone ( )
pure virtual

Return a clone of the receiver.

Returns
a pointer to a clone of the MibComplexEntry object.

Reimplemented from MibEntry.

Implemented in MibStaticTable.

virtual int MibComplexEntry::commit_set_request ( Request ,
int   
)
inlinevirtual

Let the receiver commit a SNMP SET subrequest.

Parameters
req- A pointer to the whole SNMP SET request.
ind- The index of the subrequest to be processed.
Returns
SNMP_ERROR_SUCCESS on success and SNMP_ERROR_COMITFAIL on failure.

Reimplemented from MibEntry.

virtual bool MibComplexEntry::deserialize ( char *  ,
int &   
)
inlinevirtual

Read the value of the receiver from a byte stream.

Parameters
bufa pointer to the input byte stream.
szthe size of the input buffer. On output it contains the size remaining unread in the input buffer.
Returns
TRUE if deserialization was successful, FALSE otherwise.

Reimplemented from MibEntry.

virtual Oidx MibComplexEntry::find_succ ( const Oidx ,
Request req = 0 
)
pure virtual

Return the successor of a given object identifier within the receiver's scope and the context of a given Request.

Parameters
oidan object identifier
requesta pointer to a Request instance.
Returns
an object identifier if a successor could be found, otherwise (if no successor exists or is out of scope) a zero length oid is returned

Reimplemented from MibEntry.

Implemented in MibStaticTable.

virtual void MibComplexEntry::get_next_request ( Request ,
int   
)
pure virtual

Let the receiver process a SNMP GETNEXT subrequest.

Parameters
req- A pointer to the whole SNMP GETNEXT request.
ind- The index of the subrequest to be processed.

Reimplemented from MibEntry.

Implemented in MibStaticTable.

virtual void MibComplexEntry::get_request ( Request ,
int   
)
pure virtual

Let the receiver process a SNMP GET subrequest.

Parameters
req- A pointer to the whole SNMP GET request.
ind- The index of the subrequest to be processed.

Reimplemented from MibEntry.

Implemented in MibStaticTable.

virtual bool MibComplexEntry::is_empty ( )
inlinevirtual

Check whether the receiver node contains any instance of a managed object.

Returns
TRUE if the node currently manages an instance.

Reimplemented from MibEntry.

virtual OidxPtr MibComplexEntry::max_key ( )
inlinevirtual

Return the immediate successor of the greatest object identifier within the receiver's scope.

Returns
a pointer to the non including upper bound of the receiver's scope.

Reimplemented from MibEntry.

virtual int MibComplexEntry::prepare_set_request ( Request ,
int &   
)
inlinevirtual

Let the receiver prepare a SNMP SET subrequest.

Parameters
req- A pointer to the whole SNMP SET request.
ind- The index of the subrequest to be processed.
Returns
SNMP_ERROR_SUCCESS on success and SNMP_ERROR_WRONG_VALUE, SNMP_ERROR_WRONG_TYPE, or SNMP_ERROR_NOT_WRITEABLE on failure.

Reimplemented from MibEntry.

virtual bool MibComplexEntry::serialize ( char *&  ,
int &   
)
inlinevirtual

Serialize the value of the receiver.

Parameters
buf- A pointer to byte stream buffer returned.
sz- The size of the buffer returned.
Returns
TRUE if serialization was successful, FALSE otherwise.

Reimplemented from MibEntry.

virtual mib_type MibComplexEntry::type ( ) const
inlinevirtual

Return the type of the receiver MIB node.

Returns
One of the following types: AGENTPP_NONE, AGENTPP_PROXY, AGENTPP_LEAF, AGENTPP_TABLE, AGENTPP_GROUP, or AGENTPP_COMPLEX.

Reimplemented from MibEntry.

virtual int MibComplexEntry::undo_set_request ( Request ,
int &   
)
inlinevirtual

Let the receiver undo a SNMP SET subrequest.

Parameters
req- A pointer to the whole SNMP SET request.
ind- The index of the subrequest to be processed.
Returns
SNMP_ERROR_SUCCESS on success and SNMP_ERROR_UNDO_FAIL on failure.

Reimplemented from MibEntry.

Friends And Related Function Documentation

friend class Mib
friend

Member Data Documentation

Oidx MibComplexEntry::upperBound
protected

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