snmpRowStatus Class Reference

The snmpRowStatus class is derived from MibLeaf and provides functionality to control the manipulation of MibTable rows. More...

#include <mib.h>

Inheritance diagram for snmpRowStatus:

MibLeaf MibEntry ThreadManager Synchronized SimRowStatus VacmAccessTableStatus VacmViewTreeFamilyTableStatus

List of all members.

Public Member Functions

 snmpRowStatus ()
 Default constructor.
 snmpRowStatus (const Oidx &)
 Construct a snmpRowStatus instance with default access READCREATE.
 snmpRowStatus (const Oidx &, mib_access)
 Construct a snmpRowStatus instance.
virtual ~snmpRowStatus ()
 Destructor.
virtual boolean value_ok (const Vbx &)
 Check whether the receiver's value may be set to a given new value.
virtual boolean transition_ok (const Vbx &)
 Check whether the a transition to a given new value is possible in general.
virtual MibEntryPtr clone ()
 Clone the receiver.
virtual boolean check_state_change (const Vbx &, Request *req=0)
 Check whether the state of the receiver's row may be changed.
virtual int set (const Vbx &)
 Set the receiver's value and backup its old value for a later undo.
virtual int unset ()
 Undo a previous set.
long get ()
 Get the receiver's value.
virtual int prepare_set_request (Request *, int &)
 Let the receiver prepare a SNMP SET subrequest.


Detailed Description

The snmpRowStatus class is derived from MibLeaf and provides functionality to control the manipulation of MibTable rows.

The snmpRowStatus class is an encapsulation of the SMIv2 row status textual convention. Figure RowStatusStates demonstrates the states which the snmpRowStatus object can traverse.

Author:
Frank Fock
Version:
3.5

Constructor & Destructor Documentation

snmpRowStatus::snmpRowStatus (  )  [inline]

Default constructor.

snmpRowStatus::snmpRowStatus ( const Oidx  ) 

Construct a snmpRowStatus instance with default access READCREATE.

Parameters:
o - The row status column subidentifier.

snmpRowStatus::snmpRowStatus ( const Oidx ,
mib_access   
)

Construct a snmpRowStatus instance.

Parameters:
o - The row status column subidentifier.
a - The maximum access rights for the managed object.

virtual snmpRowStatus::~snmpRowStatus (  )  [virtual]

Destructor.


Member Function Documentation

virtual boolean snmpRowStatus::value_ok ( const Vbx  )  [virtual]

Check whether the receiver's value may be set to a given new value.

NOTE: This checks only if the value may be set at all. Thus notReady(3) will return FALSE. All other RowStatus enumerated values will return TRUE.

Parameters:
value a new value.
Returns:
TRUE if the new value is valid, otherwise FALSE.

Reimplemented from MibLeaf.

virtual boolean snmpRowStatus::transition_ok ( const Vbx  )  [virtual]

Check whether the a transition to a given new value is possible in general.

This does not check any values of the row. Use check_state_change to determine whether a row has sufficient information to actually perform a transition.

Parameters:
value a new value.
Returns:
TRUE if the new value is valid, otherwise FALSE.

Reimplemented in SimRowStatus.

virtual MibEntryPtr snmpRowStatus::clone (  )  [virtual]

Clone the receiver.

Returns:
A pointer to the clone.

Reimplemented from MibLeaf.

Reimplemented in SimRowStatus, VacmAccessTableStatus, and VacmViewTreeFamilyTableStatus.

virtual boolean snmpRowStatus::check_state_change ( const Vbx ,
Request req = 0 
) [virtual]

Check whether the state of the receiver's row may be changed.

Parameters:
v a variable binding that holds the requested new state.
req an optional reference to the request being processed. If req is not 0 the snmpRowStatus attempts to look forward within the request for sets that will affect its row.
Returns:
TRUE if the requested state can be set, otherwise FALSE.

virtual int snmpRowStatus::set ( const Vbx  )  [virtual]

Set the receiver's value and backup its old value for a later undo.

Parameters:
vb - The variable binding that holds the new value.
Returns:
SNMP_ERROR_SUCCESS if the new value has been set, SNMP_ERROR_WRONG_TYPE or SNMP_ERROR_BAD_VALUE otherwise.

Reimplemented from MibLeaf.

Reimplemented in VacmViewTreeFamilyTableStatus.

virtual int snmpRowStatus::unset (  )  [virtual]

Undo a previous set.

Returns:
SNMP_ERROR_SUCCESS on success and SNMP_ERROR_UNDO_FAIL on failure.

Reimplemented from MibLeaf.

long snmpRowStatus::get (  ) 

Get the receiver's value.

Returns:
The row status of the receiver's row.

virtual int snmpRowStatus::prepare_set_request ( Request ,
int &   
) [virtual]

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 MibLeaf.


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

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