Table Of Contents
Table Of Contents

Connecting a Passive Source to Multiple Active Sinks

The PacketDemultiplexer module connects to a passive packet source on its input and multiple active packet sinks on its outputs. When one of the collectors requests a packet from the demultiplexer, it pops a packet from the provider and forwards it to the collector.

In this example network, packets are collected at random intervals by several active packet sinks (ActivePacketSink). The packets are provided by a single passive packet source (PassivePacketSource). The source is connected to the sinks using a demultiplexer, which simply forwards packets.

network DemultiplexerTutorialStep
        int numCollectors;
        provider: PassivePacketSource {
        demultiplexer: PacketDemultiplexer {
        collector[numCollectors]: ActivePacketSink {
    connections allowunconnected:
        provider.out -->;
        for i=0..numCollectors-1 {
            demultiplexer.out++ --> collector[i].in;
[Config Demultiplexer]
network = DemultiplexerTutorialStep
sim-time-limit = 10s

*.provider.packetLength = 1B
*.numCollectors = 3
*.collector[*].collectionInterval = uniform(0s, 2s)