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) |
Modifier and Type | Method and Description |
---|---|
static QueuingEntity |
createInstance(SimNode ownNode,
Parameters pars)
as required by
ReflectionConstructable |
InputPort |
getInput() |
OutputPort |
getOutput() |
QueuingDiscipline |
getQDisc() |
protected Message |
handleGetMessage(Port port) |
protected boolean |
handleIsMessageAvailable(Port port) |
protected void |
handleMessageIndication(Message msg) |
void |
setQDisc(QueuingDiscipline queuingDisc) |
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 void setQDisc(QueuingDiscipline queuingDisc)
public InputPort getInput()
public OutputPort getOutput()
public QueuingDiscipline getQDisc()
protected boolean handleIsMessageAvailable(Port port)
protected void handleMessageIndication(Message msg)