SlidingWindowRateMeter
Package: inet.queueing.meter
SlidingWindowRateMeter
simple moduleAttaches a ~RateTag to each packet specifying the data rate and packet rate of the received stream of packets. The algorithm takes packets into account only in the given time window.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
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 |
| timeWindow | double |
Amount of time to look back from the current simulation time |
Properties
| Name | Value | Description |
|---|---|---|
| class | SlidingWindowRateMeter | |
| 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 packets // into account only in the given time window. // simple SlidingWindowRateMeter extends PacketMeterBase like IPacketMeter { parameters: double timeWindow @unit(s); // Amount of time to look back from the current simulation time @class(SlidingWindowRateMeter); @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/SlidingWindowRateMeter.ned