LteNicUe.ned

NED File src/simu5g/stack/LteNicUe.ned

Name Type Description
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.

Source code

//
//                  Simu5G
//
// Copyright (C) 2019-2021 Giovanni Nardini, Giovanni Stea, Antonio Virdis et al. (University of Pisa)
// Copyright (C) 2022-2026 Giovanni Nardini, Giovanni Stea et al. (University of Pisa)
//
// This file is part of a software released under the license included in file
// "license.pdf". Please read LICENSE and README files before using it.
// The above files and the present reference are part of the software itself,
// and cannot be removed from it.
//


package simu5g.stack;

import simu5g.stack.ethernet.EthernetPortal;
import simu5g.stack.phy.feedback.LteDlFeedbackGenerator;

//
// 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.
//
// The PDCP and RLC entities are missing from the submodules on purpose: the RRC
// layer's ~BearerManagement creates them per bearer at run time.
//
module LteNicUe extends LteNicBase like IUeCellularNic
{
    parameters:
        mac.typename = default("LteMacUe");
        phy.typename = default("PhyUe");
        handoverPacketHolder.typename = default("HandoverPacketHolderUe");
        packetFlowObserver.typename = default("PacketFlowObserverUe");

        string sessionType;  // The type of the UE's session (see ~LteUe), set by the node

        rrc.hasConnectionControl = true;
        rrc.connectionControl.typename = default("ConnectionControlUe");
        rrc.connectionControl.isNr = false;
        rrc.connectionControl.macNodeId = parent.macNodeId;
        rrc.connectionControl.sessionType = this.sessionType;
        rrc.registration.sessionType = this.sessionType;
        handoverPacketHolder.sessionType = this.sessionType;
        ip2nic.sessionType = this.sessionType;
        dlFbGen.macNodeId = parent.macNodeId;

    submodules:
        // Feedback generator submodule
        dlFbGen: LteDlFeedbackGenerator {
            @display("p=80,60,col;g=left");
        }
        // the NIC's top in Ethernet mode, an Ethernet port of the UE's link layer
        ethernetPortal: EthernetPortal if sessionType == "Ethernet" {
            @display("p=310,50;is=s");
        }

    connections allowunconnected:
        upperLayerIn --> { @reconnect; delay = parent.processingDelayIn; } --> ethernetPortal.upperLayerIn if sessionType == "Ethernet";
        ethernetPortal.lowerLayerOut --> handoverPacketHolder.upperLayerIn if sessionType == "Ethernet";
        ip2nic.upperLayerOut --> { @reconnect; } --> ethernetPortal.lowerLayerIn if sessionType == "Ethernet";
        ethernetPortal.upperLayerOut --> { delay = parent.processingDelayOut; } --> upperLayerOut if sessionType == "Ethernet";
}