|
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.comp.queue.QLogic
drcl.inet.core.queue.RED
The Random Early Detection (RED) queue logic.
| Field Summary | |
protected Port |
avgQSizePort
Port to output average queue size change event |
protected double |
bw
Link bandwidth (bps), for computing ptc. |
protected long |
count
# of packets since last early drop. |
protected static java.lang.String |
DTYPE_FORCED
|
protected static java.lang.String |
DTYPE_NONE
|
protected static java.lang.String |
DTYPE_UNFORCED
|
static java.lang.String |
EVENT_AVG_QSIZE
Name of the average queue size change event. |
protected double |
idletime
Start of the current idle period. |
protected boolean |
mark
The mark flag, true for marking CE bit instead of early dropping. |
protected double |
max_p
Maximum dropping probability. |
protected int |
mean_pktsize
Mean packet size (byte), for computing ptc. |
protected int |
old
0 when average queue first exceeds thresh. |
protected double |
ptc
Output rate of the link in packets/second. |
protected double |
qavg
Computed average queue size. |
protected double |
qw
Weight for computing average queue size given to current queue size sample. |
static boolean |
RED_EWMA
|
static boolean |
RED_HOLT_WINTERS
|
protected double |
th_max
Maximum threshold of average queue size. |
protected double |
th_min
Minimum threshold of average queue size. |
protected RandomNumberGenerator |
ug
The random number generator used in this RED. |
protected double |
v_a
For computing dropping probability ( =max_p*(qavg - min_th)/(max_th-min_th) = v_a * qavg + v_b). |
protected double |
v_b
For computing dropping probability ( =max_p*(qavg - min_th)/(max_th-min_th) = v_a * qavg + v_b). |
protected double |
v_prob
Computed dropping probability for the incoming packet, for diagnosis purpose. |
protected double |
v_slope
Variable used in HOLT WINTERS filter for computing average queue size. |
protected boolean |
wait
The wait flag, true for waiting between dropped packets. |
| Fields inherited from class drcl.comp.queue.QLogic |
capacity, DEFAULT_ADVICE, EVENT_QSIZE, host, qlen, qsize, qSizePort |
| Constructor Summary | |
RED()
|
|
RED(Component host_,
java.lang.String avgpid_)
|
|
RED(Component host_,
java.lang.String avgpid_,
java.lang.String qpid_)
|
|
| Method Summary | |
java.lang.String |
adviceOn(java.lang.Object obj_,
int psize_)
Returns advice (in String) on whether or not to drop the packet. |
void |
dequeueHandler(java.lang.Object obj_,
int psize_)
Handles the event of dequeuing the object of the given size. |
protected boolean |
drop_early(Packet pkt_)
|
void |
duplicate(java.lang.Object source_)
Duplicates the content of the source object to this object. |
protected java.lang.String |
edv_print(java.lang.String prefix_)
|
void |
enqueueHandler(java.lang.Object obj_,
int psize_)
Handles the event of enqueuing the object of the given size. |
double |
getBandwidth()
|
double |
getInvProb()
|
double |
getMaxThresh()
|
int |
getMeanPacketSize()
|
double |
getMinThresh()
|
long |
getSeed()
|
double |
getWeight()
|
java.lang.String |
info(java.lang.String prefix_)
Prints the content (states) of this queue management instance. |
boolean |
isMarkEnabled()
|
boolean |
isWait()
|
void |
reset()
Resets this object to the initial state. |
protected void |
run_estimator(boolean advice_)
Computes the average queue size. |
void |
setAvgQSizePort(java.lang.String avgqspid_)
|
void |
setBandwidth(double bw_)
|
void |
setInvProb(double value)
|
void |
setMarkEnabled(boolean enabled_)
If enabled, RED marks the congestion bit of, instead of advising to drop, packets. |
void |
setMaxThresh(double max)
|
void |
setMeanPacketSize(int size_)
|
void |
setMinThresh(double min)
|
void |
setRandomNumberGenerator(RandomNumberGenerator ug_)
|
void |
setRandomNumberGenerator(RandomNumberGenerator ug_,
long seed_)
|
void |
setREDParam(int psize_,
double bw_,
double th_max_,
double th_min_,
double inv_max_p_,
double qw_)
Sets up all RED parameters. |
void |
setSeed(long seed_)
|
void |
setWait(boolean enabled_)
|
void |
setWeight(double weight)
|
| Methods inherited from class drcl.comp.queue.QLogic |
dropHandler, getCapacity, getCurrentQLength, getCurrentQSize, getHost, info, isEmpty, isFull, set, setCapacity, setHost, setQSizePort |
| Methods inherited from class drcl.DrclObj |
clone, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static boolean RED_EWMA
public static boolean RED_HOLT_WINTERS
protected static final java.lang.String DTYPE_NONE
protected static final java.lang.String DTYPE_FORCED
protected static final java.lang.String DTYPE_UNFORCED
public static final java.lang.String EVENT_AVG_QSIZE
protected Port avgQSizePort
protected int mean_pktsize
ptc.
protected double bw
ptc.
protected double th_min
protected double th_max
protected double max_p
protected double qw
protected boolean wait
protected boolean mark
protected double ptc
protected double v_a
=max_p*(qavg - min_th)/(max_th-min_th) = v_a * qavg + v_b).
protected double v_b
=max_p*(qavg - min_th)/(max_th-min_th) = v_a * qavg + v_b).
protected double qavg
protected double v_slope
protected double v_prob
protected long count
protected int old
protected double idletime
Double.NaN if not idle.
protected RandomNumberGenerator ug
| Constructor Detail |
public RED()
public RED(Component host_,
java.lang.String avgpid_)
avgpid_ - ID of the average queue size change event port that will be created at
the host component.
public RED(Component host_,
java.lang.String avgpid_,
java.lang.String qpid_)
avgpid_ - ID of the average queue size change event port that will be created at
the host component.qpid_ - ID of the instant queue size change event port that will be created at
the host component.| Method Detail |
public void reset()
QLogicsuper.reset() when
overriding this method.
reset in class QLogicpublic void duplicate(java.lang.Object source_)
QLogicsource_.
Subclasses must call super.duplicate() when
overriding this method.
duplicate in interface ObjectDuplicableduplicate in class QLogicpublic java.lang.String info(java.lang.String prefix_)
QLogic
info in class QLogicprefix_ - prefix of each line in the printout.protected void run_estimator(boolean advice_)
protected boolean drop_early(Packet pkt_)
public java.lang.String adviceOn(java.lang.Object obj_,
int psize_)
adviceOn in class QLogic
public void enqueueHandler(java.lang.Object obj_,
int psize_)
QLogic
enqueueHandler in class QLogic
public void dequeueHandler(java.lang.Object obj_,
int psize_)
QLogic
dequeueHandler in class QLogicpublic void setWait(boolean enabled_)
public boolean isWait()
public void setMarkEnabled(boolean enabled_)
public boolean isMarkEnabled()
public void setMeanPacketSize(int size_)
public int getMeanPacketSize()
public void setMaxThresh(double max)
public double getMaxThresh()
public void setMinThresh(double min)
public double getMinThresh()
public void setInvProb(double value)
public double getInvProb()
public void setWeight(double weight)
public double getWeight()
public double getBandwidth()
public void setBandwidth(double bw_)
public void setREDParam(int psize_,
double bw_,
double th_max_,
double th_min_,
double inv_max_p_,
double qw_)
public void setSeed(long seed_)
public long getSeed()
public void setRandomNumberGenerator(RandomNumberGenerator ug_)
public void setRandomNumberGenerator(RandomNumberGenerator ug_,
long seed_)
public void setAvgQSizePort(java.lang.String avgqspid_)
protected java.lang.String edv_print(java.lang.String prefix_)
|
J-Sim v1.2.1-p7 API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||