WRRScheduler

Package: inet.common.queue

WRRScheduler

simple module

This module implements weighted round-robin scheduling.

There is a weight associated with each input gate. Initially each input gate gets as many tokens as their weight. When a packet is requested then the first input gate is selected that has a packet and enough tokens, and one token is consumed. When there are waiting input packets, but there is no enough tokens to schedule one, then each token bucket is filled up.

This module implements the IPassiveQueue C++ interface, therefore it can be used as the queue component of a NIC, and as the input of another scheduler.

Used in compound modules

Name Type Description
DiffservQueue compound module

This is an example queue, that can be used in interfaces of DS core and edge nodes to support the AFxy (RFC 2597) and EF (RFC 3246) PHBs.

Parameters

Name Type Default value Description
weights string

Properties

Name Value Description
display i=block/server

Gates

Name Direction Size Description
in [ ] input
out output

Source code

//
// This module implements weighted round-robin scheduling.
//
// There is a weight associated with each input gate.
// Initially each input gate gets as many tokens as their
// weight. When a packet is requested then the first input
// gate is selected that has a packet and enough tokens,
// and one token is consumed. When there are waiting input
// packets, but there is no enough tokens to schedule one,
// then each token bucket is filled up.
//
// This module implements the IPassiveQueue C++ interface,
// therefore it can be used as the queue component of a NIC,
// and as the input of another scheduler.
//
simple WRRScheduler
{
    parameters:
        string weights;
        @display("i=block/server");

    gates:
        input in[];
        output out;
}
File: src/inet/common/queue/WRRScheduler.ned