public class QueuingEntity extends Entity implements ReflectionConstructable2<SimNode,Parameters>
QueuingEntity
is the entity that integrates a queuing discipline
managing some buffer into the simulation. The QueuingEntity
has ports
and only calls few public methods of QueuingDiscipline:
isEmpty()
dequeue()
handleMessage()
dropScheduledNext()
The handleMessage() may just
add the message to the StackableQueuingDiscipline
's data buffer or
result in packet discards, maybe of the provided packet or other packet(s)
already in the buffer.Entity.PortAlias
Modifier and Type | Field and Description |
---|---|
protected InputPort |
inputPort |
protected OutputPort |
outputPort |
protected QueuingDiscipline |
qdisc |
portAliases, ports, simNode
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
QueuingEntity(SimNode ownNode)
When using this constructor, you MUST use setQDisc to set the
QueuingDiscipline before using this QueuingEntity . |
QueuingEntity(SimNode ownNode,
Parameters pars) |
addPort, aliasPort, aliasPort, connect, disconnect, getName, getNode, getPortByName, getPorts, isPortKnown, unaliasPort
protected final InputPort inputPort
protected final OutputPort outputPort
protected QueuingDiscipline qdisc
public QueuingEntity(SimNode ownNode, Parameters pars)
public QueuingEntity(SimNode ownNode)
QueuingDiscipline
before using this QueuingEntity
. It is
expected, but not enforced, that the QueuingEntity
instance is the
parent SimNode
of the QueuingDiscipline
.public static QueuingEntity createInstance(SimNode ownNode, Parameters pars)
ReflectionConstructable
public static QueuingEntity createBoundedFIFOQueue(SimNode ownNode, int size)
public static QueuingEntity createBoundedFIFOQueue(SimNode ownNode, Parameters pars)
public static QueuingEntity createUnboundedFIFOQueue(SimNode ownNode)
public static QueuingEntity createUnboundedFIFOQueue(SimNode ownNode, Parameters pars)
public static QueuingEntity createBoundedLIFOQueue(SimNode ownNode, int size)
public static QueuingEntity createBoundedLIFOQueue(SimNode ownNode, Parameters pars)
public static QueuingEntity createUnboundedLIFOQueue(SimNode ownNode)
public static QueuingEntity createUnboundedLIFOQueue(SimNode ownNode, Parameters pars)
public void setQDisc(QueuingDiscipline queuingDisc)
public InputPort getInput()
public OutputPort getOutput()
public QueuingDiscipline getQDisc()
protected boolean handleIsMessageAvailable(Port port)
protected void handleMessageIndication(Message msg)