Simple Module TrafficSinkApp

Package: core4inet.applications.trafficsink.base
File: src/core4inet/applications/trafficsink/base/TrafficSinkApp.ned

C++ definition

Traffic sink application used for statistics collection.

See also: ~ApplicationBase

Author: Till Steinbach

TrafficSinkApp

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Extends:

Name Type Description
ApplicationBase simple module

Abstract base application used for Ethernet-Application application models.

Known subclasses:

Name Type Description
AVBTrafficSinkApp simple module

Traffic sink application used for statistics collection of AVB traffic.

BGTrafficSinkApp simple module

Traffic sink application used for statistics collection of best-effort traffic.

CTTrafficSinkApp simple module

Traffic sink application used for statistics collection of critical traffic.

Parameters:

Name Type Default value Description
displayName string ""

Name shown above the module

buffers string ""

Comma seperated list of buffer modules the application is allowed to use

buffers_manual bool false

If true, buffer management is not used. Applications use their own methods to locate buffers

Properties:

Name Value Description
class TrafficSinkApp
display i=block/sink

Gates:

Name Direction Size Description
schedulerIn input

Input gate for the incoming Scheduler messages

Signals:

Name Type Unit
rxPk inet::EtherFrame

Statistics:

Name Title Source Record Unit Interpolation Mode
rxLatency End-to-end latency messageAge(rxPk) stats, histogram?, vector s none
rxBytes Received Bytes rxPk sum(packetBytes), vector(packetBytes), histogram(packetBytes)?, floatingIntervalSumVector(packetBytes)? B none
rxPk Received Packets rxPk count packets
rxLatencyInner End-to-end latency inner messageAge(innerMessage(rxPk)) stats, histogram?, vector s none

Source code:

//
// Traffic sink application used for statistics collection.
//
// @see ~ApplicationBase
//
// @author Till Steinbach
//
simple TrafficSinkApp extends ApplicationBase
{
    parameters:
        @class(TrafficSinkApp);
        @display("i=block/sink");

        //Signal emitted when a frame is received, contains received EtherFrame
        @signal[rxPk](type=inet::EtherFrame);
        //Statistic of the amount of packets that were received by the application
        @statistic[rxPk](title="Received Packets"; source=rxPk; record=count; unit=packets);
        //Statistic of the amount of bytes that were received by the application
        @statistic[rxBytes](title="Received Bytes"; source=rxPk; unit=B; record="sum(packetBytes)","vector(packetBytes)","histogram(packetBytes)?","floatingIntervalSumVector(packetBytes)?"; interpolationmode=none); //possible parameter e.g.: **.floatingintervalvectorrecorder-measure-interval = 20ms for floatingIntervalRecorders
        //End-to-end latency
        @statistic[rxLatency](title="End-to-end latency"; source="messageAge(rxPk)"; unit=s; record=stats,histogram?,vector; interpolationmode=none);
        //Uses encapsulated packet | Frame when nothing is encapsulated
        @statistic[rxLatencyInner](title="End-to-end latency inner"; source="messageAge(innerMessage(rxPk))"; unit=s; record=stats,histogram?,vector; interpolationmode=none);
}