CbrSender.ned
NED File src/simu5g/apps/cbr/CbrSender.ned
| Name | Type | Description |
|---|---|---|
| CbrSender | simple module |
Simple module for generating Constant Bit Rate (CBR) traffic. This module periodically sends packets of a specified size to a designated address and port. The intervals between packets and the overall duration of the communication are configurable. The module emits statistics related to the generated throughput and the total amount of bytes sent. |
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; // // Simple module for generating Constant Bit Rate (CBR) traffic. This module // periodically sends packets of a specified size to a designated address // and port. The intervals between packets and the overall duration of the // communication are configurable. The module emits statistics related to // the generated throughput and the total amount of bytes sent. // simple CbrSender like IApp { parameters: int localPort = default(-1); int destPort = default(3000); string destAddress; int packetSize @unit(B) = default(40B); double samplingTime @unit("s") = default(0.02s); double startTime @unit("s") = default(0s); double finishTime @unit("s") = default(0s); int tos = default(-1); // If not -1, set the Type of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value @signal[cbrGeneratedThroughput]; @statistic[cbrGeneratedThroughput](title="Throughput generated by the application"; unit="Bps"; source="cbrGeneratedThroughput"; record=simu5g_rateavg,vector); @signal[cbrGeneratedBytes]; @statistic[cbrGeneratedBytes](title="Bytes generated by the application"; unit="Bps"; source="cbrGeneratedBytes"; record=mean,last(sumPerDuration)); @signal[cbrSentPkt]; @statistic[cbrSentPkt](title="Sent packet ID"; unit=""; source="cbrSentPkt"; record=vector); @display("i=block/source"); gates: output socketOut; input socketIn; }