drcl.diffserv
Class Meter
java.lang.Object
|
+--drcl.DrclObj
|
+--drcl.diffserv.Meter
- All Implemented Interfaces:
- java.lang.Cloneable, ObjectDuplicable, java.io.Serializable
- Direct Known Subclasses:
- TB_meter, TC_meter, TSW_meter
- public abstract class Meter
- extends DrclObj
This defines the base class for a meter.
Subclasses needs to override: measure(drcl.net.Packet, double),
reset(), duplicate(Object) and info(String).
- Author:
- Rong Zheng (zhengr@ee.eng.ohio-state.edu)
version 1.0 07/16/00
- See Also:
- Serialized Form
|
Constructor Summary |
Meter()
|
|
Method Summary |
abstract void |
duplicate(java.lang.Object source_)
opies the content of the source_ object to this object. |
java.lang.String |
info()
|
abstract java.lang.String |
info(java.lang.String prefix_)
Prints out the content of this meter. |
protected abstract 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. |
abstract void |
reset()
Resets this meter to be used anew. |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Meter
public Meter()
measure
protected abstract 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.
reset
public abstract void reset()
- Resets this meter to be used anew.
duplicate
public abstract 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 DrclObj
info
public java.lang.String info()
info
public abstract java.lang.String info(java.lang.String prefix_)
- Prints out the content of this meter.
- Parameters:
prefix_ - prefix that should be prepended to each line of the result.
Copyright © 2001 - DRCL, OSU ~ Back to JavaSim Home ~