Package: simu5g.stack.d2d
NrNicUeD2D
compound moduleDevice-to-Device (D2D) capable NR User Equipment network interface. It extends NrNicUe by swapping in the D2D-capable NR MAC/PHY leaves and enabling the D2D mode controller, allowing direct UE-to-UE communication without routing traffic through the gNodeB. It is the NR counterpart of LteNicUeD2D.
The PDCP and RLC entities are missing from the submodules on purpose: the RRC layer's BearerManagement creates them per bearer at run time.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Extends
| Name | Type | Description |
|---|---|---|
| NrNicUe | compound module |
Defines a User Equipment (UE) network interface card that supports both LTE and NR (New Radio) technologies. It extends the LteNicUe module by adding additional submodules and parameters to support NR-specific functionalities. D2D support is added by the NrNicUeD2D 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" | |
| 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 |
| useReflectiveQos | bool | false | |
| nrChannelModelType | string | "D2dChannelModel" | |
| numNrCarriers | int | 1 | |
| d2dInitialMode | bool | false |
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 | ||
| dlFbGen.isNr | bool | false |
True for the NR leg (set by NrNicUe on the nrDlFbGen submodule) |
| dlFbGen.macNodeId | int |
MacNodeId of the stack leg this generator belongs to (set by the NIC) |
|
| dlFbGen.feedbackType | string | "ALLBANDS" |
Can be ALLBANDS, PREFERRED, WIDEBAND |
| dlFbGen.rbAllocationType | string | "localized" |
Resource allocation type ("distributed" or "localized") |
| dlFbGen.fbPeriod | int | 6tti |
Period for Periodic feedback in TTI |
| dlFbGen.fbDelay | int | 1tti |
Time interval between sensing and transmission in TTI |
| dlFbGen.usePeriodic | bool | true |
Whether periodic feedback is used in addition to aperiodic feedback |
| dlFbGen.initialTxMode | string | "SINGLE_ANTENNA_PORT0" |
Initial txMode (see LteCommon.h) |
| dlFbGen.binderModule | string | "binder" | |
| dlFbGen.phyModule | string | "^.phy" | |
| 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) |
|
| nrRlcMux.bearerManagementModule | string | ||
| nrDlFbGen.isNr | bool | false |
True for the NR leg (set by NrNicUe on the nrDlFbGen submodule) |
| nrDlFbGen.macNodeId | int |
MacNodeId of the stack leg this generator belongs to (set by the NIC) |
|
| nrDlFbGen.feedbackType | string | "ALLBANDS" |
Can be ALLBANDS, PREFERRED, WIDEBAND |
| nrDlFbGen.rbAllocationType | string | "localized" |
Resource allocation type ("distributed" or "localized") |
| nrDlFbGen.fbPeriod | int | 6tti |
Period for Periodic feedback in TTI |
| nrDlFbGen.fbDelay | int | 1tti |
Time interval between sensing and transmission in TTI |
| nrDlFbGen.usePeriodic | bool | true |
Whether periodic feedback is used in addition to aperiodic feedback |
| nrDlFbGen.initialTxMode | string | "SINGLE_ANTENNA_PORT0" |
Initial txMode (see LteCommon.h) |
| nrDlFbGen.binderModule | string | "binder" | |
| nrPacketFlowObserver.pdcpModule | string | ||
| nrPacketFlowObserver.pfmType | string |
Source code
// // Device-to-Device (D2D) capable NR User Equipment network interface. It extends // ~NrNicUe by swapping in the D2D-capable NR MAC/PHY leaves and enabling the D2D // mode controller, allowing direct UE-to-UE communication without routing traffic // through the gNodeB. It is the NR counterpart of ~LteNicUeD2D. // // 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 NrNicUeD2D extends NrNicUe { parameters: // NR stack: use the D2D-capable MAC/PHY leaves nrMac.typename = default("NrMacUeD2D"); nrPhy.typename = default("PhyUeD2D"); // LTE leg: also runs the D2D-capable MAC/PHY leaves (the PHY carries // the averageCqiD2D statistic) mac.typename = default("LteMacUeD2D"); phy.typename = default("PhyUeD2D"); ip2nic.typename = default("Ip2NicD2D"); // Both legs previously ran with the NIC-wide D2D support enabled rlcMux.typename = default("RlcMuxD2D"); rrc.bearerManagement.lteRlcUmEntityModuleType = default("simu5g.stack.d2d.rlc.LteRlcUmEntityD2D"); rrc.bearerManagement.nrRlcUmEntityModuleType = default("simu5g.stack.d2d.rlc.NrRlcUmEntityD2D"); nrRlcMux.typename = default("RlcMuxD2D"); // Use the D2D-capable channel model on both legs (matching the // pre-separation defaults: TR 36.814 on the LTE leg, TR 38.901 on the NR leg) channelModelType = default("D2dChannelModel"); nrChannelModelType = default("D2dChannelModel"); nrChannelModel[*].pathLossType = default("Tr38901"); rrc.typename = default("RrcD2D"); rrc.handoverController.typename = default("HandoverControllerD2D"); rrc.nrHandoverController.typename = default("HandoverControllerD2D"); bool d2dInitialMode = default(false); }File: src/simu5g/stack/d2d/NrNicUeD2D.ned