VoipSender

Package: simu5g.apps.voip

VoipSender

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.

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
destPort int 3000
destAddress string
packetSize int 40B
shapeTalk double 0.824s

Params for Weibull distribution

scaleTalk double 1.423s
shapeSil double 1.089s
scaleSil double 0.900s
isTalk bool true

Whether transmission starts with talk or silence

samplingTime double 0.02s
startTime double 0s
silences bool true
dscp int -1

If not -1, set the DSCP field of sent IP packets (encoded into TOS as dscp << 2)

tos int -1

If not -1, set the Type of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value

Properties

Name Value Description
display i=block/source

Gates

Name Direction Size Description
socketOut output
socketIn input

Signals

Name Type Unit Description
voipGeneratedThroughput

Statistics

Name Title Source Record Unit Interpolation Mode Description
voipGeneratedThroughput Throughput generated by the application voipGeneratedThroughput simu5g_rateavg, vector Bps

Source code

//
// 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;
}
File: src/simu5g/apps/voip/VoipSender.ned