NrNicEnbD2D

Package: simu5g.stack.d2d

NrNicEnbD2D

compound module

Device-to-Device (D2D) capable NR gNodeB network interface. It extends NrNicEnb by swapping in the D2D-capable NR MAC leaf and the D2D-capable eNB PHY, and by enabling the D2D mode controller and mode selection. It is the NR counterpart of LteNicEnbD2D.

The PDCP and RLC entities are missing from the submodules on purpose: the RRC layer's BearerManagement creates them per bearer at run time.

pcapRecorder[numPcapRecorders] : PcapRecorder
[from inet] ↗

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 [from inet] ↗: This module interface is implemented by clock models.

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

IHandoverPacketHolder: Manages packet buffering/tunnelling during handover

Source:
handoverPacketHolder: <> like IHandoverPacketHolder {
    @display("p=440,50;is=s");
} ip2nic : like INetworkLayer2CellularNic

Ip2Nic: Bridges the IP network layer and the cellular protocol stack, handling bidirectional packet flow.

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

Source:
ip2nic: <default("Ip2Nic")> like INetworkLayer2CellularNic {
    nodeType = parent.nodeType;
    @display("p=310,120");
} rrc : like IRrc

Rrc: RRC (Radio Resource Control) layer for LTE/NR networks.

IRrc: Interface for the RRC (Radio Resource Control) layer of the LTE/NR Stack.

Source:
rrc: <default("Rrc")> like IRrc {
    @display("p=80,60,col;g=left");
} pdcpMux : like IPdcpMux

PdcpMux: Upper-layer PDCP packet dispatcher.

