NED File src/simu5g/apps/voip/VoipSender.ned¶
Name |
Type |
Description |
|---|---|---|
simple module |
Represents a model for the sender of Voice-over-IP (VoIP) traffic. It generates packets by alternating “talk spurts” and “silence” periods, with their respective durations modeled by a Weibull distribution. During talk spurts, fixed-size packets are generated periodically and sent over UDP to a specified destination address and port. |
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.voip;
import inet.applications.contract.IApp;
//
// Represents a model for the sender of Voice-over-IP (VoIP) traffic.
// It generates packets by alternating "talk spurts" and "silence" periods, with their respective
// durations modeled by a Weibull distribution. During talk spurts, fixed-size packets are
// generated periodically and sent over UDP to a specified destination address and port.
//
simple VoipSender like IApp
{
parameters:
int localPort = default(-1);
int destPort = default(3000);
string destAddress;
int packetSize @unit(B) = default(40B);
double shapeTalk @unit(s) = default(0.824s); // Params for Weibull distribution
double scaleTalk @unit(s) = default(1.423s);
double shapeSil @unit(s) = default(1.089s);
double scaleSil @unit(s) = default(0.900s);
bool isTalk = default(true); // Whether transmission starts with talk or silence
double samplingTime @unit("s") = default(0.02s);
double startTime @unit("s") = default(0s);
bool silences = default(true);
int dscp = default(-1); // If not -1, set the DSCP field of sent IP packets (encoded into TOS as dscp << 2)
int tos = default(-1); // If not -1, set the Type of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value
@signal[voipGeneratedThroughput];
@statistic[voipGeneratedThroughput](title="Throughput generated by the application"; unit="Bps"; source="voipGeneratedThroughput"; record=simu5g_rateavg,vector);
@display("i=block/source");
gates:
output socketOut;
input socketIn;
}