ExponentialRateMeter¶
Package: inet.queueing.meter
simple module ExponentialRateMeter
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 also: StatisticalRateLimiter
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for various packet meter modules. Derived modules must implement a single |
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 |
|---|---|---|---|
dataRate |
double |
||
packetPulledIn |
|||
packetPulledOut |
|||
packetPushedIn |
|||
packetPushedOut |
|||
packetRate |
double |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
dataRate |
data rate |
vector |
bps |
linear |
||
flowIncomingDataRate |
flow specific incoming data rate |
throughput(demuxFlow(merge(packetPushedIn, packetPulledIn))) |
vector |
bps |
linear |
the statistical value is the flow specific data rate of the incoming packets |
flowIncomingPacketLengths |
flow specific incoming packet lengths |
packetLength(demuxFlow(merge(packetPushedIn, packetPulledIn))) |
sum,histogram,vector |
b |
none |
the statistical value is the flow specific length of the incoming packet |
flowOutgoingDataRate |
flow specific outgoing data rate |
throughput(demuxFlow(merge(packetPushedOut, packetPulledOut))) |
vector |
bps |
linear |
the statistical value is the flow specific data rate of the outgoing packets |
flowOutgoingPacketLengths |
flow specific outgoing packet lengths |
packetLength(demuxFlow(merge(packetPushedOut, packetPulledOut))) |
sum,histogram,vector |
b |
none |
the statistical value is the flow specific length of the outgoing packet |
incomingDataRate |
incoming data rate |
throughput(merge(packetPushedIn, packetPulledIn)) |
vector |
bps |
linear |
the statistical value is the data rate of the incoming packets |
incomingPacketLengths |
incoming packet lengths |
packetLength(merge(packetPushedIn, packetPulledIn)) |
sum,histogram,vector |
b |
none |
the statistical value is the length of the incoming packet |
incomingPackets |
incoming packets |
merge(packetPushedIn, packetPulledIn) |
count |
pk |
the statistical value is the incoming packet |
|
outgoingDataRate |
outgoing data rate |
throughput(merge(packetPushedOut, packetPulledOut)) |
vector |
bps |
linear |
the statistical value is the data rate of the outgoing packets |
outgoingPacketLengths |
outgoing packet lengths |
packetLength(merge(packetPushedOut, packetPulledOut)) |
sum,histogram,vector |
b |
none |
the statistical value is the length of the outgoing packet |
outgoingPackets |
outgoing packets |
merge(packetPushedOut, packetPulledOut) |
count |
pk |
the statistical value is the outgoing packet |
|
packetRate |
packet rate |
vector |
pps |
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);
}