SlidingWindowRateMeter

Package: inet.queueing.meter

simple module SlidingWindowRateMeter

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.

inet.queueing.meter.SlidingWindowRateMeterSlidingWindowRateMetersimple

Inheritance 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

dataRate

double

packetPulledIn

inet::Packet

packetPulledOut

inet::Packet

packetPushedIn

inet::Packet

packetPushedOut

inet::Packet

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 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