NED File src/simu5g/apps/cbr/CbrReceiver.ned¶
Name |
Type |
Description |
|---|---|---|
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. |
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.cbr;
import inet.applications.contract.IApp;
//
// 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;
}