BurstSender

Package: simu5g.apps.burst

BurstSender

simple module

This module models an application that sends bursts of packets to a BurstReceiver application. During each burst, the application sends a configurable number of packets at regular intervals. The time interval between bursts can also be configured.

Inheritance diagram

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

Parameters

Name Type Default value Description
localPort int -1

local port to bind the sender (-1 means any port)

destPort int 3000

destination port to which packets will be sent

destAddress string

destination address in string format

startTime double 0s

starting time of the first burst

burstSize int 10

number of packets to be sent in each burst

interBurstTime double 1s

time interval between consecutive bursts

packetSize int 40B

size of one packet, in bytes

intraBurstTime double 0.01s

time interval between packets within a burst

tos int -1

Type Of Service/Traffic Class for the sent packets (-1 means no specific TOS/Traffic Class is set)

Properties

Name Value Description
display i=block/source

Gates

Name Direction Size Description
socketOut output
socketIn input

Signals

Name Type Unit Description
burstSentPkt

Statistics

Name Title Source Record Unit Interpolation Mode Description
burstSentPkt Sent packet ID burstSentPkt vector

Source code

//
// This module models an application that sends bursts of packets to a ~BurstReceiver
// application. During each burst, the application sends a configurable number of
// packets at regular intervals. The time interval between bursts can also be configured.
//
simple BurstSender like IApp
{
    parameters:
        int localPort = default(-1);                        // local port to bind the sender (-1 means any port)
        int destPort = default(3000);                       // destination port to which packets will be sent
        string destAddress;                                 // destination address in string format
        double startTime @unit("s") = default(0s);          // starting time of the first burst

        int burstSize = default(10);                        // number of packets to be sent in each burst
        double interBurstTime @unit("s") = default(1s);     // time interval between consecutive bursts

        int packetSize @unit(B) = default(40B);             // size of one packet, in bytes
        double intraBurstTime @unit("s") = default(0.01s);  // time interval between packets within a burst

        int tos = default(-1);                              // Type Of Service/Traffic Class for the sent packets (-1 means no specific TOS/Traffic Class is set)

        @signal[burstSentPkt];
        @statistic[burstSentPkt](title="Sent packet ID"; unit=""; source="burstSentPkt"; record=vector);

        @display("i=block/source");
    gates:
        output socketOut;
        input socketIn;
}
File: src/apps/burst/BurstSender.ned