MultihopD2D

Package: simu5g.apps.d2dMultihop

simple module MultihopD2D

Disseminates event notifications using multihop D2D transmissions. New messages are generated upon the reception of external events, signaled by the EventGenerator module. The application sends the message to an IP multicast address, which is then mapped to D2D multicast transmission mode within the LTE/NR protocol stack. When the application receives a message, it can relay it to the same IP multicast address in order to extend the coverage of the D2D transmission. To avoid flooding, two mechanisms can be used:

  • specifying a time-to-live (TTL) for the message, which decreases every time the message is relayed by a UE;

  • specifying a target broadcast radius for the message: a UE relays the message only if it is located within a configurable distance from the originator.

Moreover, if the Trickle suppression mechanism is enabled, the application avoids relaying a message when more than ‘k’ duplicates have already been received.

Every message originated by a node is associated with a *target area*, i.e., the set of nodes that should receive the notification. This is used for gathering statistics about the dissemination of the message.

Reference: G. Nardini, G. Stea, A. Virdis, “A fast and reliable broadcast service for LTE-Advanced exploiting multihop device-to-device transmissions”, Future Internet, 2017, 9(4), 89

simu5g.apps.d2dMultihop.MultihopD2DMultihopD2Dsimple

Inheritance diagram

Parameters

Name

Type

Default value

Description

localPort

int

3000

destPort

int

3000

destAddress

string

“0.0.0.0”

interfaceName

string

“cellular”

msgSize

int

40B

maxBroadcastRadius

double

-1m

ttl

int

3

maxTransmissionDelay

double

0.01s

selfishProbability

double

0.0

Probability that the app does not relay the received message

eventGeneratorModule

string

“eventGenerator”

multihopD2DStatisticsModule

string

“d2dMultihopStatistics”

trickle

bool

false

I

double

0.01s

k

int

3

interfaceTableModule

string

absPath(“.interfaceTable”)

lteMacModule

string

“^.cellularNic.mac”

ltePhyModule

string

“^.cellularNic.phy”

tos

int

-1

If not -1, set the Type of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value

Properties

Name

Value

Description

display

i=block/source

Gates

Name

Direction

Size

Description

socketOut

output

socketIn

input

Signals

Name

Type

Unit

Description

d2dMultihopGeneratedMsg

d2dMultihopRcvdDupMsg

d2dMultihopRcvdMsg

d2dMultihopSentMsg

d2dMultihopTrickleSuppressedMsg

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

d2dMultihopGeneratedMsg

Number of locally generated packets

d2dMultihopGeneratedMsg

sum,vector

d2dMultihopRcvdDupMsg

Number of received duplicate packets

d2dMultihopRcvdDupMsg

sum,vector

d2dMultihopRcvdMsg

Number of received packets

d2dMultihopRcvdMsg

sum,vector

d2dMultihopSentMsg

Number of sent/relayed packets

d2dMultihopSentMsg

sum,vector

d2dMultihopTrickleSuppressedMsg

Number of suppressed packets by the Trickle suppression mechanism

d2dMultihopTrickleSuppressedMsg

sum,vector

Source code

//
// Disseminates event notifications using multihop D2D transmissions.
// New messages are generated upon the reception
// of external events, signaled by the ~EventGenerator module. The application
// sends the message to an IP multicast address, which is then mapped to D2D
// multicast transmission mode within the LTE/NR protocol stack. When the application
// receives a message, it can relay it to the same IP multicast address in order
// to extend the coverage of the D2D transmission.
// To avoid flooding, two mechanisms can be used:
// - specifying a time-to-live (TTL) for the message, which decreases every time
//   the message is relayed by a UE;
// - specifying a target broadcast radius for the message: a UE relays the message
//   only if it is located within a configurable distance from the originator.
//
// Moreover, if the Trickle suppression mechanism is enabled, the application avoids
// relaying a message when more than 'k' duplicates have already been received.
//
// Every message originated by a node is associated with a *target area*, i.e., the
// set of nodes that should receive the notification. This is used for gathering
// statistics about the dissemination of the message.
//
// Reference: G. Nardini, G. Stea, A. Virdis, "A fast and reliable broadcast service
//      for LTE-Advanced exploiting multihop device-to-device transmissions",
//      Future Internet, 2017, 9(4), 89
//
simple MultihopD2D like IApp
{
    parameters:
        int localPort = default(3000);
        int destPort = default(3000);
        string destAddress = default("0.0.0.0");
        string interfaceName = default("cellular");
        int msgSize @unit(B) = default(40B);
        double maxBroadcastRadius @unit(m) = default(-1m);
        int ttl = default(3);
        double maxTransmissionDelay @unit("s") = default(0.01s);
        double selfishProbability = default(0.0);  // Probability that the app does not relay the received message
        string eventGeneratorModule = default("eventGenerator");
        string multihopD2DStatisticsModule = default("d2dMultihopStatistics");

        //# Trickle suppression mechanism parameters
        bool trickle = default(false);
        double I @unit("s") = default(0.01s);
        int k = default(3);

        //# Network Layer specs
        string interfaceTableModule = default(absPath(".interfaceTable"));
        string lteMacModule = default("^.cellularNic.mac");
        string ltePhyModule = default("^.cellularNic.phy");

        int tos = default(-1); // If not -1, set the Type of Service (IPv4) / Traffic Class (IPv6) field of sent packets to this value

        //# Statistics
        @signal[d2dMultihopGeneratedMsg];
        @statistic[d2dMultihopGeneratedMsg](title="Number of locally generated packets"; unit=""; source="d2dMultihopGeneratedMsg"; record=sum,vector);
        @signal[d2dMultihopSentMsg];
        @statistic[d2dMultihopSentMsg](title="Number of sent/relayed packets"; unit=""; source="d2dMultihopSentMsg"; record=sum,vector);
        @signal[d2dMultihopRcvdMsg];
        @statistic[d2dMultihopRcvdMsg](title="Number of received packets"; unit=""; source="d2dMultihopRcvdMsg"; record=sum,vector);
        @signal[d2dMultihopRcvdDupMsg];
        @statistic[d2dMultihopRcvdDupMsg](title="Number of received duplicate packets"; unit=""; source="d2dMultihopRcvdDupMsg"; record=sum,vector);

        @signal[d2dMultihopTrickleSuppressedMsg];
        @statistic[d2dMultihopTrickleSuppressedMsg](title="Number of suppressed packets by the Trickle suppression mechanism"; unit=""; source="d2dMultihopTrickleSuppressedMsg"; record=sum,vector);

        @display("i=block/source");
    gates:
        output socketOut;
        input socketIn;
}

File: src/simu5g/apps/d2dMultihop/MultihopD2D.ned