QueueingPacketDelayer

Package: inet.queueing.common

QueueingPacketDelayer

compound module

Compound module that delays packets for a specified amount of time while preserving their order. Implements the IPacketDelayer interface using a queue and server architecture. The queue stores packets while they wait, and the server processes each packet with a processing time equal to the configured delay. Note that the actual packet delay will be the sum of the queueing time and the configured delay. Unlike the simple PacketDelayer module, this implementation always maintains packet order regardless of delay distribution.

queue : like IPacketQueue

PacketQueue: Implements a configurable packet queue, which is suitable for use in MAC protocols, traffic...

IPacketQueue: Interface for packet queue modules.

Source:
queue: <default("PacketQueue")> like IPacketQueue {
    parameters:
        @display("p=150,100");
} server : like IPacketServer

PacketServer: Repeatedly pulls packets from the connected packet provider and after a processing delay, it pushes...

IPacketServer: Interface for packet server modules.

Source:
server: <default("PacketServer")> like IPacketServer {
    parameters:
        processingTime = default(parent.delay);
        @display("p=350,100");
}

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.

Parameters

Name Type Default value Description
clockModule string ""

Relative path of a module that implements IClock(1,2); optional

delay double

Properties

Name Value Description
display i=block/delay

Gates

Name Direction Size Description
in input
out output

Source code

//
// Compound module that delays packets for a specified amount of time while
// preserving their order. Implements the IPacketDelayer interface using a queue
// and server architecture. The queue stores packets while they wait, and the
// server processes each packet with a processing time equal to the configured
// delay. Note that the actual packet delay will be the sum of the queueing time
// and the configured delay. Unlike the simple PacketDelayer module, this 
// implementation always maintains packet order regardless of delay distribution.
//
module QueueingPacketDelayer like IPacketDelayer
{
    parameters:
        string clockModule = default(""); // Relative path of a module that implements IClock; optional
        volatile double delay @unit(s);
        *.clockModule = default(absPath(this.clockModule));
        @display("i=block/delay");
    gates:
        input in @labels(push);
        output out @labels(push);
    submodules:
        queue: <default("PacketQueue")> like IPacketQueue {
            parameters:
                @display("p=150,100");
        }
        server: <default("PacketServer")> like IPacketServer {
            parameters:
                processingTime = default(parent.delay);
                @display("p=350,100");
        }
    connections:
        in --> { @display("m=w"); } --> queue.in;
        queue.out --> server.in;
        server.out --> { @display("m=e"); } --> out;
}

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