PacketDelayer

Package: inet.queueing.common

simple module PacketDelayer

Connects one packet producer to one packet consumer. It can be pushed with packets from the connected packet producer. When this happens, the packet is delayed and eventually pushed to the output. Note that the order of packets may change if the delay parameter is configured to be a distribution.

inet.queueing.common.PacketDelayerPacketDelayersimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

ProcessingDelayLayer

compound module

(no description)

Extends

Name

Type

Description

PacketDelayerBase

simple module

Base module for packet delayer implementations. Provides common functionality for delaying packets for a specified amount of time before forwarding them. Supports clock synchronization, scheduling priorities, and zero-delay handling. Adds delay-related tags to packets for tracking and analysis.

Parameters

Name

Type

Default value

Description

displayStringTextFormat

string

“processed {numProcessedPackets} pk ({processedTotalLength})”

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

clockModule

string

“”

Relative path of a module that implements IClock(1,:ref:2 <neddoc-msg-inet-iclock>); optional

schedulingPriority

int

0

scheduleZeroDelay

bool

true

delay

double

Specifies delay per packet

bitrate

double

inf bps

Determines additional delay per bit

Properties

Name

Value

Description

class

PacketDelayer

display

i=block/delay

Gates

Name

Direction

Size

Description

in

input

out

output

Source code

//
// Connects one packet producer to one packet consumer. It can be
// pushed with packets from the connected packet producer. When this happens,
// the packet is delayed and eventually pushed to the output. Note that the
// order of packets may change if the delay parameter is configured to be a
// distribution.
//
simple PacketDelayer extends PacketDelayerBase like IPacketDelayer
{
    parameters:
        volatile double delay @unit(s); // Specifies delay per packet
        volatile double bitrate @unit(bps) = default(inf bps); // Determines additional delay per bit
        @class(PacketDelayer);
}

File: src/inet/queueing/common/PacketDelayer.ned