Table Of Contents
Table Of Contents

Priority Classifier

The PriorityClassifier module pushes packets to the first non-full connected queue.

In this step, packets are produced periodically by an active packet source (ActivePacketSource). The packet source is connected to a priority classifier (PriorityClassifier), which connects to two queues (PacketQueue). The queues are configured to have capacity for storing one packet. The queues are connected to two active packet sinks (ActivePacketSink). The classifier sends packets to the queues, favoring queue1. It will only consider queue2 when queue1 is full. The packets are popped from the queues by two active packet sinks (ActivePacketSink).

network PriorityClassifierTutorialStep
        producer: ActivePacketSource {
        classifier: PriorityClassifier {
        queue1: PacketQueue {
        queue2: PacketQueue {
        collector1: ActivePacketSink {
        collector2: ActivePacketSink {
    connections allowunconnected:
        producer.out -->;
        classifier.out++ -->;
        classifier.out++ -->;
        queue1.out -->;
        queue2.out -->;
[Config PriorityClassifier]
network = PriorityClassifierTutorialStep
sim-time-limit = 10s

*.queue*.packetCapacity = 1
*.producer.packetLength = 1B
*.producer.productionInterval = uniform(0s, 1s)
*.collector*.collectionInterval = uniform(0s, 2s)