|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.net.traffic.TrafficShaper
drcl.net.traffic.tsTokenBucket
A traffic shaper that conforms to the token bucket
traffic model.
traffic_TokenBucket,
Serialized Form| Constructor Summary | |
tsTokenBucket()
|
|
tsTokenBucket(traffic_TokenBucket traffic_)
|
|
| Method Summary | |
protected double |
adjust(double now_,
int size_)
Returns the time adjustment (relative to the current time now_)
for outputing the packet. |
int |
getBucketSize()
|
int |
getInitBucketSize()
|
int |
getMTU()
|
double |
getOutputRate()
|
int |
getTokenGenRate()
|
TrafficModel |
getTrafficModel()
Returns the associated traffic model. |
java.lang.String |
info(java.lang.String prefix_)
Prints out the content of this traffic shaper instance. |
void |
reset()
|
void |
set(int bsize_,
int initbsize_,
int trate_,
double outrate_,
int mtu_)
|
void |
setBucketSize(int size_)
|
void |
setInitBucketSize(int size_)
|
void |
setMTU(int mtu_)
|
void |
setOutputRate(double rate_)
|
void |
setTokenGenRate(int rate_)
|
void |
setTrafficModel(TrafficModel traffic_)
Sets the associated traffic model. |
| Methods inherited from class drcl.net.traffic.TrafficShaper |
adjust, dequeue, duplicate, getAvailableBufferSize, getBufferLength, getBufferSize, nextOutputTime, setBufferSize |
| 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 |
public tsTokenBucket()
public tsTokenBucket(traffic_TokenBucket traffic_)
| Method Detail |
public void reset()
reset in class TrafficShaperpublic java.lang.String info(java.lang.String prefix_)
TrafficShapersuper.info(prefix_) and
then supply the content of the parameters defined in the subclass.
info in class TrafficShaperprefix_ - prefix_ that should be prepended at each line.
protected double adjust(double now_,
int size_)
TrafficShapernow_)
for outputing the packet.
This is the main method a subclass must override to regulate the incoming packets.
The current time passed to this method is maintained relatively to the time
when this component starts.
adjust in class TrafficShapernow_ - current time, relative to the start time of the shaper.size_ - the packet size.public TrafficModel getTrafficModel()
TrafficShaper
getTrafficModel in class TrafficShaperpublic void setTrafficModel(TrafficModel traffic_)
TrafficShaper
setTrafficModel in class TrafficShaperpublic void setOutputRate(double rate_)
public double getOutputRate()
public void setTokenGenRate(int rate_)
public int getTokenGenRate()
public void setBucketSize(int size_)
public int getBucketSize()
public void setInitBucketSize(int size_)
public int getInitBucketSize()
public int getMTU()
public void setMTU(int mtu_)
public void set(int bsize_,
int initbsize_,
int trate_,
double outrate_,
int mtu_)
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||