X2AppClient

Package: simu5g.x2

simple module X2AppClient

Extends INET’s SctpClient application by adding an output gate to send messages to the LteX2Manager and manages the connection initiation towards the peer’s server module based on the configuration specified in the .ini file. Once the connection has been established, it receives messages from the peer’s server module and forwards them to the LteX2Manager module for further processing and redirection to the intended submodule of the LTE/NR protocol stack.

simu5g.x2.X2AppClientX2AppClientsimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

LteX2App

compound module

Represents the container for all X2 applications that an e/gNodeB instantiates to enable X2 communications with its peer e/gNodeBs. Specifically, for each peer, this module contains two submodules:

Extends

Name

Type

Description

SctpClient ↗

simple module

Client app for SCTP-based request-reply protocols. Handles a single session (and SCTP connection) at a time.

Parameters

Name

Type

Default value

Description

displayStringTextFormat

string

“{socketState}”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

localAddress

string

“”

Comma-separated list of addresses

localPort

int

0

Port number to listen on

connectAddress

string

Server address (may be symbolic)

connectPort

int

5000

Port number to connect to

startTime

double

0s

Time the first session begins

numRequestsPerSession

int

1

Number of requests sent per session

numPacketsToReceive

int

0

requestLength

int

1452

Length of a request (bytes)

thinkTime

double

0s

Time gap between requests

waitToClose

double

0s

Time to wait between the last message sent and abort

reconnectInterval

double

0s

If the connection breaks, waits this much before trying to reconnect

inboundStreams

int

17

outboundStreams

int

1

echo

bool

false

Echoes received packages when true

ordered

bool

true

queueSize

int

0

prMethod

int

0

0=NONE, 1=PR_TTL, 2=PR_RTX, 3=PR_PRIO, 4=PR_STRRST

prValue

double

0

For PR-SCTP

streamReset

bool

false

streamRequestTime

double

0s

streamResetType

int

5

NO_RESET=5, RESET_OUTGOING=6, RESET_INCOMING=7, RESET_BOTH=8, SSN_TSN=9

streamToReset

int

0

stopTime

double

-1s

Time of finishing sending, negative values mean forever

primaryTime

double

0s

newPrimary

string

“”

streamRequestLengths

string

“”

streamRequestRatio

string

“”

streamPriorities

string

“”

finishEndsSimulation

bool

false

binderModule

string

“binder”

Properties

Name

Value

Description

class

X2AppClient

Gates

Name

Direction

Size

Description

socketIn

input

socketOut

output

x2ManagerOut

output

Signals

Name

Type

Unit

Description

echoedPk

inet::Packet ↗

packetReceived

inet::Packet ↗

packetSent

inet::Packet ↗

Statistics

Name

Title

Source

Record

Unit

Interpolation Mode

Description

echoedPk

packets echoed

echoedPk

count,”sum(packetBytes)”,”vector(packetBytes)”

none

packetReceived

packets received

packetReceived

count,”sum(packetBytes)”,”vector(packetBytes)”

none

packetSent

packets sent

packetSent

count,”sum(packetBytes)”,”vector(packetBytes)”

none

Source code

//
// Extends INET's SctpClient application by adding
// an output gate to send messages to the ~LteX2Manager and
// manages the connection initiation towards the peer's server module
// based on the configuration specified in the .ini file.
// Once the connection has been established, it receives messages
// from the peer's server module and forwards them to the ~LteX2Manager
// module for further processing and redirection to the intended submodule
// of the LTE/NR protocol stack.
//
simple X2AppClient extends SctpClient
{
    parameters:
        @class("X2AppClient");
        string binderModule = default("binder");
        connectPort @mutable = default(5000); // Overwritten at initialization
        startTime = default(0s);
    gates:
        output x2ManagerOut @labels(X2Msg);
}

File: src/simu5g/x2/X2AppClient.ned