DropHeadQueue

Package: inet.queueing.queue

DropHeadQueue

simple module

This is a limited packet queue which drops packets at the head of the queue.

DropHeadQueue

Inheritance diagram

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

Extends

Name Type Description
PacketQueue simple module

This module implements a widely configurable packet queue, which is suitable among others, to be used in MAC protocols, traffic conditioning, and quality of services. This module can be used on its own, but it's also often supplemented by additional queueing components such as servers, classifiers, schedulers, multiplexers, etc. This kind of composition allows to form a larger module which can act as a packet queue with more complex behavior.

Parameters

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

determines display string text above the submodule

packetCapacity int 100

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 "inet::queueing::PacketAtCollectionBeginDropper"

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

comparatorClass string ""

determines the order of packets in the queue, insertion order by default; the parameter must be the name of a C++ class which implements the IPacketComparatorFunction C++ interface and is registered via Register_Class

bufferModule string ""

relative module path to the IPacketBuffer module used by this queue, implicit buffer by default

Properties

Name Value Description
display i=block/queue
class PacketQueue

Gates

Name Direction Size Description
in input
out output

Signals

Name Type Unit
packetRemoved inet::Packet
packetPushed inet::Packet
packetDropped inet::Packet
packetPopped inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
packetRemoved packets removed count, sum(packetBytes), vector(packetBytes) none
queueLength queue length count(packetPushed) - count(packetPopped) - count(packetRemoved) - count(packetDropped) max, timeavg, vector sample-hold
queueingTime queueing times queueingTime(packetPopped) histogram, vector s none
packetPushed packet pushed count, sum(packetBytes), vector(packetBytes) none
packetDropQueueOverflow packet drops: queue overflow packetDropReasonIsQueueOverflow(packetDropped) count, sum(packetBytes), vector(packetBytes) none
packetPopped packet popped count, sum(packetBytes), vector(packetBytes) none

Source code

//
// This is a limited packet queue which drops packets at the head of the queue.
//
simple DropHeadQueue extends PacketQueue
{
    parameters:
        packetCapacity = default(100);
        dropperClass = default("inet::queueing::PacketAtCollectionBeginDropper");
}
File: src/inet/queueing/queue/DropHeadQueue.ned