IPdcpMux: Module interface for the upper-layer PDCP packet dispatcher of a cellular NIC (see ~PdcpMux for the...

Source:
pdcpMux: <default("PdcpMux")> like IPdcpMux {
    @display("p=310,190;is=s");
} rlcMux : like IRlcMux

RlcMux: Lower-layer RLC packet dispatcher.

IRlcMux: Module interface for the lower-layer RLC packet dispatcher of a cellular NIC (see ~RlcMux for the...

Source:
rlcMux: <default("RlcMux")> like IRlcMux {
    @display("p=310,430;is=s");
} mac : like ILteMac

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

Source:
mac: <> like ILteMac {
    @display("p=310,510");
} phy : like IPhy

IPhy: Interface for the Physical (PHY) layer of the LTE/NR protocol stack.

Source:
phy: <> like IPhy {
    @display("p=310,600");
} channelModel[numCarriers] : like IChannelModel

IChannelModel: Provides the interface for modules implementing the model of the radio channel.

Source:
channelModel[numCarriers]: <channelModelType> like IChannelModel {
    @display("p=80,60,col;g=left");
} packetFlowObserver : like IPacketFlowObserver

Source:
packetFlowObserver: <default("")> like IPacketFlowObserver if hasRniSupport {
    @display("p=80,60,col;g=left");
} pdcpDcMux : DcMux

Dual Connectivity mux: routes split-bearer PDCP PDUs between the local PDCP entities and the...

Source:
pdcpDcMux: DcMux {
    @display("p=609,331;is=s");
} x2Manager : LteX2Manager

Serves as a pluggable interface for submodules of the e/gNodeB's LTE/NR protocol stack that...

Source:
x2Manager: LteX2Manager {
    @display("p=717,190;is=s");
} compManager : like ILteCompManager

LteCompManagerProportional: Implements a CoMP (Coordinated Multi-Point) Proportional Scheduling algorithm.

ILteCompManager: The LteCompManager interface defines the structure for the CoMP Manager.

Source:
compManager: <default("LteCompManagerProportional")> like ILteCompManager if compEnabled {
    @display("p=717,286;is=s");
} handoverX2Forwarder : HandoverX2Forwarder

Manages the exchange of messages during the handover process.

Source:
handoverX2Forwarder: HandoverX2Forwarder {
    @display("p=717,50;is=s");
} dcX2Forwarder : DcX2Forwarder

Performs bridging of data-plane packets between PDCP entities of two eNodeBs or gNodeBs when Dual...

Source:
dcX2Forwarder: DcX2Forwarder if dualConnectivityEnabled {
    @display("p=609,190;is=s");
} bgTrafficGenerator[numCarriers] : BackgroundTrafficGenerator

Part of a ~BackgroundCell module and is responsible for instantiating a configurable number of...

Source:
bgTrafficGenerator[numCarriers]: BackgroundTrafficGenerator {
    @display("p=80,60,col;g=left");
} sdap : like INrSdap

NrSdap: Implements the SDAP Protocol.

INrSdap: Interface for SDAP protocol implementations.

Source:
sdap: <default("NrSdap")> like INrSdap if hasSdap {
    @display("p=230,155");
}

Inheritance diagram

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

Extends

Name Type Description
NrNicEnb compound module

The NrNicEnb module serves as a network interface that provides 5G connectivity within a gNodeB. It implements the data and signaling plane of the NR (New Radio) stack, which encompasses the PDCP, RLC, MAC, and PHY layers. The parameters and submodules facilitate the customization of the gNodeB's behavior, including its support for CoMP (Coordinated MultiPoint) or dual connectivity. D2D support is added by the NrNicEnbD2D subtype.

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

channelModelType string "D2dChannelModel"
dualConnectivityEnabled bool false
numCarriers int 1
address string "auto"
compEnabled bool false
hasSdap bool false

Whether the stack has an SDAP layer: true on 5GC (Upf) networks, false on EPC/EN-DC ones; the network sets it per its core

Properties

Name Value Description
networkInterface
lifecycleSupport
class NonlayoutingNetworkInterface
display i=block/ifcard;bgb=800,650;bgl=3

Gates

Name Direction Size Description
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.isNr bool
rlcMux.bearerManagementModule string
packetFlowObserver.macModule string
packetFlowObserver.pdcpModule string
packetFlowObserver.rlcModule string
packetFlowObserver.isNrObserver bool
packetFlowObserver.pfmType string
pdcpDcMux.binderModule string "binder"
pdcpDcMux.bearerManagementModule string "^.rrc.bearerManagement"
x2Manager.interfaceTableModule string
x2Manager.binderModule string "binder"
handoverX2Forwarder.losslessHandover bool false
handoverX2Forwarder.handoverPacketHolderModule string "^.handoverPacketHolder"
sdap.nodeRole string

Node role: "UE" or "gNB" - determines reflective QoS behavior

sdap.useReflectiveQos bool

UE only

sdap.reflectiveQosTableModule string

UE only: path to ReflectiveQosTable module (empty = disabled)

Source code

//
// Device-to-Device (D2D) capable NR gNodeB network interface. It extends
// ~NrNicEnb by swapping in the D2D-capable NR MAC leaf and the D2D-capable eNB
// PHY, and by enabling the D2D mode controller and mode selection. It is the NR
// counterpart of ~LteNicEnbD2D.
//
// 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 NrNicEnbD2D extends NrNicEnb
{
    parameters:
        mac.typename = default("NrMacGnbD2D");
        phy.typename = default("PhyEnbD2D");
        ip2nic.typename = default("Ip2NicD2D");
        rlcMux.typename = default("RlcMuxD2D");
        rrc.bearerManagement.lteRlcUmEntityModuleType = default("simu5g.stack.d2d.rlc.LteRlcUmEntityD2D");
        rrc.bearerManagement.nrRlcUmEntityModuleType = default("simu5g.stack.d2d.rlc.NrRlcUmEntityD2D");

        // Use the D2D-capable channel model (matching the NrNicEnb default of
        // TR 38.901 on the gNodeB's channelModel slot)
        channelModelType = default("D2dChannelModel");
        channelModel[*].pathLossType = default("Tr38901");
        rrc.typename = default("RrcD2D");
        rrc.hasD2DModeSelection = true;
}
File: src/simu5g/stack/d2d/NrNicEnbD2D.ned