Active Source - Passive Sink¶
This step demonstrates the ActivePacketSource and PassivePacketSink modules.
The active packet source has a configurable packet production interval; the passive packet
sink has a configurable consumption interval, which limits when packets can be pushed into
the module.
In this example network, packets are produced periodically by the active packet source (ActivePacketSource)
and pushed into the passive packet sink (PassivePacketSink).
network ProducerConsumerTutorialStep
{
@display("bgb=400,200");
submodules:
producer: ActivePacketSource {
@display("p=100,100");
}
consumer: PassivePacketSink {
@display("p=300,100");
}
connections:
producer.out --> consumer.in;
}
[Config ActiveSourcePassiveSink]
network = ProducerConsumerTutorialStep
sim-time-limit = 10s
*.producer.packetLength = 1B
*.producer.productionInterval = 1s