Table Of Contents
Table Of Contents

Preventing a Queue from Becoming Empty

The QueueFiller module creates packets whenever a connected queue becomes empty. One use of this module is to generate continuous traffic on a network interface.

In this example network, an active packet sink (ActivePacketSink) periodically pops packets from a queue (PacketQueue). Whenever the queue becomes empty, a queue filler module (QueueFiller) pushes a packet into it.

network QueueFillerTutorialStep
        filler: QueueFiller {
            tokenGenerator.queueModule = "queue";
        queue: PacketQueue {
        collector: ActivePacketSink {
    connections allowunconnected:
        filler.out -->;
        queue.out -->;
[Config QueueFiller]
network = QueueFillerTutorialStep
sim-time-limit = 10s

*.filler.provider.packetLength = 1B
*.collector.collectionInterval = 1s