Simple Module BGTrafficSourceApp

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

C++ definition

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

See also: ~TrafficSourceAppBase, ~TTTrafficSourceApp, ~RCTrafficSourceApp

Author: Till Steinbach

BGTrafficSourceApp

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

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

Known subclasses:

Name Type Description
BGBurstTrafficSourceApp simple module

Background burst traffic source application. Uses multiple EtherFrame with encapsulated cPacket as payload to generate bursts This generator generates bursts with sendInterval distance

IEEE8021QTrafficSourceApp simple module

Traffic source application used for IEEE 802.1Q traffic.

Parameters:

Name Type Default value Description
displayName string ""

Name shown above the module

buffers string "bgOut"

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

destAddress string "auto"

destination MAC address

sendInterval double uniform(0s,1s)

interval between sending requests

Properties:

Name Value Description
class BGTrafficSourceApp
display i=block/source,green

Gates:

Name Direction Size Description
schedulerIn input

Input gate for the incoming Scheduler messages

Signals:

Name Type Unit
intervalSignal

Statistics:

Name Title Source Record Unit Interpolation Mode
sendIntervalOverTime send interval over time intervalSignal stats?, histogram?, vector? s linear

Source code:

//
// Background traffic source application.
// Uses EtherFrame with encapsulated cPacket as payload
// This generator generates frames with sendInterval distance
//
// @see ~TrafficSourceAppBase, ~TTTrafficSourceApp, ~RCTrafficSourceApp
//
// @author Till Steinbach
//
simple BGTrafficSourceApp extends TrafficSourceAppBase
{
    parameters:
        @class(BGTrafficSourceApp);
        @display("i=block/source,green");

        // destination MAC address
        string destAddress = default("auto");
        // interval between sending requests
        volatile double sendInterval @unit(s) = default(uniform(0s,1s));

        //Default bgOut is best-effort buffer
        buffers = default("bgOut");

        @signal[intervalSignal];
        @statistic[sendIntervalOverTime](title="send interval over time"; source=intervalSignal; unit=s; record=stats?,histogram?,vector?; interpolationmode=linear);
}