Simple Module ThresholdDropper

Package: inet.common.queue
File: src/inet/common/queue/ThresholdDropper.ned

C++ definition

This module selectively drops packets, based on the available buffer space of the queues attached to its output.

The componenent has n input and n output gates (specified by the numGates parameter). Packets arrived at the ith input gate are transmitted on the ith output gate, or dropped.

The module sums the buffer lengths of its outputs and if enqueuing a packet would exceed the configured capacities, then the packet will be dropped instead.

Be attaching a ThresholdDropper to the input of a FIFO queue, you can compose a DropTailQueue. Shared buffer space can be modeled by attaching more FIFO queues to the output.

ThresholdDropper

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Parameters:

Name Type Default value Description
numGates int 1

number of input and output gates

frameCapacity int -1

if positive, then limits the sum of frames in output queues

byteCapacity int -1

if positive, then limits the sum of bytes in the output queues

Properties:

Name Value Description
display i=block/downarrow

Gates:

Name Direction Size Description
in [ ] input numGates
out [ ] output numGates

Source code:

//
// This module selectively drops packets, based on the available
// buffer space of the queues attached to its output.
//
// The componenent has n input and n output gates (specified by
// the numGates parameter). Packets arrived at the ith input
// gate are transmitted on the ith output gate, or dropped.
//
// The module sums the buffer lengths of its outputs
// and if enqueuing a packet would exceed the configured
// capacities, then the packet will be dropped instead.
//
// Be attaching a ThresholdDropper to the input of a FIFO
// queue, you can compose a DropTailQueue. Shared buffer
// space can be modeled by attaching more FIFO queues
// to the output.
//
simple ThresholdDropper
{
    parameters:
        int numGates = default(1); // number of input and output gates
        int frameCapacity = default(-1); // if positive, then limits the sum of frames in output queues
        int byteCapacity = default(-1);  // if positive, then limits the sum of bytes in the output queues
        @display("i=block/downarrow");

    gates:
        input in[numGates];
        output out[numGates];
}