OrdinalBasedDuplicator¶
Package: inet.queueing.common
simple module OrdinalBasedDuplicator
Duplicates packets based on the ordinal number of the packet in the received stream of packets.
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base type for packet duplicator implementations. Provides common functionality for creating and forwarding multiple copies of incoming packets. |
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 |
duplicatesVector |
string |
“” |
The duplicatesVector format is “<packetNumber>;<packetNumber>;…;” |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
OrdinalBasedDuplicator |
|
display |
i=block/control |
Packet numbers in ascending order, e.g. “5;6;12;13;” |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
in |
input |
||
out |
output |
Source code¶
//
// 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;
}