AGENT++  4.0.3
Public Member Functions | List of all members
MibTableVoter Class Reference

The MibTableVoter class defines an interface for objects that want to be ask before a status transition of a MibTableRow is performed by a MibTable instance. More...

#include <mib.h>

Inheritance diagram for MibTableVoter:
MibTable MibTableSizePolicy SimMibTable StorageTable TimeStampTable VacmContextTable snmpNotifyEntry snmpNotifyFilterEntry snmpNotifyFilterProfileEntry snmpProxyEntry snmpTargetAddrEntry snmpTargetParamsEntry VacmAccessTable VacmSecurityToGroupTable VacmViewTreeFamilyTable sysOREntry

Public Member Functions

 MibTableVoter ()
 
virtual ~MibTableVoter ()
 
virtual int is_transition_ok (MibTable *, MibTableRow *, const Oidx &, int, int)
 Check whether a transition from an old to a new RowStatus value is allowed.
 

Detailed Description

The MibTableVoter class defines an interface for objects that want to be ask before a status transition of a MibTableRow is performed by a MibTable instance.

Each MibTable instance implements this interface in order to allow the user voting for row status changes directly by subclassing.

Author
Frank Fock
Version
3.5

Constructor & Destructor Documentation

MibTableVoter::MibTableVoter ( )
inline
virtual MibTableVoter::~MibTableVoter ( )
inlinevirtual

Member Function Documentation

virtual int MibTableVoter::is_transition_ok ( MibTable ,
MibTableRow ,
const Oidx ,
int  ,
int   
)
inlinevirtual

Check whether a transition from an old to a new RowStatus value is allowed.

Possible return values that will abort a transition are shown by the following table:

Requested transition | Posible return values

rowEmpty -> rowDestroy | SNMP_ERROR_INCONSIST_NAME

rowEmpty -> notReady | SNMP_ERROR_RESOURCE_UNAVAIL | SNMP_ERROR_INCONSIST_VAL | SNMP_ERROR_NO_CREATION

| SNMP_ERROR_INCONSIST_NAME

rowNotInService/ | SNMP_ERROR_RESOURCE_UNAVAIL rowNotReady -> | SNMP_ERROR_INCONSIST_VAL

rowActive |

rowActive -> notInService | SNMP_ERROR_INCONSIST_VAL rowDestroy |

By returning SNMP_ERROR_SUCCESS the MibTableVoter instance votes for the transition to be performed.

Parameters
tablea pointer to a MibTable instance firing the event. The parameter 'table' can be 0 if the local table is source and target of the event.
rowa pointer to the MibTableRow instance whose status is to be changed.
indexthe index of the row that is changed.
currentStatusthe current status of the row.
requestedStatusthe requested new status of the row.
Returns
a SNMP error status or SNMP_ERROR_SUCCESS if the transition is acknowledged by the voter.

Reimplemented in MibTableSizePolicy.


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