BurstReceiver¶
Package: simu5g.apps.burst
simple module BurstReceiver
Models an application that receives bursts of packets from a BurstSender application module. It binds to a specified UDP local port, logs the received packets, and records statistics such as packet delay.
Inheritance diagram¶
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
localPort |
int |
3000 |
The local UDP port to bind to |
Properties¶
Name |
Value |
Description |
|---|---|---|
display |
i=block/source |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
socketOut |
output |
||
socketIn |
input |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
burstPktDelay |
|||
burstRcvdPkt |
Statistics¶
Name |
Title |
Source |
Record |
Unit |
Interpolation Mode |
Description |
|---|---|---|---|---|---|---|
burstPktDelay |
Delay of received packets |
burstPktDelay |
mean,vector |
s |
||
burstRcvdPkt |
Received packet ID |
burstRcvdPkt |
vector |
Source code¶
//
// Models an application that receives bursts of packets from
// a ~BurstSender application module. It binds to a specified UDP local port,
// logs the received packets, and records statistics such as packet delay.
//
simple BurstReceiver like IApp
{
parameters:
int localPort = default(3000); // The local UDP port to bind to
@signal[burstRcvdPkt];
@statistic[burstRcvdPkt](title="Received packet ID"; unit=""; source="burstRcvdPkt"; record=vector);
@signal[burstPktDelay];
@statistic[burstPktDelay](title="Delay of received packets"; unit="s"; source="burstPktDelay"; record=mean,vector);
@display("i=block/source");
gates:
output socketOut;
input socketIn;
}