ExponentialRateMeter

Package: inet.queueing.meter

ExponentialRateMeter

simple module

C++ definition

Attaches a ~RateTag to each packet specifying the data rate and packet rate of the received stream of packets. The algorithm takes older packets into account with an exponentially decreasing weight.

<b>See also:</b> ~StatisticalRateLimiter

Inheritance diagram

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

Used in

Name Type Description
MeterTutorialStep network (no description)

Extends

Name Type Description
PacketMeterBase simple module

Base module for various packet meter modules. Derived modules must implement a single meterPacket() function which meters the flow of and attaches the required tags.

Parameters

Name Type Default value Description
displayStringTextFormat string "metered %p pk (%l)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

alpha double

Parameter in the range of (0, 1) for the exponential weight decrease

Properties

Name Value Description
class ExponentialRateMeter
display i=block/star

Gates

Name Direction Size Description
in input
out output

Signals

Name Type Unit Description
packetRate double
dataRate double

Statistics

Name Title Source Record Unit Interpolation Mode Description
packetRate packet rate vector pps linear
dataRate data rate vector bps linear

Source code

//
// Attaches a ~RateTag to each packet specifying the data rate and
// packet rate of the received stream of packets. The algorithm takes older
// packets into account with an exponentially decreasing weight.
//
// @see ~StatisticalRateLimiter
//
simple ExponentialRateMeter extends PacketMeterBase like IPacketMeter
{
    parameters:
        double alpha; // Parameter in the range of (0, 1) for the exponential weight decrease
        @class(ExponentialRateMeter);
        @signal[packetRate](type=double);
        @statistic[packetRate](title="packet rate"; record=vector; unit=pps; interpolationmode=linear);
        @signal[dataRate](type=double);
        @statistic[dataRate](title="data rate"; record=vector; unit=bps; interpolationmode=linear);
}
File: src/inet/queueing/meter/ExponentialRateMeter.ned