DRCL JavaSim API

drcl.inet.core.queue
Class FRED

java.lang.Object
  |
  +--drcl.DrclObj
        |
        +--drcl.comp.queue.QLogic
              |
              +--drcl.inet.core.queue.RED
                    |
                    +--drcl.inet.core.queue.FRED
All Implemented Interfaces:
java.lang.Cloneable, ObjectDuplicable, PktClassifier, java.io.Serializable

public class FRED
extends RED
implements PktClassifier

The Fair Random Early Detection queue logic.

See Also:
Serialized Form

Field Summary
static boolean SANITY_CHECK
           
 
Fields inherited from class drcl.inet.core.queue.RED
avgQSizePort, bw, count, DTYPE_FORCED, DTYPE_NONE, DTYPE_UNFORCED, EVENT_AVG_QSIZE, idletime, mark, max_p, mean_pktsize, old, ptc, qavg, qw, RED_EWMA, RED_HOLT_WINTERS, th_max, th_min, ug, v_a, v_b, v_prob, v_slope, wait
 
Fields inherited from class drcl.comp.queue.QLogic
capacity, DEFAULT_ADVICE, EVENT_QSIZE, host, qlen, qsize, qSizePort
 
Constructor Summary
FRED()
           
FRED(Component host_, java.lang.String avgpid_)
           
 
Method Summary
 java.lang.String adviceOn(java.lang.Object obj_, int psize_)
          Returns advice (in String) on whether or not to drop the packet.
 int classify(Packet pkt_)
          Returns the class the packet belongs to.
 void dequeueHandler(java.lang.Object obj_, int psize_)
          Handles the event of dequeuing the object of the given size.
 void duplicate(java.lang.Object source_)
          Duplicates the content of the source object to this object.
 void enqueueHandler(java.lang.Object obj_, int psize_)
          Handles the event of enqueuing the object of the given size.
 PktClassifier getClassifier()
           
 java.lang.String info(java.lang.String prefix_)
          Prints the content (states) of this queue management instance.
 void reset()
          Resets this object to the initial state.
 void setClassifier(PktClassifier c_)
           
 
Methods inherited from class drcl.inet.core.queue.RED
drop_early, edv_print, getBandwidth, getInvProb, getMaxThresh, getMeanPacketSize, getMinThresh, getSeed, getWeight, isMarkEnabled, isWait, run_estimator, setAvgQSizePort, setBandwidth, setInvProb, setMarkEnabled, setMaxThresh, setMeanPacketSize, setMinThresh, setRandomNumberGenerator, setRandomNumberGenerator, setREDParam, setSeed, setWait, setWeight
 
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

SANITY_CHECK

public static boolean SANITY_CHECK
Constructor Detail

FRED

public FRED()

FRED

public FRED(Component host_,
            java.lang.String avgpid_)
Parameters:
avgpid_ - ID of the average queue size change event port that will be created at the host component.
Method Detail

reset

public void reset()
Description copied from class: QLogic
Resets this object to the initial state. Subclasses must call super.reset() when overriding this method.
Overrides:
reset in class RED

duplicate

public void duplicate(java.lang.Object source_)
Description copied from class: QLogic
Duplicates the content of the source object to this object. If the host component is already set, this method also creates the queue size change event port of the same ID as that in source_. Subclasses must call super.duplicate() when overriding this method.
Overrides:
duplicate in class RED

info

public java.lang.String info(java.lang.String prefix_)
Description copied from class: QLogic
Prints the content (states) of this queue management instance.
Overrides:
info in class RED
Following copied from class: drcl.comp.queue.QLogic
Parameters:
prefix_ - prefix of each line in the printout.

classify

public int classify(Packet pkt_)
Description copied from interface: PktClassifier
Returns the class the packet belongs to.
Specified by:
classify in interface PktClassifier

setClassifier

public void setClassifier(PktClassifier c_)

getClassifier

public PktClassifier getClassifier()

adviceOn

public java.lang.String adviceOn(java.lang.Object obj_,
                                 int psize_)
Returns advice (in String) on whether or not to drop the packet. Returns false if not to drop the packet.
Overrides:
adviceOn in class RED
Following copied from class: drcl.comp.queue.QLogic
Returns:
the advice; null if advicing not to drop the object.

dequeueHandler

public void dequeueHandler(java.lang.Object obj_,
                           int psize_)
Description copied from class: QLogic
Handles the event of dequeuing the object of the given size.
Overrides:
dequeueHandler in class RED

enqueueHandler

public void enqueueHandler(java.lang.Object obj_,
                           int psize_)
Description copied from class: QLogic
Handles the event of enqueuing the object of the given size.
Overrides:
enqueueHandler in class RED

DRCL JavaSim API

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