PacketQueueBase

Package: inet.queueing.base

simple module PacketQueueBase

Base module for various packet queue modules which maintains a few statistics.

Available display string format directives:

  • %p - number of packets

  • %l - total length

  • %u - number of pushed packets

  • %o - number of pulled packets

  • %r - number of removed packets

  • %d - number of dropped packets

  • %n - name of the next pulled packet

See also: IPacketQueue

inet.queueing.base.PacketQueueBasePacketQueueBasesimple

Inheritance diagram

Known subclasses

Name

Type

Description

CompoundPacketQueueBase

compound module

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

PacketQueue

simple module

Implements a configurable packet queue, which is suitable for use in MAC protocols, traffic conditioning, and quality of services, among others. This is a passive component: packets are pushed into it on its input, and pulled from it on its output. 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.

Extends

Name

Type

Description

PacketProcessorBase

simple module

Base module for various packet processing modules which maintains a few statistics.

Parameters

Name

Type

Default value

Description

displayStringTextFormat

string

“contains {numPackets} pk ({totalLength})\npushed {numPushedPackets} pulled {numPulledPackets} dropped {numDroppedPackets}”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

Properties

Name

Value

Description

class

PacketProcessorBase

display

i=block/queue

Gates

Name

Direction

Size

Description

in

input

out

output

Source code

//
// Base module for various packet queue modules which maintains a few
// statistics.
//
// Available display string format directives:
// - %p - number of packets
// - %l - total length
// - %u - number of pushed packets
// - %o - number of pulled packets
// - %r - number of removed packets
// - %d - number of dropped packets
// - %n - name of the next pulled packet
//
// @see ~IPacketQueue
//
simple PacketQueueBase extends PacketProcessorBase
{
    parameters:
        displayStringTextFormat = default("contains {numPackets} pk ({totalLength})\npushed {numPushedPackets} pulled {numPulledPackets} dropped {numDroppedPackets}"); // Determines display string text above the submodule
        @display("i=block/queue");
    gates:
        input in @loose;
        output out @loose;
}

File: src/inet/queueing/base/PacketQueueBase.ned