LteNicBase

Package: simu5g.stack

LteNicBase

compound module

The LteNicBase module serves as the foundational building block for LTE networking in Simu5G. It integrates protocols for LTE communication, including PDCP, RLC, MAC, and PHY layers. This base module allows higher-level modules, such as User Equipment (UE) and eNodeB (evolved Node B), to configure and utilize these layers according to their specific requirements.

pcapRecorder[numPcapRecorders] : PcapRecorder

Records PCAP traces of frames sent/received by other modules within the same host.

Source:
pcapRecorder[numPcapRecorders]: PcapRecorder {
    parameters:
        moduleNamePatterns = ".^";
        @display("p=100,100;is=s");
} clock : like IClock

IClock: This module interface is implemented by clock models.

Source:
clock: <default("")> like IClock if typename != "" {
    parameters:
        @display("p=100,200;is=s");
} ip2nic : like INetworkLayer2CellularNic

IP2Nic: The IP2Nic module acts as a bridge between the IP network layer and the cellular (LTE/NR) protocol...

INetworkLayer2CellularNic: The INetworkLayer2CellularNic module interface serves as an intermediary between the network layer...

Source:
ip2nic: <default("IP2Nic")> like INetworkLayer2CellularNic {
    nodeType = parent.nodeType;
    @display("p=412,67");
} pdcpRrc : like ILtePdcpRrc

ILtePdcpRrc: Interface for the PDCP/RRC layer of the LTE Stack.

Source:
pdcpRrc: <> like ILtePdcpRrc {
    @display("p=362,141");
} rlc : LteRlc

The LteRlc module implements the functionalities of the Radio Link Control (RLC) layer.

Source:
rlc: LteRlc {
    @display("p=362,226");
    d2dCapable = parent.d2dCapable;
    *.macModule = "^.^.mac";
    *.packetFlowManagerModule = parent.hasRNISupport ? "^.^.packetFlowManager" : "";
    um.nodeType = parent.nodeType;
} mac : like ILteMac

ILteMac: Interface for the Medium Access Control (MAC) layer of the LTE Stack.

Source:
mac: <> like ILteMac {
    @display("p=363,314");
} phy : like ILtePhy

ILtePhy: Interface for the Physical (PHY) layer of the LTE stack.

Source:
phy: <> like ILtePhy {
    @display("p=363,389");
} channelModel[numCarriers] : like ILteChannelModel

ILteChannelModel: This module provides the interface for modules implementing the model of the radio channel.

Source:
channelModel[numCarriers]: <LteChannelModelType> like ILteChannelModel {
    @display("p=100,389");
}

         		//# packetFlowManager : like IPacketFlowManager

