Package: inet.common.queue
ThresholdDropper
simple moduleThis 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.
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]; }File: src/inet/common/queue/ThresholdDropper.ned