INET Framework for OMNeT++/OMNEST
|
Queue with constant processing time. More...
#include <QueueBase.h>
Public Member Functions | |
QueueBase () | |
Public Member Functions inherited from inet::AbstractQueue | |
AbstractQueue () | |
virtual | ~AbstractQueue () |
Protected Member Functions | |
virtual void | initialize () override |
virtual void | arrival (cPacket *msg) override |
Functions to (re)define behaviour. More... | |
virtual cPacket * | arrivalWhenIdle (cPacket *msg) override |
Called when a message arrives at the module when the queue is empty. More... | |
virtual simtime_t | startService (cPacket *msg) override |
Called when a message starts service, and should return the service time. More... | |
Protected Member Functions inherited from inet::AbstractQueue | |
virtual void | handleMessage (cMessage *msg) override |
virtual void | endService (cPacket *msg)=0 |
Called when a message completes service. More... | |
virtual cPacket * | cancelService () |
If a message is under service, aborts its service and returns the message. More... | |
Protected Attributes | |
simtime_t | delay |
Protected Attributes inherited from inet::AbstractQueue | |
cPacketQueue | queue |
The queue. More... | |
Queue with constant processing time.
Leaves the endService(cMessage *msg) method of AbstractQueue undefined.
|
overrideprotectedvirtual |
Functions to (re)define behaviour.
Called when a message arrives at the module. The method should either enqueue this message (usual behaviour), or discard it. It may also wrap the it into another message, and insert that one in the queue.
Most straightforward implementation: queue.insert(msg);
Implements inet::AbstractQueue.
|
overrideprotectedvirtual |
Called when a message arrives at the module when the queue is empty.
The message doesn't need to be enqueued in this case, it can start service immediately. This method may:
Most straightforward implementation: return msg;
Implements inet::AbstractQueue.
|
overrideprotectedvirtual |
Reimplemented from inet::AbstractQueue.
Reimplemented in inet::GenericNetworkProtocol.
Referenced by inet::GenericNetworkProtocol::initialize(), inet::IPv6::initialize(), and inet::IPv4::initialize().
|
overrideprotectedvirtual |
Called when a message starts service, and should return the service time.
Example implementation: return 1.0;
Implements inet::AbstractQueue.
|
protected |
Referenced by initialize(), and startService().