Package: simu5g.nodes
LteUe
compound moduleModels a User Equipment (UE) in a 4G LTE network. It is a host equipped with an LTE Network Interface Card (NIC), allowing the UE to connect to an eNodeB module via the Radio Access Network (RAN) of the LTE network and communicate with any other host in the system. In addition to a NIC submodule, this compound module includes all the higher layers of the protocol stack, from IP to application modules. It supports a configurable number of UDP and TCP applications. It also features an Ethernet interface, which is utilized in real-time emulation mode to connect the UE to the real network (outside the simulator) via a virtual Ethernet interface.
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.
Used in
| Name | Type | Description |
|---|---|---|
| MultiCell | network |
Two eNodeB cells on a shared EPC PgwStandard, joined by an X2 link, with a router and a server behind the core. Four LteUe terminals are placed two per cell, and numExtCells ExtCell cells can be added as interferers. |
| MultiCell_D2DMultihop | network |
Five eNodeB cells, each reaching the EPC PgwStandard through a router of its own, with a further router and a server behind the core. There are no X2 links. numUe1 to numUe5 LteUe terminals attach per cell, and an EventGenerator and a MultihopD2DStatistics module sit beside them, wired to nothing. |
| MultiCell_X2Mesh | network |
Three eNodeB cells in a full X2 mesh. Each reaches the EPC PgwStandard through a router of its own, and the server sits directly on the PgwStandard's data-network gate. numUe1, numUe2 and numUe3 LteUe terminals attach per cell, and numExtCells ExtCell cells can be added as interferers. |
| SingleCell | network |
The minimal LTE topology: one eNodeB connected to an EPC PgwStandard, which faces a router and a server, plus numUe LteUe terminals. |
| SingleCell_D2D | network |
SingleCell with its UEs split into three vectors, so that a configuration can address cellular terminals (ueCell), D2D transmitters (ueD2DTx) and D2D receivers (ueD2DRx) separately. The rest of the topology is the same: one eNodeB on an EPC PgwStandard, with a router and a server behind it. |
| SingleCell_D2DMulticast | network |
SingleCell with its UEs split into cellular terminals (ueCell) and members of a D2D multicast group (ueD2D). The rest of the topology is the same: one eNodeB on an EPC PgwStandard, with a router and a server behind it. |
Known subclasses
| Name | Type | Description |
|---|---|---|
| LteCar | compound module |
Defines a LteCar node as a LTE User Equipment (UE) with vehicular-like mobility. This behavior is modeled by utilizing the Veins-Inet project. |
| 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 |
Properties
| Name | Value | Description |
|---|---|---|
| networkNode | ||
| display | i=device/pocketpc;bgb=858,659 |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| radioIn | 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
// // Models a User Equipment (UE) in a 4G LTE network. It is a host equipped with // an LTE Network Interface Card (NIC), allowing the UE to connect to an ~eNodeB module via the // Radio Access Network (RAN) of the LTE network and communicate with any other host in the system. // In addition to a NIC submodule, this compound module includes all the higher layers of the protocol stack, // from IP to application modules. It supports a configurable number of UDP and TCP applications. It // also features an Ethernet interface, which is utilized in real-time emulation mode to connect the UE // to the real network (outside the simulator) via a virtual Ethernet interface. // module LteUe { parameters: @networkNode(); @display("i=device/pocketpc;bgb=858,659"); @figure[applicationLayer](type=rectangle; pos=250,6; size=600,130; lineColor=#808080; cornerRadius=5; fillColor=#ffff00; fillOpacity=0.1); @figure[applicationLayer.title](type=text; pos=845,11; anchor=ne; text="application layer"); @figure[transportLayer](type=rectangle; pos=250,156; size=600,130; fillColor=#ff0000; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); @figure[transportLayer.title](type=text; pos=845,161; anchor=ne; text="transport layer"); @figure[networkLayer](type=rectangle; pos=250,306; size=600,130; fillColor=#00ff00; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); @figure[networkLayer.title](type=text; pos=845,311; anchor=ne; text="network layer"); @figure[linkLayer](type=rectangle; pos=250,456; size=600,130; fillColor=#0000ff; lineColor=#808080; cornerRadius=5; fillOpacity=0.1); @figure[linkLayer.title](type=text; pos=845,461; anchor=ne; text="link layer"); @figure[submodules]; //# Apps int numApps = default(0); // Number of apps // Set the app types in the ini file, e.g. app[0..1].typename="UdpVideoStreamClient" //# Transport layer bool hasUdp = default(firstAvailableOrEmpty("Udp") != ""); bool hasTcp = default(firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc") != ""); bool hasSctp = default(false); //# Node specs string nodeType = "UE"; // DO NOT CHANGE int servingNodeId = default(0); // The initial serving eNodeB of the UE; 0 if none int macNodeId = default(1025+simu5g_seq("LteUe_macNodeId")); //# D2D support: selects the D2D-capable NIC variant (see the cellularNic submodule). //# An explicit cellularNic.typename in the ini file still overrides this. bool hasD2D = default(false); //# Network Layer specs bool hasIpv4 = default(true); bool hasIpv6 = default(false); *.interfaceTableModule = default(absPath(".interfaceTable")); *.routingTableModule = default("^.ipv4.routingTable"); *.mobilityModule = default(absPath(".mobility")); //# External Ethernet interfaces int numEthInterfaces = default(0); string extHostAddress = default(""); //# Loopback interfaces int numLoInterfaces = default(1); //# PcapRecorders int numPcapRecorders = default(0); // Number of PcapRecorders bool hasRniSupport = default(false); cellularNic.mac.collectorModule = hasRniSupport ? "^.^.ueCollector" : ""; cellularNic.rrc.handoverController.hasCollector = hasRniSupport; gates: input radioIn @directIn; // Connection to master submodules: interfaceTable: InterfaceTable { @display("p=127,257;is=s"); } mobility: <default("StationaryMobility")> like IMobility { @display("p=127,172;is=s"); } //# layer submodules (must be ordered from lower to upper layers) //# link layer lo[numLoInterfaces]: <default("LoopbackInterface")> like ILoopbackInterface { parameters: @display("p=503,590,row,150"); } cellularNic: <default(hasD2D ? "LteNicUeD2D" : "LteNicUe")> like ICellularNic { nodeType = parent.nodeType; @display("p=355,589"); } //# ethernet interface used for communicating with external applications in emulation mode eth[numEthInterfaces]: <default("ExtLowerEthernetInterface")> like IEthernetInterface { parameters: @display("p=674,590,row,150;q=txQueue"); } encap: <default("EthernetEncapsulation")> like IEthernetLayer if typename != "" { parameters: registerProtocol = true; @display("p=674,500"); } //# network layer ipv4: <default("Ipv4NetworkLayer")> like INetworkLayer if hasIpv4 { parameters: @display("p=375,376;q=queue"); } ipv6: <default("Ipv6NetworkLayer")> like INetworkLayer if hasIpv6 { parameters: @display("p=525,376;q=queue"); } //# transport layer udp: <default(firstAvailableOrEmpty("Udp"))> like IUdp if hasUdp { parameters: @display("p=375,226"); } tcp: <default(firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc"))> like ITcp if hasTcp { parameters: @display("p=525,226"); } sctp: <default(firstAvailableOrEmpty("Sctp"))> like ISctp if hasSctp { parameters: @display("p=675,226"); } //# app layer app[numApps]: <> like IApp { @display("p=374,72,row,140"); } //# message dispatcher for SAP between application and transport layer at: MessageDispatcher { parameters: @display("p=550,146;b=600,5,,,,1"); } //# message dispatcher for SAP between transport and network layer tn: MessageDispatcher { parameters: @display("p=550,300;b=600,5,,,,1"); } //# message dispatcher for SAP to link layer nl: MessageDispatcher { parameters: @display("p=550,446;b=600,5,,,,1"); } //# PcapRecorders pcapRecorder[numPcapRecorders]: PcapRecorder { @display("p=126,346,r,10"); } //# UeStatsCollector - for MEC ueCollector: UeStatsCollector if hasRniSupport { @display("p=126,588;is=s"); } connections allowunconnected: //# //# Internal Tcp/Udp applications connections with transport layer //# for i=0..numApps-1 { app[i].socketOut --> at.in++; app[i].socketIn <-- at.out++; } at.out++ --> udp.appIn if hasUdp; at.in++ <-- udp.appOut if hasUdp; at.out++ --> tcp.appIn if hasTcp; at.in++ <-- tcp.appOut if hasTcp; at.out++ --> sctp.appIn if hasSctp; at.in++ <-- sctp.appOut if hasSctp; //# //# Internal transport layer connections to network layer //# udp.ipOut --> tn.in++ if hasUdp; udp.ipIn <-- tn.out++ if hasUdp; tcp.ipOut --> tn.in++ if hasTcp; tcp.ipIn <-- tn.out++ if hasTcp; sctp.ipOut --> tn.in++ if hasSctp; tn.out++ --> sctp.ipIn if hasSctp; ipv4.ifIn <-- nl.out++ if hasIpv4; ipv4.ifOut --> nl.in++ if hasIpv4; ipv4.transportIn <-- tn.out++ if hasIpv4; ipv4.transportOut --> tn.in++ if hasIpv4; ipv6.ifIn <-- nl.out++ if hasIpv6; ipv6.ifOut --> nl.in++ if hasIpv6; ipv6.transportIn <-- tn.out++ if hasIpv6; ipv6.transportOut --> tn.in++ if hasIpv6; tn.out++ --> nl.in++; tn.in++ <-- nl.out++; //# //# Internal link layer connections to network layer //# cellularNic.upperLayerOut --> nl.in++; cellularNic.upperLayerIn <-- nl.out++; for i=0..numEthInterfaces-1 { encap.lowerLayerOut --> eth[i].upperLayerIn; encap.lowerLayerIn <-- eth[i].upperLayerOut; } encap.upperLayerOut --> nl.in++ if numEthInterfaces != 0; encap.upperLayerIn <-- nl.out++ if numEthInterfaces != 0; for i=0..numLoInterfaces-1 { nl.out++ --> lo[i].upperLayerIn; lo[i].upperLayerOut --> nl.in++; } //# //# Connections between LTE/NR NIC and the radio medium //# cellularNic.radioIn <-- radioIn; }File: src/simu5g/nodes/LteUe.ned