INET Framework for OMNeT++/OMNEST
|
Abstract base class for passive queues. More...
#include <PassiveQueueBase.h>
Public Member Functions | |
virtual void | requestPacket () override |
The queue should send a packet whenever this method is invoked. More... | |
virtual int | getNumPendingRequests () override |
Returns number of pending requests. More... | |
virtual void | clear () override |
Clear all queued packets and stored requests. More... | |
virtual cMessage * | pop () override |
Return a packet from the queue directly. More... | |
virtual void | addListener (IPassiveQueueListener *listener) override |
Implementation of IPassiveQueue::addListener(). More... | |
virtual void | removeListener (IPassiveQueueListener *listener) override |
Implementation of IPassiveQueue::removeListener(). More... | |
Public Member Functions inherited from inet::IPassiveQueue | |
virtual | ~IPassiveQueue () |
virtual bool | isEmpty ()=0 |
Return true when queue is empty, otherwise return false. More... | |
Static Public Attributes | |
static simsignal_t | rcvdPkSignal = registerSignal("rcvdPk") |
Signal with packet when received it. More... | |
static simsignal_t | enqueuePkSignal = registerSignal("enqueuePk") |
Signal with packet when enqueued it. More... | |
static simsignal_t | dequeuePkSignal = registerSignal("dequeuePk") |
Signal with packet when sent out it. More... | |
static simsignal_t | dropPkByQueueSignal = registerSignal("dropPkByQueue") |
Signal with packet when dropped it. More... | |
static simsignal_t | queueingTimeSignal = registerSignal("queueingTime") |
Signal with value of delaying time when sent out a packet. More... | |
Protected Member Functions | |
virtual void | initialize () override |
virtual void | handleMessage (cMessage *msg) override |
virtual void | finish () override |
virtual void | refreshDisplay () const override |
virtual void | notifyListeners () |
virtual cMessage * | enqueue (cMessage *msg)=0 |
Inserts packet into the queue or the priority queue, or drops it (or another packet). More... | |
virtual cMessage * | dequeue ()=0 |
Returns a packet from the queue, or nullptr if the queue is empty. More... | |
virtual void | sendOut (cMessage *msg)=0 |
Should be redefined to send out the packet; e.g. More... | |
Protected Attributes | |
std::list< IPassiveQueueListener * > | listeners |
int | packetRequested |
int | numQueueReceived |
int | numQueueDropped |
Abstract base class for passive queues.
Implements IPassiveQueue. Enqueue/dequeue have to be implemented in virtual functions in subclasses; the actual queue or piority queue data structure also goes into subclasses.
|
overridevirtual |
Implementation of IPassiveQueue::addListener().
Implements inet::IPassiveQueue.
|
overridevirtual |
Clear all queued packets and stored requests.
Implements inet::IPassiveQueue.
|
protectedpure virtual |
Returns a packet from the queue, or nullptr if the queue is empty.
Implemented in inet::DropTailQueue, and inet::FIFOQueue.
Referenced by clear(), pop(), and requestPacket().
|
protectedpure virtual |
Inserts packet into the queue or the priority queue, or drops it (or another packet).
Returns nullptr if successful, or the pointer of the dropped packet.
Implemented in inet::DropTailQueue, and inet::FIFOQueue.
Referenced by handleMessage().
|
inlineoverridevirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
Reimplemented in inet::FIFOQueue, and inet::DropTailQueue.
Referenced by inet::DropTailQueue::initialize(), and inet::FIFOQueue::initialize().
|
protectedvirtual |
Referenced by handleMessage().
|
overridevirtual |
Return a packet from the queue directly.
Implements inet::IPassiveQueue.
|
overrideprotectedvirtual |
|
overridevirtual |
Implementation of IPassiveQueue::removeListener().
Implements inet::IPassiveQueue.
|
overridevirtual |
The queue should send a packet whenever this method is invoked.
If the queue is currently empty, it should send a packet when when one becomes available.
Implements inet::IPassiveQueue.
|
protectedpure virtual |
Should be redefined to send out the packet; e.g.
send(msg,"out")
.
Implemented in inet::DropTailQueue, and inet::FIFOQueue.
Referenced by handleMessage(), and requestPacket().
|
static |
Signal with packet when sent out it.
Referenced by handleMessage(), and requestPacket().
|
static |
Signal with packet when dropped it.
Referenced by handleMessage(), inet::visualizer::PacketDropVisualizerBase::receiveSignal(), inet::visualizer::PacketDropVisualizerBase::subscribe(), and inet::visualizer::PacketDropVisualizerBase::unsubscribe().
|
static |
Signal with packet when enqueued it.
Referenced by handleMessage().
|
protected |
Referenced by addListener(), notifyListeners(), and removeListener().
|
protected |
Referenced by handleMessage(), initialize(), and refreshDisplay().
|
protected |
Referenced by handleMessage(), initialize(), and refreshDisplay().
|
protected |
Referenced by clear(), handleMessage(), initialize(), and requestPacket().
|
static |
Signal with value of delaying time when sent out a packet.
Referenced by handleMessage(), and requestPacket().
|
static |
Signal with packet when received it.
Referenced by handleMessage().