QueueBase Class Reference

#include <QueueBase.h>

Inheritance diagram for QueueBase:

AbstractQueue IP IPv6 List of all members.

Detailed Description

Queue with constant processing time. Leaves the endService(cMessage *msg) method of AbstractQueue undefined.


Public Member Functions

 QueueBase ()

Protected Member Functions

virtual void initialize ()
virtual void arrival (cMessage *msg)
virtual cMessage * arrivalWhenIdle (cMessage *msg)
virtual simtime_t startService (cMessage *msg)

Private Attributes

simtime_t delay


Constructor & Destructor Documentation

QueueBase::QueueBase (  )  [inline]

00036 {}


Member Function Documentation

void QueueBase::arrival ( cMessage *  msg  )  [protected, virtual]

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 AbstractQueue.

00030 {
00031     queue.insert(msg);
00032 }

cMessage * QueueBase::arrivalWhenIdle ( cMessage *  msg  )  [protected, virtual]

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:

  1. simply return the the same pointer (usual behaviour), or
  2. discard the message and return NULL pointer (the effect being this message being ignored)
  3. or modify the message, wrap in into another message etc, and return the (new) message's pointer.

Most straightforward implementation: return msg;

Implements AbstractQueue.

00035 {
00036     return msg;
00037 }

void QueueBase::initialize (  )  [protected, virtual]

Reimplemented from AbstractQueue.

Reimplemented in IP, and IPv6.

00024 {
00025     AbstractQueue::initialize();
00026     delay = par("procDelay");
00027 }

simtime_t QueueBase::startService ( cMessage *  msg  )  [protected, virtual]

Called when a message starts service, and should return the service time.

Example implementation: return 1.0;

Implements AbstractQueue.

00040 {
00041     return delay;
00042 }


Member Data Documentation

simtime_t QueueBase::delay [private]


The documentation for this class was generated from the following files:
Generated on Wed Apr 4 13:20:22 2007 for INET Framework for OMNeT++/OMNEST by  doxygen 1.4.7