ResidenceTimeMeasurer

Package: inet.common

ResidenceTimeMeasurer

simple module

This module measures the residence time of packet data in network nodes. The measurement is done by tracking every bit individually using their unique identity. For each bit the measurement starts when the incoming enclosing packet reception ends (or starts) in the network node. Similarly, for each bit the measurement ends when the outgoing enclosing packet transmission starts (or ends) in the network node.

Inheritance diagram

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

Parameters

Name Type Default value Description
subscriptionModule string "^"

relative module path where subscription happens

measurementStartSignal string "receptionEnded"

subscribed signal for measurement start

measurementEndSignal string "transmissionStarted"

subscribed signal for measurement end

Properties

Name Value Description
display i=block/timer

Signals

Name Type Unit
packetStayed inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode
flowBitResidenceTimePerRegion flow bit residence time per region dropWeight(lengthWeightedValuePerRegion(residenceTimePerRegion(demuxFlow(packetStayed)))) vector?, histogram? s none
bitResidenceTimePerRegion bit residence time per region dropWeight(lengthWeightedValuePerRegion(residenceTimePerRegion(packetStayed))) vector?, histogram? s none
bitResidenceTime bit residence time weightTimes(lengthWeightedValuePerRegion(residenceTimePerRegion(packetStayed))) vector?, histogram? s none
flowMaxBitResidenceTimePerPacket flow maximum bit residence time per packet maxPerGroup(groupRegionsPerPacket(residenceTimePerRegion(demuxFlow(packetStayed)))) vector?, histogram? s none
flowBitResidenceTime flow bit residence time weightTimes(lengthWeightedValuePerRegion(residenceTimePerRegion(demuxFlow(packetStayed)))) vector?, histogram? s none
maxBitResidenceTimePerPacket maximum bit residence time per packet maxPerGroup(groupRegionsPerPacket(residenceTimePerRegion(packetStayed))) vector?, histogram? s none
meanBitResidenceTimePerPacket mean bit residence time per packet weightedMeanPerGroup(groupRegionsPerPacket(residenceTimePerRegion(packetStayed))) vector, histogram s none
flowMeanBitResidenceTimePerPacket flow mean bit residence time per packet weightedMeanPerGroup(groupRegionsPerPacket(residenceTimePerRegion(demuxFlow(packetStayed)))) vector, histogram s none

Called methods (observed)

functioninfocall from
inet::ResidenceTimeMeasurer::receiveSignalpacketCreatedActivePacketSource
inet::ResidenceTimeMeasurer::receiveSignalpacketDroppedPassivePacketSink
inet::ResidenceTimeMeasurer::receiveSignalreceptionEndedEthernetMac
inet::ResidenceTimeMeasurer::receiveSignaltransmissionStartedEthernetMac

Region Tagging operations (observed)

tagTypetagAction
FlowTagmapAllTags
ResidenceTimeTagaddTagsWhereAbsent, mapAllTags, mapAllTagsForUpdate, removeTagsWherePresent

Source code

//
// This module measures the residence time of packet data in network nodes. The
// measurement is done by tracking every bit individually using their unique
// identity. For each bit the measurement starts when the incoming enclosing
// packet reception ends (or starts) in the network node. Similarly, for each
// bit the measurement ends when the outgoing enclosing packet transmission
// starts (or ends) in the network node.
//
simple ResidenceTimeMeasurer like IMeasurer
{
    parameters:
        string subscriptionModule = default("^"); // relative module path where subscription happens
        string measurementStartSignal = default("receptionEnded"); // subscribed signal for measurement start
        string measurementEndSignal = default("transmissionStarted"); // subscribed signal for measurement end
        @display("i=block/timer");
        @signal[packetStayed](type=inet::Packet);
        // the statistics value is the maximum residence time for any bit in the outgoing packet
        @statistic[maxBitResidenceTimePerPacket](title="maximum bit residence time per packet"; source=maxPerGroup(groupRegionsPerPacket(residenceTimePerRegion(packetStayed))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistics value is the mean residence time for all bits in the outgoing packet
        @statistic[meanBitResidenceTimePerPacket](title="mean bit residence time per packet"; source=weightedMeanPerGroup(groupRegionsPerPacket(residenceTimePerRegion(packetStayed))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistics value (the same for all bits in the region) is the residence time of any bit in the region
        @statistic[bitResidenceTimePerRegion](title="bit residence time per region"; source=dropWeight(lengthWeightedValuePerRegion(residenceTimePerRegion(packetStayed))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistics value is the residence time for individual bits
        @statistic[bitResidenceTime](title="bit residence time"; source=weightTimes(lengthWeightedValuePerRegion(residenceTimePerRegion(packetStayed))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistics value is the flow specific maximum residence time for any bit in the outgoing packet
        @statistic[flowMaxBitResidenceTimePerPacket](title="flow maximum bit residence time per packet"; source=maxPerGroup(groupRegionsPerPacket(residenceTimePerRegion(demuxFlow(packetStayed)))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistics value is the flow specific mean residence time for all bits in the outgoing packet
        @statistic[flowMeanBitResidenceTimePerPacket](title="flow mean bit residence time per packet"; source=weightedMeanPerGroup(groupRegionsPerPacket(residenceTimePerRegion(demuxFlow(packetStayed)))); record=vector,histogram; unit=s; interpolationmode=none);
        // the statistics value (the same for all bits in the region) is the flow specific residence time of any bit in the region
        @statistic[flowBitResidenceTimePerRegion](title="flow bit residence time per region"; source=dropWeight(lengthWeightedValuePerRegion(residenceTimePerRegion(demuxFlow(packetStayed)))); record=vector?,histogram?; unit=s; interpolationmode=none);
        // the statistics value is the flow specific residence time for individual bits
        @statistic[flowBitResidenceTime](title="flow bit residence time"; source=weightTimes(lengthWeightedValuePerRegion(residenceTimePerRegion(demuxFlow(packetStayed)))); record=vector?,histogram?; unit=s; interpolationmode=none);
}
File: src/inet/common/ResidenceTimeMeasurer.ned