Table Of Contents
Table Of Contents

Weighted Round-Robin Classifier

The Weighted Round-Robin Classifier (WrrClassifier) module classifies packets to its outputs in a round-robin fashion, based on the configured weights of the outputs. For example, if the configured weights are [2,3], then first two packets are sent to output 0, the next three to output 1. If a component connected to an output is busy (the output is not pushable), the scheduler waits until it becomes available.

In this step, packets are produced periodically by an active packet source (ActivePacketSource). The single source is connected to a classifier (WrrClassifier), which is connected to three passive packet sinks (PassivePacketSink). The outputs of the classifier are configured to have the weights [1,3,2], thus the classifier forwards 1, 3 and 2 packet(s) to the three sinks in one round.

network WrrClassifierTutorialStep
        producer: ActivePacketSource {
        classifier: WrrClassifier {
        consumer1: PassivePacketSink {
        consumer2: PassivePacketSink {
        consumer3: PassivePacketSink {
    connections allowunconnected:
        producer.out -->;
        classifier.out++ -->;
        classifier.out++ -->;
        classifier.out++ -->;
[Config WrrClassifier]
network = WrrClassifierTutorialStep
sim-time-limit = 100s

*.producer.packetLength = 1B
*.producer.productionInterval = 1s
*.classifier.weights = "1 3 2"