Table Of Contents
Table Of Contents

Passive Source - Active Sink

This step demonstrates the ActivePacketSink and PassivePacketSource modules. The active packet sink (ActivePacketSink) periodically pops packets from the passive packet source (PassivePacketSource).

The active packet sink module has a configurable collection interval. The passive packet source also has a configurable providing interval, which limits the times at which packets can be popped from the module.

network ProviderCollectorTutorialStep
{
    @display("bgb=400,200");
    submodules:
        provider: PassivePacketSource {
            @display("p=100,100");
        }
        collector: ActivePacketSink {
            @display("p=300,100");
        }
    connections:
        provider.out --> collector.in;
}
[Config PassiveSourceActiveSink]
network = ProviderCollectorTutorialStep
sim-time-limit = 10s

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