#include <EnqueueHook.h>
Public Member Functions | |
virtual void | setModule (cSimpleModule *) |
virtual void | enqueue (cMessage *msg, cQueue &queue)=0 |
virtual cMessage * | dropIfNotNeeded (cMessage *msg)=0 |
virtual cMessage* EnqueueHook::dropIfNotNeeded | ( | cMessage * | msg | ) | [pure virtual] |
Called when a packet arrives and the queue is empty. Implementation of this function should either return the same pointer, or drop the packet and return NULL.
virtual void EnqueueHook::enqueue | ( | cMessage * | msg, | |
cQueue & | queue | |||
) | [pure virtual] |
Called when a packet arrives and the queue is not empty. Implementation of this function should enqueue the packet -- or just discard it. It can also do priority queueing or discard other packets already in the queue -- anything.
virtual void EnqueueHook::setModule | ( | cSimpleModule * | ) | [inline, virtual] |