Ordinal-Based Dropper¶
This step demonstrates the OrdinalBasedDropper module. The module drops packets based on the ordinal number of incoming packets.
In this step, packets are produced periodically by an active packet source (ActivePacketSource). The packet source pushes packets into a dropper (OrdinalBasedDropper). Every second packet is dropped based on its ordinal number. Packets that are not dropped are consumed by a passive packet sink (PassivePacketSink).
network OrdinalBasedDropperTutorialStep
{
@display("bgb=600,200");
submodules:
producer: ActivePacketSource {
@display("p=100,100");
}
dropper: OrdinalBasedDropper {
@display("p=300,100");
}
consumer: PassivePacketSink {
@display("p=500,100");
}
connections:
producer.out --> dropper.in;
dropper.out --> consumer.in;
}
[Config OrdinalBasedDropper]
network = OrdinalBasedDropperTutorialStep
sim-time-limit = 10s
*.producer.packetLength = 1B
*.producer.productionInterval = 1s
*.dropper.dropsVector = "0; 2; 4; 6; 8; 10"