SNMP Stack 5_1

uk.co.westhawk.snmp.pdu
Class InterfaceGetNextPdu

java.lang.Object
  |
  +--java.util.Observable
        |
        +--uk.co.westhawk.snmp.stack.Pdu
              |
              +--uk.co.westhawk.snmp.stack.GetNextPdu
                    |
                    +--uk.co.westhawk.snmp.pdu.InterfaceGetNextPduStub
                          |
                          +--uk.co.westhawk.snmp.pdu.InterfaceGetNextPdu

public class InterfaceGetNextPdu
extends InterfaceGetNextPduStub

The class InterfaceGetNextPdu. This file is auto generated by the StubBrowser utility, using Mibble. See the uk/co/westhawk/stub/ directory. Added speed parameter and methods by hand. Make sure that you replace the package name and classname placeholders. Also, move this file to the correct package directory. If these things are not done, this class will not compile correctly!!

Version:
$Revision: 3.16 $ $Date: 2006/01/17 17:59:33 $

Field Summary
protected  long _speed
           
 
Fields inherited from class uk.co.westhawk.snmp.pdu.InterfaceGetNextPduStub
_ifDescr, _ifIndex, _ifInOctets, _ifNumber, _ifOperStatus, _ifOperStatusMap, _ifOutOctets, _ifSpeed, _sysUpTime, _valid, all_oids, col_oids, ifDescr_OID, ifIndex_OID, ifInOctets_OID, ifNumber_OID, ifOperStatus_OID, ifOutOctets_OID, ifSpeed_OID, NO_COL, NO_OID, NO_SCAL, scal_oids, sysUpTime_OID
 
Fields inherited from class uk.co.westhawk.snmp.stack.Pdu
added, answered, context, encodedPacket, errind, errstat, msg_type, reqVarbinds, respVarbinds, snmpv3MsgId
 
Constructor Summary
InterfaceGetNextPdu(SnmpContextBasisFace con)
          Constructor.
 
Method Summary
static int getIfNumber(SnmpContextBasisFace con)
          Returns how many interfaces are present.
 long getSpeed()
          Returns the last calculates speed.
 long getSpeed(InterfaceGetNextPdu old)
          Calculates the speed of the interface.
 java.lang.String toString()
          Returns the string representation of the PDU.
 
Methods inherited from class uk.co.westhawk.snmp.pdu.InterfaceGetNextPduStub
addOids, addOids, getIfDescr, getIfIndex, getIfInOctets, getIfNumber, getIfOperStatus, getIfOperStatusStr, getIfOutOctets, getIfSpeed, getSysUpTime, isValid, new_value, setIfDescr, setIfIndex, setIfInOctets, setIfNumber, setIfOperStatus, setIfOutOctets, setIfSpeed, setSysUpTime
 
Methods inherited from class uk.co.westhawk.snmp.stack.Pdu
addOid, addOid, addOid, addOid, addOid, addToTrans, getContext, getErrorIndex, getErrorStatus, getErrorStatusString, getMsgType, getReqId, getRequestVarbinds, getResponseVarbinds, isExpectingResponse, isTimedOut, notifyObservers, printVars, send, send, send, sendme, setErrorIndex, setErrorStatus, setErrorStatus, setMsgType, setRetryIntervals, tell_them, toString, waitForSelf
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_speed

protected long _speed
Constructor Detail

InterfaceGetNextPdu

public InterfaceGetNextPdu(SnmpContextBasisFace con)
Constructor.

Parameters:
con - The context of the request
Method Detail

getSpeed

public long getSpeed()
Returns the last calculates speed.

See Also:
getSpeed(InterfaceGetNextPdu)

getSpeed

public long getSpeed(InterfaceGetNextPdu old)
Calculates the speed of the interface. This is done by providing the method with the previous value of this interface. An interface is marked by its index. Do not confuse it with the previous interface ifInOctets the MIB.

Parameters:
old - The previous value of this interface

getIfNumber

public static int getIfNumber(SnmpContextBasisFace con)
                       throws PduException,
                              java.io.IOException
Returns how many interfaces are present.

Returns:
the number of interfaces
PduException
java.io.IOException

toString

public java.lang.String toString()
Description copied from class: Pdu
Returns the string representation of the PDU.

Overrides:
toString in class InterfaceGetNextPduStub
Returns:
The string of the PDU

SNMP Stack 5_1