AlertReceiver

Package: simu5g.apps.alert

simple module AlertReceiver

Receives alert messages sent by nodes running an AlertSender application. It listens for incoming packets and logs their arrival. It records end-to-end delay statistics. The module also supports multicast by joining local multicast groups.

simu5g.apps.alert.AlertReceiverAlertReceiversimple

Inheritance diagram

Parameters

Name

Type

Default value

Description

localPort

int

3000

interfaceTableModule

string

multicastInterface

string

“cellular”

If not empty, set the multicast output interface option on the socket (interface name expected)

Properties

Name

Value

Description

display

i=block/source

Gates

Name

Direction

Size

Description

socketOut

output

socketIn

input

Signals

Name

Type

Unit

Description

alertDelay

alertRcvdMsg

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

alertDelay

Alert Message Delay

alertDelay

mean,vector

s

alertRcvdMsg

Alert Messages Received

alertRcvdMsg

sum,vector

s

Source code

//
// Receives alert messages sent by nodes running an ~AlertSender
// application. It listens for incoming packets and logs their arrival.
// It records end-to-end delay statistics. The module also supports multicast by
// joining local multicast groups.
//
simple AlertReceiver like IApp
{
    parameters:
        int localPort = default(3000);
        string interfaceTableModule;
        string multicastInterface = default("cellular");  // If not empty, set the multicast output interface option on the socket (interface name expected)
        @signal[alertDelay];
        @statistic[alertDelay](title="Alert Message Delay"; unit="s"; source="alertDelay"; record=mean,vector);
        @signal[alertRcvdMsg];
        @statistic[alertRcvdMsg](title="Alert Messages Received"; unit="s"; source="alertRcvdMsg"; record=sum,vector);
        @display("i=block/source");
    gates:
        output socketOut;
        input socketIn;
}

File: src/simu5g/apps/alert/AlertReceiver.ned