DRCL JavaSim API

drcl.diffserv
Class TC_meter

java.lang.Object
  |
  +--drcl.DrclObj
        |
        +--drcl.diffserv.Meter
              |
              +--drcl.diffserv.TC_meter
All Implemented Interfaces:
java.lang.Cloneable, DFConstants, ObjectDuplicable, java.io.Serializable

public class TC_meter
extends Meter
implements DFConstants

This class implementes a three-color meter. it can operate in two modes, single-rate or two rate refer to RFC 2697, 2698 for detail

Version:
1.0 07/16/2000

Properties:

Author:
Rong Zheng (zhengr@ee.eng.ohio-state.edu)
See Also:
Serialized Form

Fields inherited from interface drcl.diffserv.DFConstants
_AF_CLASSES, _SINGLE_RATE, _TWO_RATE, AF11, AF11_TOS, AF12, AF12_TOS, AF13, AF13_TOS, AF1x, AF1x_TOS, AF21, AF21_TOS, AF22, AF22_TOS, AF23, AF23_TOS, AF2x, AF2x_TOS, AF31, AF31_TOS, AF32, AF32_TOS, AF33, AF33_TOS, AF3x, AF3x_TOS, BE, BE_TOS, DFCLASS_MASK, DSCPMask, DSCPShift, EF, EF_TOS, GREEN, IN_PROFILE, MODES, OUT_PROFILE, RED, SINGLE_RATE, TWO_RATE, YELLOW
 
Constructor Summary
TC_meter()
           
TC_meter(java.lang.String mode_, long cbs, long cir, long pbs, long pir)
           
 
Method Summary
 void config(java.lang.String mode, long cbs, long cir, long pbs, long pir)
           
 void duplicate(java.lang.Object source_)
          opies the content of the source_ object to this object.
 long getCommittedBurstSize()
           
 long getCommittedInformationRate()
           
 java.lang.String getMode()
           
 long getPeakBurstSize()
           
 long getPeakInformationRate()
           
 java.lang.String info(java.lang.String prefix_)
          Prints out the content of this meter.
 boolean isDebugEnabled()
           
protected  int measure(Packet p_, double now_)
          Returns the label for the packet based on the measurement and the agreement of the connection the packet belongs to.
 void reset()
          Resets this meter to be used anew.
 void setCommittedBurstSize(long cbs)
           
 void setCommittedInformationRate(long cir)
           
 void setDebugEnabled(boolean enabled_)
           
 void setMode(java.lang.String mode_)
           
 void setPeakBurstSize(long pbs)
           
 void setPeakInformationRate(long pir)
           
 
Methods inherited from class drcl.diffserv.Meter
info
 
Methods inherited from class drcl.DrclObj
clone, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TC_meter

public TC_meter()

TC_meter

public TC_meter(java.lang.String mode_,
                long cbs,
                long cir,
                long pbs,
                long pir)
Method Detail

reset

public void reset()
Description copied from class: Meter
Resets this meter to be used anew.
Overrides:
reset in class Meter

duplicate

public void duplicate(java.lang.Object source_)
Description copied from class: DrclObj
opies the content of the source_ object to this object. he subclass must implement this method to realize DrclObj.clone().
Overrides:
duplicate in class Meter

info

public java.lang.String info(java.lang.String prefix_)
Description copied from class: Meter
Prints out the content of this meter.
Overrides:
info in class Meter
Following copied from class: drcl.diffserv.Meter
Parameters:
prefix_ - prefix that should be prepended to each line of the result.

setPeakInformationRate

public void setPeakInformationRate(long pir)

getPeakInformationRate

public long getPeakInformationRate()

setPeakBurstSize

public void setPeakBurstSize(long pbs)

getPeakBurstSize

public long getPeakBurstSize()

setCommittedInformationRate

public void setCommittedInformationRate(long cir)

getCommittedInformationRate

public long getCommittedInformationRate()

setCommittedBurstSize

public void setCommittedBurstSize(long cbs)

getCommittedBurstSize

public long getCommittedBurstSize()

setDebugEnabled

public void setDebugEnabled(boolean enabled_)

isDebugEnabled

public boolean isDebugEnabled()

setMode

public void setMode(java.lang.String mode_)

getMode

public java.lang.String getMode()

measure

protected int measure(Packet p_,
                      double now_)
Description copied from class: Meter
Returns the label for the packet based on the measurement and the agreement of the connection the packet belongs to.
Overrides:
measure in class Meter

config

public void config(java.lang.String mode,
                   long cbs,
                   long cir,
                   long pbs,
                   long pir)

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~