Source:
packetFlowManager: <default("")> like IPacketFlowManager if hasRNISupport {
    @display("p=70,300");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Known subclasses

Name Type Description
LteNicEnb compound module

The LteNicEnb module is a network interface that provides LTE connectivity within an eNodeB. It implements the data and signaling planes of the LTE stack, which includes the PDCP, RLC, MAC, and PHY layers. The parameters and submodules allow customization of the eNodeB's behavior, including whether it supports D2D communication, CoMP (Coordinated MultiPoint), or dual connectivity.

LteNicUe compound module

The LteNicUe module is a network interface that provides LTE connectivity within a UE (User Equipment). It implements the data and signaling planes of the LTE stack, which includes PDCP, RLC, MAC, and PHY layers. The parameters and submodules allow customization of the UE's behavior.

Extends

Name Type Description
NetworkInterface compound module

This module serves as the base module for all network interfaces.

Parameters

Name Type Default value Description
displayStringTextFormat string "%a (%i)\n%m"
recordPcap bool false
numPcapRecorders int recordPcap ? 1 : 0
isWireless bool true
interfaceTableModule string
routingTableModule string
hasRNISupport bool false
nodeType string
processingDelayIn double 0s

additional processing delay for incoming ip packets

processingDelayOut double 0s

additional processing delay for outgoing ip packets

LteChannelModelType string "LteRealisticChannelModel"
d2dCapable bool

inherit the value from the parent module

dualConnectivityEnabled bool false
numCarriers int 1
address string "auto"

Properties

Name Value Description
networkInterface
lifecycleSupport
class ::inet::NetworkInterface
display i=block/ifcard;bgb=704,443;bgl=3

Gates

Name Direction Size Description
EUTRAN_RRC_Sap inout
upperLayerIn input
upperLayerOut output
radioIn input

to receive messages sent using sendDirect()

nrRadioIn input

for NR support

x2 [ ] inout

optional x2 manager

Signals

Name Type Unit Description
packetDropped inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode Description
packetDropInterfaceDown packet drops: interface down packetDropReasonIsInterfaceDown(packetDropped) count, sum(packetBytes), vector(packetBytes) none
packetDropNoCarrier packet drops: no carrier packetDropReasonIsNoCarrier(packetDropped) count, sum(packetBytes), vector(packetBytes) none

Unassigned submodule parameters

Name Type Default value Description
pcapRecorder.verbose bool true

whether to log packets on the module output

pcapRecorder.pcapFile string ""

the PCAP file to be written

pcapRecorder.fileFormat string "pcapng"
pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

pcapRecorder.displayStringTextFormat string "rec: %n pks"
ip2nic.interfaceTableModule string
ip2nic.routingTableModule string
pdcpRrc.headerCompressedSize int
rlc.tm.queueSize int 2MiB

RLC SDU queue size (0: unlimited)

rlc.um.queueSize int
rlc.um.mapAllLcidsToSingleBearer bool
packetFlowManager.macModule string
packetFlowManager.pfmType string

Source code

//
// The LteNicBase module serves as the foundational building block for LTE networking
// in Simu5G. It integrates protocols for LTE communication, including PDCP, RLC, MAC,
// and PHY layers. This base module allows higher-level modules, such as User Equipment (UE)
// and eNodeB (evolved Node B), to configure and utilize these layers according to their
// specific requirements.
//
module LteNicBase extends NetworkInterface like ICellularNic
{
    parameters:
        @class(::inet::NetworkInterface);
        @display("i=block/ifcard;bgb=704,443;bgl=3");
        bool isWireless = true;
        string interfaceTableModule;
        string routingTableModule;

        bool hasRNISupport = default(false);

        string nodeType;
        double processingDelayIn @unit(s) = default(0s);   // additional processing delay for incoming ip packets
        double processingDelayOut @unit(s) = default(0s);   // additional processing delay for outgoing ip packets

        string LteChannelModelType = default("LteRealisticChannelModel");

        bool d2dCapable;            // inherit the value from the parent module

        bool dualConnectivityEnabled = default(false);
        int numCarriers = default(1);

        string address @mutable = default("auto");
        *.interfaceTableModule = default(absPath(this.interfaceTableModule));
        *.routingTableModule = default(absPath(this.routingTableModule));

    gates:
        //#
        //# Gates connecting UE/eNB and LTE Stack
        //#
        //# Control Ports
        inout EUTRAN_RRC_Sap;   // Control of RRC Layer
        input upperLayerIn;
        output upperLayerOut;
        input radioIn @loose;  // to receive messages sent using sendDirect()
        input nrRadioIn @loose;// for NR support
        inout x2[] @loose;     // optional x2 manager

    submodules:
        // bridge between radio nic and network layer
        ip2nic: <default("IP2Nic")> like INetworkLayer2CellularNic {
            nodeType = parent.nodeType;
            @display("p=412,67");
        }
        // PDCP-RRC Layer
        pdcpRrc: <> like ILtePdcpRrc {
            @display("p=362,141");
        }
        // RLC Layer
        rlc: LteRlc {
            @display("p=362,226");
            d2dCapable = parent.d2dCapable;
            *.macModule = "^.^.mac";
            *.packetFlowManagerModule = parent.hasRNISupport ? "^.^.packetFlowManager" : "";
            um.nodeType = parent.nodeType;
        }
        // MAC Layer
        mac: <> like ILteMac {
            @display("p=363,314");
        }
        // LtePhy submodule
        phy: <> like ILtePhy {
            @display("p=363,389");
        }

        channelModel[numCarriers]: <LteChannelModelType> like ILteChannelModel {
            @display("p=100,389");
        }

         		//#
        //# Modules used to take trace of PDCP pkt flow
        //#
        packetFlowManager: <default("")> like IPacketFlowManager if hasRNISupport {
            @display("p=70,300");
        }

    connections allowunconnected:
        ip2nic.stackNic <--> pdcpRrc.DataPort;

        //#
        //# Internal LTE Stack Connections
        //#

        EUTRAN_RRC_Sap <--> pdcpRrc.EUTRAN_RRC_Sap;

        //# PDCP <-> RLC
        pdcpRrc.UM_Sap++ <--> rlc.UM_Sap;
        pdcpRrc.AM_Sap++ <--> rlc.AM_Sap;
        pdcpRrc.TM_Sap++ <--> rlc.TM_Sap;

        //# RLC <-> MAC
        rlc.RLC_to_MAC --> mac.RLC_to_MAC;
        rlc.MAC_to_RLC <-- mac.MAC_to_RLC;

        //#
        //# Connections from LTE Stack to radio interface
        //#
        mac.MAC_to_PHY --> phy.upperGateIn;
        mac.PHY_to_MAC <-- phy.upperGateOut;

        //# external: lower connection
        radioIn --> phy.radioIn;
        ip2nic.upperLayerOut --> {  delay = parent.processingDelayOut; } --> upperLayerOut;
        upperLayerIn --> {  delay = parent.processingDelayIn; } --> ip2nic.upperLayerIn;
}

File: src/stack/LteNicBase.ned