Package: inet.queueing.queue


compound module

This module implements a priority queue with multiple inner queues and an optional shared memory buffer.

IPacketBuffer IPacketClassifier IPacketQueue IPacketScheduler

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Known subclasses

Name Type Description
EthernetPriorityQueue compound module (no description)


Name Type Description
CompoundPacketQueueBase compound module

This compound module serves as a base module for complex packet queues formed by combining several queueing components.


Name Type Default value Description
displayStringTextFormat string "contains %p pk (%l) pushed %u created %c\n pulled %o removed %r dropped %d"

determines the text that is written on top of the submodule

packetCapacity int -1

maximum number of packets in the queue, no limit by default

dataCapacity int -1b

maximum total length of packets in the queue, no limit by default

dropperClass string ""

determines which packets are dropped when the queue is overloaded, packets are not dropped by default; the parameter must be the name of a C++ class which implements the IPacketDropperFunction C++ interface and is registered via Register_Class

numQueues int


Name Value Description
display i=block/queue
class CompoundPacketQueueBase
defaultStatistic queueLength:vector


Name Direction Size Description
in input
out output


Name Type Unit
packetRemoved inet::Packet
packetPushStarted inet::Packet
packetDropped inet::Packet
packetPushEnded inet::Packet?
packetPulled inet::Packet


Name Title Source Record Unit Interpolation Mode
queueBitLength queue bit length warmup(atomic(constant0(localSignal(packetPushEnded)) + sum(packetLength(localSignal(packetPushStarted))) - sum(packetLength(localSignal(packetPulled))) - sum(packetLength(localSignal(packetRemoved))) - sum(packetLength(localSignal(packetDropped))))) last, max, timeavg, vector b sample-hold
queueLength queue length warmup(atomic(constant0(localSignal(packetPushEnded)) + count(localSignal(packetPushStarted)) - count(localSignal(packetPulled)) - count(localSignal(packetRemoved)) - count(localSignal(packetDropped)))) last, max, timeavg, vector pk sample-hold
droppedPacketsQueueOverflow dropped packets: queue overflow packetDropReasonIsQueueOverflow(localSignal(packetDropped)) count pk none
queueingTime queueing times queueingTime(localSignal(packetPulled)) histogram, vector s none
incomingDataRate incoming datarate throughput(localSignal(packetPushStarted)) vector bps linear
flowQueueingTime flow queueing times queueingTime(demuxFlow(localSignal(packetPulled))) histogram, vector s none
incomingPacketLengths incoming packet lengths packetLength(localSignal(packetPushStarted)) sum, histogram, vector b none
flowIncomingDataRate flow specific incoming data rate throughput(flowPacketLength(demuxFlow(localSignal(packetPushStarted)))) vector bps linear
outgoingDataRate outgoing datarate throughput(localSignal(packetPulled)) vector bps linear
outgoingPacketLengths outgoing packet lengths packetLength(localSignal(packetPulled)) sum, histogram, vector b none
droppedPacketLengthsQueueOverflow dropped packet lengths: queue overflow packetLength(packetDropReasonIsQueueOverflow(localSignal(packetDropped))) sum, vector b none
flowOutgoingDataRate flow specific outgoing data rate throughput(flowPacketLength(demuxFlow(localSignal(packetPulled)))) vector bps linear
incomingPackets incoming packets localSignal(packetPushStarted) count pk
outgoingPackets outgoing packets localSignal(packetPulled) count pk

Direct method calls (observed)

call tofunctioninfo

Called methods (observed)

functioninfocall from

Region Tagging operations (observed)


Source code

// This module implements a priority queue with multiple inner queues and an
// optional shared memory buffer.
module PriorityQueue extends CompoundPacketQueueBase
        int numQueues;
        buffer: <default("")> like IPacketBuffer if typename != "" {
        classifier: <default("PacketClassifier")> like IPacketClassifier {
        queue[numQueues]: <default("PacketQueue")> like IPacketQueue {
                bufferModule = default(exists(parent.buffer) ? "^.buffer" : "");
        scheduler: <default("PriorityScheduler")> like IPacketScheduler {
        in --> { @display("m=w"); } -->;
        for i=0..sizeof(queue)-1 {
            classifier.out++ --> queue[i].in;
            queue[i].out -->;
        scheduler.out --> { @display("m=e"); } --> out;

File: src/inet/queueing/queue/PriorityQueue.ned