drcl.net.traffic
Class traffic_TokenBucket
java.lang.Object
|
+--drcl.DrclObj
|
+--drcl.net.traffic.TrafficModel
|
+--drcl.net.traffic.traffic_TokenBucket
- All Implemented Interfaces:
- java.lang.Cloneable, ObjectDuplicable, java.io.Serializable, TrafficPeriodic
- public class traffic_TokenBucket
- extends TrafficModel
- implements TrafficPeriodic
This class describes the token bucket traffic model.
It is defined by the following parameters:
- Bucket Size
- The size of the token bucket (byte).
- Initial Bucket Size
- The number of tokens that are available in the bucket initially (byte).
- Token Generation Rate
- Rate of tokens being generated and filled in the bucket (bps).
- Output Rate
- The rate of outputing packets out of the bucket (bps).
- Maximum Transmit Unit (MTU)
- The maximum size of a packet (byte).
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
outRate
public double outRate
tokenGenRate
public int tokenGenRate
bucketSize
public int bucketSize
initBucketSize
public int initBucketSize
mtu
public int mtu
traffic_TokenBucket
public traffic_TokenBucket()
traffic_TokenBucket
public traffic_TokenBucket(int bsize_,
int initbsize_,
int trate_,
double outrate_,
int mtu_)
getPeriod
public double getPeriod()
- Description copied from interface:
TrafficPeriodic
- Returns the period in second.
- Specified by:
getPeriod in interface TrafficPeriodic
getLoad
public double getLoad()
- Description copied from class:
TrafficModel
- Returns the load of this traffic model instance (bps).
It provides a general sense of how much
traffic there is in this model instance.
- Overrides:
getLoad in class TrafficModel
getBurst
public int getBurst()
- Description copied from class:
TrafficModel
- Returns the maximum burstness that can be generated from this model instance (byte).
- Overrides:
getBurst in class TrafficModel
merge
public TrafficModel merge(TrafficModel that_)
- Description copied from class:
TrafficModel
- Merges this instance with the specified one and returns this instance.
- Overrides:
merge in class TrafficModel
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 DrclObj
oneline
public java.lang.String oneline()
- Description copied from class:
TrafficModel
- Prints and returns the parameters of this model instance in one line of String.
- Overrides:
oneline in class TrafficModel
setOutputRate
public void setOutputRate(double rate_)
getOutputRate
public double getOutputRate()
setTokenGenRate
public void setTokenGenRate(int rate_)
getTokenGenRate
public int getTokenGenRate()
setBucketSize
public void setBucketSize(int size_)
getBucketSize
public int getBucketSize()
setInitBucketSize
public void setInitBucketSize(int size_)
getInitBucketSize
public int getInitBucketSize()
getMTU
public int getMTU()
- Description copied from class:
TrafficModel
- Returns the maximum transmission unit (MTU) of this model instance (byte).
- Overrides:
getMTU in class TrafficModel
setMTU
public void setMTU(int mtu_)
Copyright © 2001 - DRCL, OSU ~ Back to JavaSim Home ~