Simple Module TrafficSourceAppBase

Package: core4inet.applications.trafficsource.base
File: src/core4inet/applications/trafficsource/base/TrafficSourceAppBase.ned

C++ definition

Abstract base traffic source application used for various traffic generators. Uses CTFrame with encapsulated cPacket as payload Since this is an abstract module please do not instantiate it

See also: ~ApplicationBase, ~TTTrafficSourceApp, ~RCTrafficSourceApp

Author: Till Steinbach

TrafficSourceAppBase

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
AVBTrafficSourceApp simple module

Traffic source application used for audio-video bridging traffic generators.

BGTrafficSourceApp simple module

Background traffic source application. Uses EtherFrame with encapsulated cPacket as payload This generator generates frames with sendInterval distance

CTTrafficSourceAppBase simple module

Abstract base traffic source application used for various traffic generators. Uses CTFrame with encapsulated cPacket as payload

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

enabled bool true

Trafficsource enabled or disabled

startTime double 0s

Start time

payload int 46Byte

Size of the payload of the message (size of encapsulated cPacket) that is being generated

Properties:

Name Value Description
class AbstractSimpleModule
display i=block/source

Gates:

Name Direction Size Description
schedulerIn input

Input gate for the incoming Scheduler messages

Signals:

Name Type Unit
payloadSignal

Statistics:

Name Title Source Record Unit Interpolation Mode
payloadOverTime payload over time payloadSignal stats?, histogram?, vector? B linear

Source code:

//
// Abstract base traffic source application used for various traffic generators.
// Uses CTFrame with encapsulated cPacket as payload
// Since this is an abstract module please do not instantiate it
//
// @see ~ApplicationBase, ~TTTrafficSourceApp, ~RCTrafficSourceApp
//
// @author Till Steinbach
//
simple TrafficSourceAppBase extends ApplicationBase
{
    parameters:
        @class(AbstractSimpleModule);
        @display("i=block/source");

        // Trafficsource enabled or disabled
        bool enabled = default(true);
        // Start time
        double startTime @unit(s) = default(0s);
        //Size of the payload of the message (size of encapsulated cPacket) that is being generated
        volatile int payload @unit(Byte) = default(46Byte);

        @signal[payloadSignal];
        @statistic[payloadOverTime](title="payload over time"; source=payloadSignal; unit=B; record=stats?,histogram?,vector?; interpolationmode=linear);
}