NED File src/simu5g/apps/burst/BurstSender.ned¶
Name |
Type |
Description |
|---|---|---|
simple 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. |
Source code¶
//
// Simu5G
//
// Copyright (C) 2012-2021 Giovanni Nardini, Giovanni Stea, Antonio Virdis et al. (University of Pisa)
// Copyright (C) 2022-2026 Giovanni Nardini, Giovanni Stea et al. (University of Pisa)
//
// This file is part of a software released under the license included in file
// "license.pdf". Please read LICENSE and README files before using it.
// The above files and the present reference are part of the software itself,
// and cannot be removed from it.
//
package simu5g.apps.burst;
import inet.applications.contract.IApp;
//
// 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;
}