INET Framework for OMNeT++/OMNEST
EnqueueHook Class Reference

#include <EnqueueHook.h>

List of all members.

Public Member Functions

virtual void setModule (cSimpleModule *)
virtual void enqueue (cMessage *msg, cQueue &queue)=0
virtual cMessage * dropIfNotNeeded (cMessage *msg)=0

Detailed Description

Abstract base class for enqueue hooks.


Member Function Documentation

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.

Referenced by QueueWithQoS::arrivalWhenIdle().

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.

Referenced by QueueWithQoS::arrival().

virtual void EnqueueHook::setModule ( cSimpleModule *  ) [inline, virtual]

Called with the "this" pointer from the module which installs this object. Subclasses may use the pointer to get access to module pointers, etc. Note that this class doesn't store the pointer but subclasses may well decide to do so.

Referenced by QueueWithQoS::initialize().

{}

The documentation for this class was generated from the following file: