CbrReceiver

Package: simu5g.apps.cbr

CbrReceiver

simple module

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.

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 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
cbrJitter simtime_t
cbrFrameLoss double
cbrReceivedThroughput
cbrReceivedBytes long

Size of each received packet

cbrRcvdPkt long

Statistics

Name Title Source Record Unit Interpolation Mode Description
cbrFrameDelay Cbr Frame Delay cbrFrameDelay mean, vector s
cbrJitter Cbr Playout Loss cbrJitter mean, vector s
cbrFrameLoss Cbr Frame Loss cbrFrameLoss mean ratio
cbrReceivedThroughput Throughput received at the application level cbrReceivedThroughput simu5g_rateavg Bps
cbrReceivedBytes Packet length received at the application level cbrReceivedBytes mean, vector, sum B
cbrRcvdPkt Received packet ID cbrRcvdPkt vector

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