Table Of Contents
Table Of Contents

Blocking/Unblocking Packet Flow (Active Sink)

This step is similar to the previous one, but with an active packet sink and passive packet source. Packets are collected periodically by an active packet sink (ActivePacketSink). The packets pass through a packet gate if it is open, otherwise packets are not generated. The packets are provided by a passive packet source (PassivePacketSource).

network Gate2TutorialStep
        provider: PassivePacketSource {
        gate: PacketGate {
        collector: ActivePacketSink {
        provider.out -->;
        gate.out -->;
[Config Gate2]
network = Gate2TutorialStep
sim-time-limit = 10s

*.provider.packetLength = 1B
*.collector.collectionInterval = 1s
*.gate.openTime = 3s
*.gate.closeTime = 7s