EnqueueHook Class Reference

#include <EnqueueHook.h>

List of all members.


Detailed Description

Abstract base class for enqueue hooks.

Public Member Functions

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

Member Function Documentation

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().

00037 {}

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 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().


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

Generated on Fri Mar 20 18:51:18 2009 for INET Framework for OMNeT++/OMNEST by  doxygen 1.5.5