CbrReceiver

Package: simu5g.apps.cbr

simple module CbrReceiver

Receives Constant Bit Rate (CBR) traffic sent by a CbrSender application module. It binds to a specified local port and records statistics such as packet delay, jitter, packet loss, throughput, and the total amount of bytes received.

simu5g.apps.cbr.CbrReceiverCbrReceiversimple

Inheritance diagram

Parameters

Name

Type

Default value

Description

localPort

int

3000

Properties

Name

Value

Description

display

i=block/source

Gates

Name

Direction

Size

Description

socketOut

output

socketIn

input

Signals

Name

Type

Unit

Description

cbrFrameDelay

simtime_t

cbrFrameLoss

double

cbrJitter

simtime_t

cbrRcvdPkt

long

cbrReceivedBytes

long

Size of each received packet

cbrReceivedThroughput

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

cbrFrameDelay

Cbr Frame Delay

cbrFrameDelay

mean,vector

s

cbrFrameLoss

Cbr Frame Loss

cbrFrameLoss

mean

ratio

cbrJitter

Cbr Playout Loss

cbrJitter

mean,vector

s

cbrRcvdPkt

Received packet ID

cbrRcvdPkt

vector

cbrReceivedBytes

Packet length received at the application level

cbrReceivedBytes

mean,vector,sum

B

cbrReceivedThroughput

Throughput received at the application level

cbrReceivedThroughput

simu5g_rateavg

Bps

Source code

//
// Receives Constant Bit Rate (CBR) traffic sent by a ~CbrSender
// application module. It binds to a specified local port and records
// statistics such as packet delay, jitter, packet loss, throughput, and the
// total amount of bytes received.
//
simple CbrReceiver like IApp
{
    parameters:
        int localPort = default(3000);

        @signal[cbrFrameDelay](type="simtime_t");
        @signal[cbrJitter](type="simtime_t");
        @signal[cbrFrameLoss](type="double");
        @signal[cbrReceivedThroughput];
        @signal[cbrReceivedBytes](type=long); // Size of each received packet
        @signal[cbrRcvdPkt](type=long);
        @statistic[cbrFrameDelay](title="Cbr Frame Delay"; unit="s"; source="cbrFrameDelay"; record=mean,vector);
        @statistic[cbrJitter](title="Cbr Playout Loss"; unit="s"; source="cbrJitter"; record=mean,vector);
        @statistic[cbrFrameLoss](title="Cbr Frame Loss"; unit="ratio"; source="cbrFrameLoss"; record=mean);
        @statistic[cbrReceivedThroughput](title="Throughput received at the application level"; unit="Bps"; source="cbrReceivedThroughput"; record=simu5g_rateavg);
        @statistic[cbrReceivedBytes](title="Packet length received at the application level"; unit="B"; source="cbrReceivedBytes"; record=mean,vector,sum);
        @statistic[cbrRcvdPkt](title="Received packet ID"; unit=""; source="cbrRcvdPkt"; record=vector);
        @display("i=block/source");

    gates:
        output socketOut;
        input socketIn;
}

File: src/simu5g/apps/cbr/CbrReceiver.ned