NrCar

Package: simu5g.nodes

NrCar

compound module

Defines a LteCar node as an NR User Equipment (UE) with vehicular-like mobility. The latter is modeled by utilizing the Veins-Inet project.

See https://veins.car2x.org/documentation/modules/#veins_inet

interfaceTable : InterfaceTable
[from inet] ↗

Keeps the table of network interfaces.

Source:
interfaceTable: InterfaceTable {
    @display("p=127,257;is=s");
} mobility : like IMobility

StationaryMobility [from inet] ↗: This mobility module does nothing; it can be used for stationary nodes.

IMobility [from inet] ↗: The module interface for mobility models.

Source:
mobility: <default("StationaryMobility")> like IMobility {
    @display("p=127,172;is=s");
}

        //# layer submodules (must be ordered from lower to upper layers) lo[numLoInterfaces] : like ILoopbackInterface

LoopbackInterface [from inet] ↗: This module implements a loopback network interface.

ILoopbackInterface [from inet] ↗: This module interface is implemented by loopback network interfaces.

Source:
lo[numLoInterfaces]: <default("LoopbackInterface")> like ILoopbackInterface {
    parameters:
        @display("p=503,590,row,150");
} cellularNic : like ICellularNic

ICellularNic: Interface for the 3GPP Stack.

Source:
cellularNic: <default(hasD2D ? "LteNicUeD2D" : "LteNicUe")> like ICellularNic {
    nodeType = parent.nodeType;
    @display("p=355,589");
} eth[numEthInterfaces] : like IEthernetInterface

IEthernetInterface [from inet] ↗: This module interface is implemented by Ethernet network interfaces.

Source:
eth[numEthInterfaces]: <default("ExtLowerEthernetInterface")> like IEthernetInterface {
    parameters:
        @display("p=674,590,row,150;q=txQueue");
} encap : like IEthernetLayer

EthernetEncapsulation [from inet] ↗: Performs Ethernet II or Ethernet with LLC/SNAP encapsulation/decapsulation.

IEthernetLayer [from inet] ↗

Source:
encap: <default("EthernetEncapsulation")> like IEthernetLayer if typename != "" {
    parameters:
        registerProtocol = true;
        @display("p=674,500");
} ipv4 : like INetworkLayer

Ipv4NetworkLayer [from inet] ↗: Network layer of an IPv4 node.

INetworkLayer [from inet] ↗

Source:
ipv4: <default("Ipv4NetworkLayer")> like INetworkLayer if hasIpv4 {
    parameters:
        @display("p=375,376;q=queue");
} ipv6 : like INetworkLayer

Ipv6NetworkLayer [from inet] ↗: Represents an IPv6 network layer (L3).

INetworkLayer [from inet] ↗

Source:
ipv6: <default("Ipv6NetworkLayer")> like INetworkLayer if hasIpv6 {
    parameters:
        @display("p=525,376;q=queue");
} udp : like IUdp

IUdp [from inet] ↗: UDP protocol interface.

Source:
udp: <default(firstAvailableOrEmpty("Udp"))> like IUdp if hasUdp {
    parameters:
        @display("p=375,226");
} tcp : like ITcp

ITcp [from inet] ↗: Interface for TCP protocol implementations.

Source:
tcp: <default(firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc"))> like ITcp if hasTcp {
    parameters:
        @display("p=525,226");
} sctp : like ISctp

ISctp [from inet] ↗: Interface for SCTP protocol.

Source:
sctp: <default(firstAvailableOrEmpty("Sctp"))> like ISctp if hasSctp {
    parameters:
        @display("p=675,226");
} app[numApps] : like IApp

IApp [from inet] ↗: Generic application interface.

Source:
app[numApps]: <> like IApp {
    @display("p=374,72,row,140");
} at : MessageDispatcher
[from inet] ↗

This module connects multiple applications, protocols and interfaces with each other and...

Source:
at: MessageDispatcher {
    parameters:
        @display("p=550,146;b=600,5,,,,1");
} tn : MessageDispatcher
[from inet] ↗

This module connects multiple applications, protocols and interfaces with each other and...

Source:
tn: MessageDispatcher {
    parameters:
        @display("p=550,300;b=600,5,,,,1");
} nl : MessageDispatcher
[from inet] ↗

This module connects multiple applications, protocols and interfaces with each other and...

Source:
nl: MessageDispatcher {
    parameters:
        @display("p=550,446;b=600,5,,,,1");
} pcapRecorder[numPcapRecorders] : PcapRecorder
[from inet] ↗

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

Source:
pcapRecorder[numPcapRecorders]: PcapRecorder {
    @display("p=126,346,r,10");
} ueCollector : UeStatsCollector

Collects the radio network information of a LTE User Equipment (UE), which can be accessed by the...

Source:
ueCollector: UeStatsCollector if hasRniSupport {
    @display("p=126,588;is=s");
} nrUeCollector : NrUeStatsCollector

Collects the radio network information of a NR UE, which can be accessed by the ~RniService module...

Source:
nrUeCollector: NrUeStatsCollector if hasRniSupport {
    @display("p=127,506;is=s");
}

Inheritance diagram

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

Extends

Name Type Description
NrUe compound module

Models a User Equipment (UE) for a 5G/LTE network. It extends the LteUe module by implementing a NrNicUe as a Network Interface Card (NIC) module. This module can be used to model a device that can connect to either a 4G eNodeB or a 5G gNodeB, or both.

Parameters

Name Type Default value Description
numApps int 0
hasUdp bool firstAvailableOrEmpty("Udp") != ""
hasTcp bool firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc") != ""
hasSctp bool false
nodeType string "UE"
servingNodeId int 0

The initial serving eNodeB of the UE; 0 if none

macNodeId int 1025+simu5g_seq("LteUe_macNodeId")
hasD2D bool false
hasIpv4 bool true
hasIpv6 bool false
numEthInterfaces int 0
extHostAddress string ""
numLoInterfaces int 1
numPcapRecorders int 0
hasRniSupport bool false
nrServingNodeId int 0

The initial serving gNodeB of the UE; 0 if none

nrMacNodeId int 2049+simu5g_seq("NrUe_macNodeId")

Properties

Name Value Description
networkNode
display i=device/car

Gates

Name Direction Size Description
radioIn input

Connection to master

nrRadioIn input

Connection to master

Unassigned submodule parameters

Name Type Default value Description
interfaceTable.displayAddresses bool false

whether to display IP addresses on links

eth.bitrate double
at.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

at.forwardServiceRegistration bool true
at.forwardProtocolRegistration bool true
tn.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

tn.forwardServiceRegistration bool true
tn.forwardProtocolRegistration bool true
nl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

nl.forwardServiceRegistration bool true
nl.forwardProtocolRegistration bool true
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.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

space-separated list of sibling module names to listen on

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"

Source code

//
// Defines a LteCar node as an NR User Equipment (UE) with vehicular-like
// mobility. The latter is modeled by utilizing the Veins-Inet project.
//
// See https://veins.car2x.org/documentation/modules/#veins_inet
//
module NrCar extends NrUe
{
    parameters:
        @display("i=device/car");

        //# Mobility
        mobility.typename = default("VeinsInetMobility");

        //# Network Layer specs
        *.routingTableModule = default(absPath(".ipv4.routingTable"));

        ipv4.configurator.typename = "HostAutoConfigurator";
        ipv4.configurator.interfaces = "cellular lo0";
}
File: src/simu5g/nodes/NrCar.ned