DRCL J-Sim API

drcl.inet.core.queue
Class FRED

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.queue.QLogic
          extended bydrcl.inet.core.queue.RED
              extended bydrcl.inet.core.queue.FRED
All Implemented Interfaces:
java.lang.Cloneable, ObjectCloneable, 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
EVENT_AVG_QSIZE, RED_EWMA, RED_HOLT_WINTERS
 
Fields inherited from class drcl.comp.queue.QLogic
capacity, EVENT_QSIZE, qlen, qsize
 
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
getBandwidth, getInvProb, getMaxThresh, getMeanPacketSize, getMinThresh, getSeed, getWeight, isMarkEnabled, isWait, 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, 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.

Specified by:
duplicate in interface ObjectDuplicable
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

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

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 J-Sim API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~