Delaying Packets¶
The PacketDelayer module delays packets for a configured amount of time.
In this example network, packets are produced periodically by an active packet source (ActivePacketSource). The produced packets are delayed (PacketDelayer) for a random amount of time. Finally, the packets are pushed into a passive packet sink (PassivePacketSink).
network DelayerTutorialStep
{
@display("bgb=600,200");
submodules:
producer: ActivePacketSource {
@display("p=100,100");
}
delayer: PacketDelayer {
@display("p=300,100");
}
consumer: PassivePacketSink {
@display("p=500,100");
}
connections allowunconnected:
producer.out --> delayer.in;
delayer.out --> consumer.in;
}
[Config Delayer]
network = DelayerTutorialStep
sim-time-limit = 10s
*.producer.packetLength = 1B
*.producer.productionInterval = 1s
*.delayer.delay = uniform(0s, 2s)