#include <QueueWithQoS.h>
Inheritance diagram for QueueWithQoS:
Leaves the endService(cMessage *msg) method of AbstractQueue undefined.
Public Member Functions | |
QueueWithQoS () | |
Protected Member Functions | |
virtual void | initialize () |
virtual void | arrival (cMessage *msg) |
virtual cMessage * | arrivalWhenIdle (cMessage *msg) |
virtual simtime_t | startService (cMessage *msg) |
Protected Attributes | |
simtime_t | delay |
EnqueueHook * | qosHook |
|
00043 {}
|
|
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: Implements AbstractQueue.
|
|
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 immmediately. This method may:
Most straightforward implementation: Implements AbstractQueue. 00039 { 00040 return qosHook->dropIfNotNeeded(msg); 00041 }
|
|
Reimplemented from AbstractQueue. 00024 { 00025 AbstractQueue::initialize(); 00026 00027 delay = par("procDelay"); 00028 qosHook = check_and_cast<EnqueueHook *>(createOne(par("qosBehaviorClass"))); 00029 qosHook->setModule(this); 00030 }
|
|
Called when a message starts service, and should return the service time.
Example implementation: Implements AbstractQueue. 00044 { 00045 return delay; 00046 }
|
|
|
|
|