OrdinalBasedDuplicator

Package: inet.queueing.common

OrdinalBasedDuplicator

simple module

This module duplicates packets based on the ordinal number of the packet in the received stream of packets.

Inheritance diagram

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

Extends

Name Type Description
PacketDuplicatorBase simple module (no description)

Parameters

Name Type Default value Description
displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

duplicatesVector string ""

the duplicatesVector format is "<packetNumber>;<packetNumber>;...;" packet numbers in ascending order e.g. "5;6;12;13;"

Properties

Name Value Description
display i=block/control
class OrdinalBasedDuplicator

Gates

Name Direction Size Description
in input
out output

Direct method calls (observed)

call tofunctioninfo
PassivePacketSinkinet::queueing::PassivePacketSink::pushPacketpushPacket
ActivePacketSourceinet::queueing::ActivePacketSource::handleCanPushPacketChangedhandleCanPushPacketChanged

Called methods (observed)

functioninfocall from
inet::queueing::OrdinalBasedDuplicator::handleCanPushPacketChangedhandleCanPushPacketChangedPassivePacketSink
inet::queueing::OrdinalBasedDuplicator::pushPacketpushPacketActivePacketSource

Pushed in messages (observed)

gatemsgkindctrlsrcModuletags
inPacket0ActivePacketSourceDirectionTag, PacketProtocolTag

Push out messages (observed)

gatemsgkindctrldestModuletags
outPacket0PassivePacketSinkDirectionTag, PacketProtocolTag

Source code

//
// This module duplicates packets based on the ordinal number of the packet in
// the received stream of packets.
//
simple OrdinalBasedDuplicator extends PacketDuplicatorBase
{
    parameters:
        string duplicatesVector = default(""); // the duplicatesVector format is "<packetNumber>;<packetNumber>;...;"
                                               // packet numbers in ascending order e.g. "5;6;12;13;"
        @display("i=block/control");
        @class(OrdinalBasedDuplicator);
    gates:
        input in;
        output out;
}

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