From d117a43a01385932f4bbf6ccb9c6986d9515e444 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 23 Apr 2024 14:32:03 +0200 Subject: [PATCH 01/31] LteMacEnb: check all accepted amcType value, throws error when not recognized it. --- src/stack/mac/layer/LteMacEnb.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stack/mac/layer/LteMacEnb.cc b/src/stack/mac/layer/LteMacEnb.cc index f3be7b19b..5ca7edf1d 100644 --- a/src/stack/mac/layer/LteMacEnb.cc +++ b/src/stack/mac/layer/LteMacEnb.cc @@ -164,8 +164,10 @@ void LteMacEnb::initialize(int stage) std::string amcType = par("amcType").stdstringValue(); if (amcType.compare("NRAmc") == 0) amc_ = new NRAmc(this, binder_, cellInfo_, numAntennas_); - else + else if (amcType.compare("LteAmc") == 0) amc_ = new LteAmc(this, binder_, cellInfo_, numAntennas_); + else + throw cRuntimeError("The amcType '%s' not recognized", amcType.c_str()); std::string modeString = par("pilotMode").stdstringValue(); From 082eae4c7382b000c1aa3c6d75409aea55d4102c Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Mon, 15 Apr 2024 11:52:10 +0200 Subject: [PATCH 02/31] CbrSender, VoIPSender: rename 'PacketSize' parameter to 'packetSize' --- src/apps/cbr/CbrSender.cc | 2 +- src/apps/cbr/CbrSender.ned | 2 +- src/apps/voip/VoIPSender.cc | 2 +- src/apps/voip/VoIPSender.ned | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/cbr/CbrSender.cc b/src/apps/cbr/CbrSender.cc index 21f56b6b0..27a799772 100644 --- a/src/apps/cbr/CbrSender.cc +++ b/src/apps/cbr/CbrSender.cc @@ -50,7 +50,7 @@ void CbrSender::initialize(int stage) nframesTmp_ = 0; iDframe_ = 0; timestamp_ = 0; - size_ = par("PacketSize"); + size_ = par("packetSize"); sampling_time = par("sampling_time"); localPort_ = par("localPort"); destPort_ = par("destPort"); diff --git a/src/apps/cbr/CbrSender.ned b/src/apps/cbr/CbrSender.ned index ef108dfd3..51c14c5d9 100644 --- a/src/apps/cbr/CbrSender.ned +++ b/src/apps/cbr/CbrSender.ned @@ -20,7 +20,7 @@ simple CbrSender like IApp int localPort = default(-1); int destPort = default(3000); string destAddress; - int PacketSize @unit(B) = default(40B); + int packetSize @unit(B) = default(40B); double sampling_time @unit("s") = default(0.02s); double startTime @unit("s") = default(0s); double finishTime @unit("s") = default(0s); diff --git a/src/apps/voip/VoIPSender.cc b/src/apps/voip/VoIPSender.cc index 10cab5007..d05543a80 100644 --- a/src/apps/voip/VoIPSender.cc +++ b/src/apps/voip/VoIPSender.cc @@ -55,7 +55,7 @@ void VoIPSender::initialize(int stage) nframesTmp_ = 0; iDframe_ = 0; timestamp_ = 0; - size_ = par("PacketSize"); + size_ = par("packetSize"); sampling_time = par("sampling_time"); selfSender_ = new cMessage("selfSender"); localPort_ = par("localPort"); diff --git a/src/apps/voip/VoIPSender.ned b/src/apps/voip/VoIPSender.ned index fe38e97f2..d550bda9e 100644 --- a/src/apps/voip/VoIPSender.ned +++ b/src/apps/voip/VoIPSender.ned @@ -20,7 +20,7 @@ simple VoIPSender like IApp int localPort = default(-1); int destPort = default(3000); string destAddress; - int PacketSize @unit(B) = default(40B); + int packetSize @unit(B) = default(40B); double shape_talk @unit(s) = default(0.824s); // params for Weibull distribution double scale_talk @unit(s) = default(1.423s); double shape_sil @unit(s) = default(1.089s); From 49214bca79703f7a533cf82f48bb87c6c99f4e2c Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Mon, 15 Apr 2024 11:52:36 +0200 Subject: [PATCH 03/31] simulations: follow "CbrSender, VoIPSender: rename 'PacketSize' parameter to 'packetSize'" --- simulations/LTE/d2d/omnetpp.ini | 2 +- simulations/LTE/demo/omnetpp.ini | 18 +++++++++--------- simulations/LTE/multicell/omnetpp.ini | 2 +- simulations/NR/bgTraffic/omnetpp.ini | 8 ++++---- simulations/NR/d2d/omnetpp.ini | 6 +++--- simulations/NR/dualConnectivity/omnetpp.ini | 2 +- .../NR/dualConnectivity_multicell/omnetpp.ini | 10 +++++----- simulations/NR/standalone/omnetpp.ini | 4 ++-- .../NR/standalone_multicell/omnetpp.ini | 4 ++-- simulations/NR/test_multiCarrier/omnetpp.ini | 4 ++-- simulations/NR/test_tdd/omnetpp.ini | 2 +- simulations/NR/tutorial/omnetpp.ini | 2 +- 12 files changed, 32 insertions(+), 32 deletions(-) diff --git a/simulations/LTE/d2d/omnetpp.ini b/simulations/LTE/d2d/omnetpp.ini index b3d0a4c15..40c1f6d9c 100644 --- a/simulations/LTE/d2d/omnetpp.ini +++ b/simulations/LTE/d2d/omnetpp.ini @@ -517,7 +517,7 @@ output-vector-file = ${resultdir}/${configname}/pos2=${pos2}-${repetition}.vec # Transmitter *.ueD2DTx[0].app[*].typename = "VoIPSender" *.ueD2DTx[0].app[*].silences = false -*.ueD2DTx[0].app[*].PacketSize = 2500B +*.ueD2DTx[0].app[*].packetSize = 2500B *.ueD2DTx[0].app[*].sampling_time = 0.001s *.ueD2DTx[0].app[*].localPort = 3088+ancestorIndex(0) *.ueD2DTx[0].app[*].startTime = uniform(0s,0.02s) diff --git a/simulations/LTE/demo/omnetpp.ini b/simulations/LTE/demo/omnetpp.ini index 4ed9ef726..d9f0815c2 100644 --- a/simulations/LTE/demo/omnetpp.ini +++ b/simulations/LTE/demo/omnetpp.ini @@ -79,7 +79,7 @@ description = 4 Ues downloading a video from a server while 2 of them having a v **.ue2*.macCellId = 2 # VoIP source config -**.ue11.app[1].PacketSize = 40B +**.ue11.app[1].packetSize = 40B **.ue11.app[1].destAddress = "ue22" **.ue11.app[1].destPort = 1000 **.ue11.app[1].localPort = 3088 @@ -139,7 +139,7 @@ network = simu5g.simulations.LTE.networks.SingleCell *.ue[*].app[*].typename = "VoIPReceiver" *.ue[*].app[0].localPort = 3000 -*.server.app[*].PacketSize = 40B +*.server.app[*].packetSize = 40B *.server.app[*].destAddress = "ue["+string(ancestorIndex(0))+"]" # obtain the address of the client by reading its index in the array of udp Apps *.server.app[*].destPort = 3000 *.server.app[*].localPort = 3088+ancestorIndex(0) @@ -189,7 +189,7 @@ network = simu5g.simulations.LTE.networks.SingleCell *.server.app[0..24].typename = "VoIPReceiver" *.server.app[0..24].localPort = 4000+ancestorIndex(0) -*.ue[*].app[1].PacketSize = 40B +*.ue[*].app[1].packetSize = 40B *.ue[*].app[1].destAddress = "server" *.ue[*].app[1].destPort = 4000+ancestorIndex(1) *.ue[*].app[1].localPort = 4088 @@ -202,7 +202,7 @@ network = simu5g.simulations.LTE.networks.SingleCell *.ue[*].app[0].localPort = 3000 *.server.app[25..].typename = "VoIPSender" -*.server.app[25..].PacketSize = 40B +*.server.app[25..].packetSize = 40B *.server.app[25..].destAddress = "ue["+string(ancestorIndex(0)-25)+"]" *.server.app[25..].destPort = 3000 *.server.app[25..].localPort = 3088+ancestorIndex(0) @@ -256,7 +256,7 @@ sim-time-limit=20s *.ue[*].app[0].localPort = 3000 *.server.app[*].typename = "VoIPSender" -*.server.app[*].PacketSize = 40B +*.server.app[*].packetSize = 40B *.server.app[*].destAddress = "ue["+string(ancestorIndex(0))+"]" # obtain the address of the client by reading its index in the array of udp Apps *.server.app[*].destPort = 3000 *.server.app[*].localPort = 3088+ancestorIndex(0) @@ -296,7 +296,7 @@ sim-time-limit=20s *.server.app[*].typename = "VoIPReceiver" *.server.app[*].localPort = 3000+ancestorIndex(0) -*.ue[*].app[*].PacketSize = 40B +*.ue[*].app[*].packetSize = 40B # obtain the address of the client by reading its index in the array of udp Apps *.ue[*].app[*].destAddress = "server" *.ue[*].app[*].destPort = 3000+ancestorIndex(1) @@ -331,7 +331,7 @@ description = Constant BitRate (CBR) uplink scenario **.ue[*].app[*].startTime = uniform(0s, 0.02s) **.ue[*].app[*].finishTime = ${cbrEnd} **.ue[*].app[*].sampling_time = 0.02s -**.ue[*].app[*].PacketSize = 100B +**.ue[*].app[*].packetSize = 100B **.server.app[*].typename = "CbrReceiver" **.server.app[*].localPort = 3000+ancestorIndex(0) @@ -364,7 +364,7 @@ description = Constant BitRate (CBR) downlink scenario **.server.app[*].startTime = uniform(0s, 0.02s) **.server.app[*].finishTime = ${cbrEnd} **.server.app[*].sampling_time = 0.02s -**.server.app[*].PacketSize = 100B +**.server.app[*].packetSize = 100B @@ -389,7 +389,7 @@ seed-set = ${repetition} **.schedulingDisciplineDl = ${sched="PF","MAXCI"} **.numUe = ${numUEs=50,100,150} -*.server.app[*].PacketSize = ${pktSize=30B,40B,50B,60B} +*.server.app[*].packetSize = ${pktSize=30B,40B,50B,60B} *.server.numApps = ${numUEs} diff --git a/simulations/LTE/multicell/omnetpp.ini b/simulations/LTE/multicell/omnetpp.ini index 5e7083431..359d9fe44 100644 --- a/simulations/LTE/multicell/omnetpp.ini +++ b/simulations/LTE/multicell/omnetpp.ini @@ -60,7 +60,7 @@ seed-set = ${repetition} *.ue*.app[*].typename = "VoIPReceiver" *.ue*.app[0].localPort = 3000 -*.server.app[*].PacketSize = 40B +*.server.app[*].packetSize = 40B *.server.app[0].destAddress = "ue11" *.server.app[1].destAddress = "ue12" *.server.app[2].destAddress = "ue21" diff --git a/simulations/NR/bgTraffic/omnetpp.ini b/simulations/NR/bgTraffic/omnetpp.ini index cfe258274..34700d1b9 100644 --- a/simulations/NR/bgTraffic/omnetpp.ini +++ b/simulations/NR/bgTraffic/omnetpp.ini @@ -154,7 +154,7 @@ description = "CBR Downlink (standalone, with background traffic)" *.ue[*].app[0].localPort = 3000 *.server.app[*].typename = "CbrSender" -*.server.app[*].PacketSize = ${msgLen=1000B} +*.server.app[*].packetSize = ${msgLen=1000B} *.server.app[*].sampling_time = ${sndInt=0.01s} *.server.app[*].destAddress = "ue[0]" *.server.app[*].startTime = uniform(0s,0.05s) @@ -200,7 +200,7 @@ description = "CBR Uplink (standalone, with background traffic)" *.ue[*].app[*].typename = "CbrSender" *.ue[*].app[*].destAddress = "server" -*.ue[*].app[*].PacketSize = ${msgLen=1000B} +*.ue[*].app[*].packetSize = ${msgLen=1000B} *.ue[*].app[*].sampling_time = ${sndInt=0.01s} *.ue[*].app[*].startTime = uniform(0s,0.05s) *.ue[*].app[*].finishTime = 19s @@ -246,7 +246,7 @@ description = "CBR Downlink and Uplink (standalone, with background traffic)" *.ue[*].app[0].localPort = 3000 *.server.app[0].typename = "CbrSender" -*.server.app[0].PacketSize = ${msgLen=1000B} +*.server.app[0].packetSize = ${msgLen=1000B} *.server.app[0].sampling_time = ${sndInt=0.01s} *.server.app[0].destAddress = "ue[0]" *.server.app[0].destPort = 3000 @@ -261,7 +261,7 @@ description = "CBR Downlink and Uplink (standalone, with background traffic)" *.ue[*].app[1].typename = "CbrSender" *.ue[*].app[1].destAddress = "server" *.ue[*].app[1].destPort = 3001 -*.ue[*].app[1].PacketSize = ${msgLen} +*.ue[*].app[1].packetSize = ${msgLen} *.ue[*].app[1].sampling_time = ${sndInt} *.ue[*].app[1].startTime = uniform(0s,0.05s) *.ue[*].app[1].finishTime = 19s diff --git a/simulations/NR/d2d/omnetpp.ini b/simulations/NR/d2d/omnetpp.ini index 0851defde..18a281f1d 100644 --- a/simulations/NR/d2d/omnetpp.ini +++ b/simulations/NR/d2d/omnetpp.ini @@ -80,7 +80,7 @@ extends=SinglePair # Traffic between UEs (ueD2DTx[0] --> ueD2DRx[0]) # Transmitter *.ueD2DTx[0].app[*].typename = "CbrSender" -*.ueD2DTx[0].app[*].PacketSize = 1000B +*.ueD2DTx[0].app[*].packetSize = 1000B *.ueD2DTx[0].app[*].sampling_time = 0.01s *.ueD2DTx[0].app[*].localPort = 3088+ancestorIndex(0) *.ueD2DTx[0].app[*].startTime = uniform(0s,0.02s) @@ -221,7 +221,7 @@ extends=MultiplePairs # Traffic between pairs of UEs (e.g. ueD2DTx[0] --> ueD2DRx[0] ) # Transmitters *.ueD2DTx[*].app[*].typename = "CbrSender" -*.ueD2DTx[*].app[*].PacketSize = 1000B +*.ueD2DTx[*].app[*].packetSize = 1000B *.ueD2DTx[*].app[*].sampling_time = 0.01s *.ueD2DTx[*].app[*].localPort = 3088+ancestorIndex(0) *.ueD2DTx[*].app[*].startTime = uniform(0s,0.02s) @@ -422,7 +422,7 @@ extends=SinglePair-modeSwitching # Traffic between UEs (ueD2DTx[0] --> ueD2DRx[0]) # Transmitter *.ueD2DTx[0].app[*].typename = "CbrSender" -*.ueD2DTx[0].app[*].PacketSize = 1000B +*.ueD2DTx[0].app[*].packetSize = 1000B *.ueD2DTx[0].app[*].sampling_time = 0.01s *.ueD2DTx[0].app[*].localPort = 3088+ancestorIndex(0) *.ueD2DTx[0].app[*].startTime = uniform(0s,0.02s) diff --git a/simulations/NR/dualConnectivity/omnetpp.ini b/simulations/NR/dualConnectivity/omnetpp.ini index 1eeba6305..b05c7d533 100644 --- a/simulations/NR/dualConnectivity/omnetpp.ini +++ b/simulations/NR/dualConnectivity/omnetpp.ini @@ -109,7 +109,7 @@ description = "Base configuration, do not run this config!" *.ue[*].app[*].localPort = 3000+ancestorIndex(0) *.server.app[*].typename = "VoIPSender" -*.server.app[*].PacketSize = 40B +*.server.app[*].packetSize = 40B *.server.app[*].destAddress = "ue[0]" # obtain the address of the client by reading its index in the array of udp Apps *.server.app[*].localPort = 3088+ancestorIndex(0) *.server.app[*].destPort = 3000+ancestorIndex(0) diff --git a/simulations/NR/dualConnectivity_multicell/omnetpp.ini b/simulations/NR/dualConnectivity_multicell/omnetpp.ini index 3d8f09b47..c7ca485c8 100644 --- a/simulations/NR/dualConnectivity_multicell/omnetpp.ini +++ b/simulations/NR/dualConnectivity_multicell/omnetpp.ini @@ -172,7 +172,7 @@ description = "one CBR downlink connection - if gNB out of range, use eNB" *.server.app[*].destAddress = "ue[" + string(ancestorIndex(0)) + "]" # obtain the address of the client by reading its index in the array of apps *.server.app[*].localPort = 3088+ancestorIndex(0) *.server.app[*].destPort = 3000 -*.server.app[*].PacketSize = 1000B +*.server.app[*].packetSize = 1000B *.server.app[*].sampling_time = 0.05s *.server.app[*].startTime = uniform(0.02s, 0.05s) *.server.app[*].finishTime = 39.9s @@ -204,7 +204,7 @@ description = "one CBR uplink connection - if gNB out of range, use eNB" *.ue[*].app[*].typename = "CbrSender" *.ue[*].app[*].destAddress = "server" -*.ue[*].app[*].PacketSize = 1000B +*.ue[*].app[*].packetSize = 1000B *.ue[*].app[*].sampling_time = 0.05s *.ue[*].app[*].localPort = 3088 *.ue[*].app[*].destPort = 3000 @@ -236,7 +236,7 @@ description = "two CBR downlink connections - one via eNodeB, one via gNodeB" *.server.app[*].destAddress = "ue[0]" # obtain the address of the client by reading its index in the array of apps *.server.app[*].localPort = 3088+ancestorIndex(0) *.server.app[*].destPort = 3000+ancestorIndex(0) -*.server.app[*].PacketSize = 1000B +*.server.app[*].packetSize = 1000B *.server.app[*].sampling_time = 0.05s *.server.app[*].startTime = uniform(0.02s, 0.05s) *.server.app[*].finishTime = 39.9s @@ -266,7 +266,7 @@ description = "two CBR uplink connections - one via eNodeB, one via gNodeB" *.ue[*].app[*].typename = "CbrSender" *.ue[*].app[*].destAddress = "server" -*.ue[*].app[*].PacketSize = 1000B +*.ue[*].app[*].packetSize = 1000B *.ue[*].app[*].sampling_time = 0.05s *.ue[*].app[*].localPort = 3088+ancestorIndex(0) *.ue[*].app[*].destPort = 3000+ancestorIndex(0) @@ -300,7 +300,7 @@ description = "one CBR downlink, split bearer" *.server.app[*].destAddress = "ue[" + string(ancestorIndex(0)) + "]" # obtain the address of the client by reading its index in the array of apps *.server.app[*].localPort = 3088+ancestorIndex(0) *.server.app[*].destPort = 3000 -*.server.app[*].PacketSize = 1000B +*.server.app[*].packetSize = 1000B *.server.app[*].sampling_time = 0.05s *.server.app[*].startTime = uniform(0.02s, 0.05s) *.server.app[*].finishTime = 39.9s diff --git a/simulations/NR/standalone/omnetpp.ini b/simulations/NR/standalone/omnetpp.ini index 2673cfa29..8aa4b11ff 100644 --- a/simulations/NR/standalone/omnetpp.ini +++ b/simulations/NR/standalone/omnetpp.ini @@ -81,7 +81,7 @@ extends=Standalone *.ue[*].app[*].typename = "VoIPReceiver" *.ue[*].app[0].localPort = 3000 -*.server.app[*].PacketSize = 40B +*.server.app[*].packetSize = 40B *.server.app[*].destAddress = "ue[0]" # obtain the address of the client by reading its index in the array of udp Apps *.server.app[*].localPort = 3088+ancestorIndex(0) *.server.app[*].typename = "VoIPSender" @@ -108,7 +108,7 @@ extends=Standalone *.server.app[*].typename = "VoIPReceiver" *.server.app[*].localPort = 3000+ancestorIndex(0) -*.ue[*].app[*].PacketSize = 40B +*.ue[*].app[*].packetSize = 40B # obtain the address of the client by reading its index in the array of udp Apps *.ue[*].app[*].destAddress = "server" *.ue[*].app[*].localPort = 3088+ancestorIndex(0) diff --git a/simulations/NR/standalone_multicell/omnetpp.ini b/simulations/NR/standalone_multicell/omnetpp.ini index e79ba5bc7..000188178 100644 --- a/simulations/NR/standalone_multicell/omnetpp.ini +++ b/simulations/NR/standalone_multicell/omnetpp.ini @@ -110,7 +110,7 @@ description = "CBR DL traffic from remote server to UEs" *.ue[*].app[*].localPort = 3000 *.server.app[*].typename = "CbrSender" -*.server.app[*].PacketSize = 100B +*.server.app[*].packetSize = 100B *.server.app[*].sampling_time = 0.02s *.server.app[*].destAddress = "ue[" + string(ancestorIndex(0)) + "]" *.server.app[*].destPort = 3000 @@ -142,7 +142,7 @@ description = "CBR UL traffic from UEs to remote server" *.server.app[*].localPort = 3000 + ancestorIndex(0) *.ue[*].app[*].typename = "CbrSender" -*.ue[*].app[*].PacketSize = 100B +*.ue[*].app[*].packetSize = 100B *.ue[*].app[*].sampling_time = 0.02s *.ue[*].app[*].destAddress = "server" *.ue[*].app[*].destPort = 3000 + ancestorIndex(1) diff --git a/simulations/NR/test_multiCarrier/omnetpp.ini b/simulations/NR/test_multiCarrier/omnetpp.ini index 8af4daa34..3a3d20302 100644 --- a/simulations/NR/test_multiCarrier/omnetpp.ini +++ b/simulations/NR/test_multiCarrier/omnetpp.ini @@ -89,7 +89,7 @@ output-vector-file = ${resultdir}/${configname}/${iterationvars}-${repetition}.v *.server.app[*].localPort = 3088+ancestorIndex(0) *.server.app[*].typename = "CbrSender" *.server.app[*].startTime = uniform(0.01s,0.02s) -*.server.app[*].PacketSize = 2000B +*.server.app[*].packetSize = 2000B #------------------------------------# @@ -110,7 +110,7 @@ output-vector-file = ${resultdir}/${configname}/${iterationvars}-${repetition}.v *.ue[*].app[*].destPort = 1000+ancestorIndex(1) *.ue[*].app[*].typename = "CbrSender" *.ue[*].app[*].startTime = uniform(0s,0.02s) -*.ue[*].app[*].PacketSize = 2000B +*.ue[*].app[*].packetSize = 2000B #------------------------------------# #------------------------------------# diff --git a/simulations/NR/test_tdd/omnetpp.ini b/simulations/NR/test_tdd/omnetpp.ini index 4e738b1f4..9198a383b 100644 --- a/simulations/NR/test_tdd/omnetpp.ini +++ b/simulations/NR/test_tdd/omnetpp.ini @@ -103,7 +103,7 @@ network = simu5g.simulations.NR.networks.SingleCell_withSecondaryGnb *.ue[*].app[*].typename = "CbrReceiver" *.ue[*].app[0].localPort = 10000 -*.server.app[*].PacketSize = 3000B +*.server.app[*].packetSize = 3000B *.server.app[*].sampling_time = 0.001s *.server.app[*].destAddress = "ue["+string(ancestorIndex(0))+"]" # obtain the address of the client by reading its index in the array of udp Apps *.server.app[*].destPort = 10000 diff --git a/simulations/NR/tutorial/omnetpp.ini b/simulations/NR/tutorial/omnetpp.ini index 09be85692..58d6a12ab 100644 --- a/simulations/NR/tutorial/omnetpp.ini +++ b/simulations/NR/tutorial/omnetpp.ini @@ -63,7 +63,7 @@ output-vector-file = ${resultdir}/${configname}/${repetition}.vec *.ue[*].app[*].localPort = 1000 *.server.app[*].typename = "CbrSender" -*.server.app[*].PacketSize = 1000B # send 800 Kb/s +*.server.app[*].packetSize = 1000B # send 800 Kb/s *.server.app[*].sampling_time = 0.01s *.server.app[*].destAddress = "ue["+string(ancestorIndex(0))+"]" # obtain the address of the client by reading its index in the array of Apps *.server.app[*].destPort = 1000 From 484084463ddb3e99283db1201418f83c6c85afbe Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 16 Apr 2024 11:04:06 +0200 Subject: [PATCH 04/31] MecAppBase: fixed uninitialized pointer in HttpMessageStatus::processMsgTimer --- src/apps/mec/MecApps/MecAppBase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/mec/MecApps/MecAppBase.h b/src/apps/mec/MecApps/MecAppBase.h index 9c49f6424..058f81995 100644 --- a/src/apps/mec/MecApps/MecAppBase.h +++ b/src/apps/mec/MecApps/MecAppBase.h @@ -49,7 +49,7 @@ struct HttpMessageStatus HttpBaseMessage *currentMessage = nullptr; std::string bufferedData; cQueue httpMessageQueue; - ProcessingTimeMessage* processMsgTimer; + ProcessingTimeMessage* processMsgTimer = nullptr; }; class MecAppBase : public omnetpp::cSimpleModule, public inet::TcpSocket::ICallback From b5f75ed7817fdb8ba501104fa8f17fb02378652a Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Fri, 19 Apr 2024 12:21:53 +0200 Subject: [PATCH 05/31] UERequestApp: fixed documentation --- src/apps/mec/MecRequestResponseApp/UERequestApp.ned | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/mec/MecRequestResponseApp/UERequestApp.ned b/src/apps/mec/MecRequestResponseApp/UERequestApp.ned index 521d91cf8..cedb6b524 100644 --- a/src/apps/mec/MecRequestResponseApp/UERequestApp.ned +++ b/src/apps/mec/MecRequestResponseApp/UERequestApp.ned @@ -25,8 +25,8 @@ simple UERequestApp like IApp //connection infos int localPort = default(4000); - int deviceAppPort = default(4000); // ipAddress of the DeviceApp - string deviceAppAddress; // port of the DeviceApp + int deviceAppPort = default(4000); // port of the DeviceApp + string deviceAppAddress; // ipAddress of the DeviceApp int requestPacketSize @unit(B) = default(10B); From c97285d45905e5b9178ffb02cad41795412ab2d3 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Fri, 19 Apr 2024 12:23:11 +0200 Subject: [PATCH 06/31] LteNicBase: fixed delegation of interfaceTableModule, routingTableModule parameters --- src/stack/LteNicBase.ned | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/stack/LteNicBase.ned b/src/stack/LteNicBase.ned index 41183494e..aee1bdd7c 100644 --- a/src/stack/LteNicBase.ned +++ b/src/stack/LteNicBase.ned @@ -53,6 +53,8 @@ module LteNicBase extends NetworkInterface like ICellularNic int numCarriers = default(1); string address @mutable = default("auto"); + *.interfaceTableModule = default(absPath(this.interfaceTableModule)); + *.routingTableModule = default(absPath(this.routingTableModule)); gates: //# @@ -70,8 +72,6 @@ module LteNicBase extends NetworkInterface like ICellularNic // bridge between radio nic and network layer ip2nic: like INetworkLayer2CellularNic { nodeType = parent.nodeType; - interfaceTableModule = parent.interfaceTableModule; - routingTableModule = parent.routingTableModule; @display("p=362,67"); } // PDCP-RRC Layer @@ -85,7 +85,6 @@ module LteNicBase extends NetworkInterface like ICellularNic } // MAC Layer mac: like LteMac { - interfaceTableModule = parent.interfaceTableModule; @display("p=363,314"); } // LtePhy submodule From d32ab250951022e2908ae54579fe60d2eba6a3fa Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Fri, 19 Apr 2024 12:51:54 +0200 Subject: [PATCH 07/31] apps: mec: remove unused interfaceTableModule parameter --- .../MecApps/MecRequestBackgroundApp/MecRequestBackgroundApp.ned | 1 - .../MecRequestBackgroundGeneratorApp.ned | 1 - .../MecApps/MecRequestForegroundApp/MecRequestForegroundApp.ned | 1 - src/apps/mec/MecRequestResponseApp/MECResponseApp.ned | 1 - src/apps/mec/MecRequestResponseApp/UERequestApp.ned | 2 -- .../RealTimeVideoStreamingApp/MecRTVideoStreamingReceiver.ned | 1 - .../mec/RealTimeVideoStreamingApp/RTVideoStreamingSender.ned | 1 - src/apps/mec/RnisTestApp/MecRnisTestApp.ned | 2 -- src/apps/mec/RnisTestApp/UeRnisTestApp.ned | 1 - src/apps/mec/WarningAlert/MECWarningAlertApp.ned | 1 - src/apps/mec/WarningAlert/UEWarningAlertApp.ned | 1 - 11 files changed, 13 deletions(-) diff --git a/src/apps/mec/MecApps/MecRequestBackgroundApp/MecRequestBackgroundApp.ned b/src/apps/mec/MecApps/MecRequestBackgroundApp/MecRequestBackgroundApp.ned index af70e0ef3..c406288e8 100644 --- a/src/apps/mec/MecApps/MecRequestBackgroundApp/MecRequestBackgroundApp.ned +++ b/src/apps/mec/MecApps/MecRequestBackgroundApp/MecRequestBackgroundApp.ned @@ -22,7 +22,6 @@ simple MecRequestBackgroundApp like IMECApp, IApp bool allocateHostResources = default(false); int packetSize @unit(B) = default(10B); - string interfaceTableModule = default(""); int mecAppIndex = default(0); int mecAppId = default(0); // it will be override by getId() in initialize diff --git a/src/apps/mec/MecApps/MecRequestBackgroundGeneratorApp/MecRequestBackgroundGeneratorApp.ned b/src/apps/mec/MecApps/MecRequestBackgroundGeneratorApp/MecRequestBackgroundGeneratorApp.ned index 3228cfb13..a47f97708 100644 --- a/src/apps/mec/MecApps/MecRequestBackgroundGeneratorApp/MecRequestBackgroundGeneratorApp.ned +++ b/src/apps/mec/MecApps/MecRequestBackgroundGeneratorApp/MecRequestBackgroundGeneratorApp.ned @@ -26,7 +26,6 @@ simple MecRequestBackgroundGeneratorApp like IMECApp, IApp bool allocateHostResources = default(false); int packetSize @unit(B) = default(10B); - string interfaceTableModule = default(""); int mecAppIndex = default(0); int mecAppId = default(0); // it will be override by getId() in initialize diff --git a/src/apps/mec/MecApps/MecRequestForegroundApp/MecRequestForegroundApp.ned b/src/apps/mec/MecApps/MecRequestForegroundApp/MecRequestForegroundApp.ned index 974be0654..bd6baab76 100644 --- a/src/apps/mec/MecApps/MecRequestForegroundApp/MecRequestForegroundApp.ned +++ b/src/apps/mec/MecApps/MecRequestForegroundApp/MecRequestForegroundApp.ned @@ -28,7 +28,6 @@ simple MecRequestForegroundApp like IMECApp, IApp bool allocateHostResources = default(false); int packetSize @unit(B) = default(10B); - string interfaceTableModule = default(""); int mecAppIndex = default(0); int mecAppId = default(0); // it will be override by getId() in initialize int localUePort = default(0); // not used in MecRequestBackgroundGeneratorApp diff --git a/src/apps/mec/MecRequestResponseApp/MECResponseApp.ned b/src/apps/mec/MecRequestResponseApp/MECResponseApp.ned index 1a0a03b1c..793f47a5e 100644 --- a/src/apps/mec/MecRequestResponseApp/MECResponseApp.ned +++ b/src/apps/mec/MecRequestResponseApp/MECResponseApp.ned @@ -23,7 +23,6 @@ simple MECResponseApp like IMECApp, IApp @display("i=block/app;is=s"); int responsePacketSize @unit(B) = default(50B); - string interfaceTableModule = default(""); int mecAppIndex; int mecAppId; int localUePort; diff --git a/src/apps/mec/MecRequestResponseApp/UERequestApp.ned b/src/apps/mec/MecRequestResponseApp/UERequestApp.ned index cedb6b524..4a97061e9 100644 --- a/src/apps/mec/MecRequestResponseApp/UERequestApp.ned +++ b/src/apps/mec/MecRequestResponseApp/UERequestApp.ned @@ -39,8 +39,6 @@ simple UERequestApp like IApp string mecAppName = default("MecResponseApp"); - string interfaceTableModule; - // stats @signal[responseTime]; diff --git a/src/apps/mec/RealTimeVideoStreamingApp/MecRTVideoStreamingReceiver.ned b/src/apps/mec/RealTimeVideoStreamingApp/MecRTVideoStreamingReceiver.ned index e9ec3d113..e6f8064a4 100644 --- a/src/apps/mec/RealTimeVideoStreamingApp/MecRTVideoStreamingReceiver.ned +++ b/src/apps/mec/RealTimeVideoStreamingApp/MecRTVideoStreamingReceiver.ned @@ -20,7 +20,6 @@ simple MecRTVideoStreamingReceiver like IMECApp, IApp @display("i=block/app;is=s"); int packetSize @unit(B) = default(10B); - string interfaceTableModule = default(""); int mecAppIndex; int mecAppId; diff --git a/src/apps/mec/RealTimeVideoStreamingApp/RTVideoStreamingSender.ned b/src/apps/mec/RealTimeVideoStreamingApp/RTVideoStreamingSender.ned index af55ce983..ed2734ed6 100644 --- a/src/apps/mec/RealTimeVideoStreamingApp/RTVideoStreamingSender.ned +++ b/src/apps/mec/RealTimeVideoStreamingApp/RTVideoStreamingSender.ned @@ -47,7 +47,6 @@ simple RTVideoStreamingSender like IApp bool sendAllOnOneTime = true; bool logger = default(false); - string interfaceTableModule; @signal[positionX](type=double); @statistic[positionX](title="UE positionX"; source=positionX; record=vector); diff --git a/src/apps/mec/RnisTestApp/MecRnisTestApp.ned b/src/apps/mec/RnisTestApp/MecRnisTestApp.ned index ae84a91aa..84913fe71 100644 --- a/src/apps/mec/RnisTestApp/MecRnisTestApp.ned +++ b/src/apps/mec/RnisTestApp/MecRnisTestApp.ned @@ -24,8 +24,6 @@ simple MecRnisTestApp like IMECApp, IApp parameters: @display("i=block/app;is=s"); - string interfaceTableModule = default(""); - int mecAppIndex; int mecAppId; int localUePort; diff --git a/src/apps/mec/RnisTestApp/UeRnisTestApp.ned b/src/apps/mec/RnisTestApp/UeRnisTestApp.ned index c6fbb6bc8..fbe91183f 100644 --- a/src/apps/mec/RnisTestApp/UeRnisTestApp.ned +++ b/src/apps/mec/RnisTestApp/UeRnisTestApp.ned @@ -45,7 +45,6 @@ simple UeRnisTestApp like IApp string mecAppName = default("MecRnisTestApp"); bool logger = default(false); - string interfaceTableModule; gates: output socketOut; diff --git a/src/apps/mec/WarningAlert/MECWarningAlertApp.ned b/src/apps/mec/WarningAlert/MECWarningAlertApp.ned index f29562201..26301385c 100644 --- a/src/apps/mec/WarningAlert/MECWarningAlertApp.ned +++ b/src/apps/mec/WarningAlert/MECWarningAlertApp.ned @@ -34,7 +34,6 @@ simple MECWarningAlertApp like IMECApp, IApp @display("i=block/app;is=s"); int packetSize @unit(B) = default(10B); - string interfaceTableModule = default(""); int mecAppIndex; int mecAppId; diff --git a/src/apps/mec/WarningAlert/UEWarningAlertApp.ned b/src/apps/mec/WarningAlert/UEWarningAlertApp.ned index 19f7c2f1f..eee7bde0b 100644 --- a/src/apps/mec/WarningAlert/UEWarningAlertApp.ned +++ b/src/apps/mec/WarningAlert/UEWarningAlertApp.ned @@ -55,7 +55,6 @@ simple UEWarningAlertApp like IApp double radius @unit(m) = default(60m); bool logger = default(false); - string interfaceTableModule; gates: output socketOut; From 725aaf3a973ae08e919a8aca2ab8928b4d340125 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 23 Apr 2024 11:46:26 +0200 Subject: [PATCH 08/31] LteMacEnb: fix: get const reference to HarqBuffers instead of copying it --- src/stack/mac/layer/LteMacEnb.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stack/mac/layer/LteMacEnb.cc b/src/stack/mac/layer/LteMacEnb.cc index 5ca7edf1d..c75fb5235 100644 --- a/src/stack/mac/layer/LteMacEnb.cc +++ b/src/stack/mac/layer/LteMacEnb.cc @@ -1151,7 +1151,7 @@ int LteMacEnb::getActiveUesNumber(Direction dir) std::map::const_iterator end1 = harqBuffers->end(); for(; it1 != end1 ; ++it1){ - HarqTxBuffers harqBuffer = it1->second; + const HarqTxBuffers& harqBuffer = it1->second; HarqTxBuffers::const_iterator itHarq = harqBuffer.begin(); HarqTxBuffers::const_iterator endHarq = harqBuffer.end(); for(; itHarq != endHarq ; ++itHarq){ From 96b9dad68f55cf6a26f0ecfdeb877e5e178dee25 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Thu, 9 May 2024 11:55:49 +0200 Subject: [PATCH 09/31] MecServiceBase: initialize(): call base class initialize() at the top --- .../MECPlatform/MECServices/MECServiceBase/MecServiceBase.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nodes/mec/MECPlatform/MECServices/MECServiceBase/MecServiceBase.cc b/src/nodes/mec/MECPlatform/MECServices/MECServiceBase/MecServiceBase.cc index 29b7c4e29..d1d2523b8 100644 --- a/src/nodes/mec/MECPlatform/MECServices/MECServiceBase/MecServiceBase.cc +++ b/src/nodes/mec/MECPlatform/MECServices/MECServiceBase/MecServiceBase.cc @@ -46,6 +46,7 @@ MecServiceBase::MecServiceBase() void MecServiceBase::initialize(int stage) { + inet::ApplicationBase::initialize(stage); EV << "MecServiceBase::initialize stage " << stage << endl; if (stage == inet::INITSTAGE_LOCAL) @@ -111,7 +112,6 @@ void MecServiceBase::initialize(int stage) // get the BSs connected to the mec host getConnectedBaseStations(); } - inet::ApplicationBase::initialize(stage); } void MecServiceBase::handleStartOperation(inet::LifecycleOperation *operation) From b34f6f5dfb5789046297eaaf296ea9508da41ec6 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Thu, 9 May 2024 12:57:56 +0200 Subject: [PATCH 10/31] UALCMPApp: initialize(): call base class initialize() at the top also: added TODO note --- src/nodes/mec/UALCMP/UALCMPApp.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nodes/mec/UALCMP/UALCMPApp.cc b/src/nodes/mec/UALCMP/UALCMPApp.cc index d4e2f1a47..23da25ad0 100644 --- a/src/nodes/mec/UALCMP/UALCMPApp.cc +++ b/src/nodes/mec/UALCMP/UALCMPApp.cc @@ -58,6 +58,8 @@ UALCMPApp::UALCMPApp() void UALCMPApp::initialize(int stage) { + inet::ApplicationBase::initialize(stage); // TODO base class is MecServiceBase + EV << "UALCMPApp::initialize stage " << stage << endl; if (stage == inet::INITSTAGE_LOCAL) { @@ -84,8 +86,6 @@ void UALCMPApp::initialize(int stage) std::string mecOrchestratorHostname = getAncestorPar("mecOrchestratorHostname").stringValue(); mecOrchestrator_ = check_and_cast(getSimulation()->getModuleByPath(mecOrchestratorHostname.c_str())); } - - inet::ApplicationBase::initialize(stage); } void UALCMPApp::handleStartOperation(inet::LifecycleOperation *operation) From efe5a7f5a03ad95b6e496a1421332fb463d2e12c Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Thu, 9 May 2024 13:14:25 +0200 Subject: [PATCH 11/31] ServiceRegistry: initialize(): remove redundant call to indirect base class --- src/nodes/mec/MECPlatform/ServiceRegistry/ServiceRegistry.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/nodes/mec/MECPlatform/ServiceRegistry/ServiceRegistry.cc b/src/nodes/mec/MECPlatform/ServiceRegistry/ServiceRegistry.cc index 5ec716777..0e2c2883e 100644 --- a/src/nodes/mec/MECPlatform/ServiceRegistry/ServiceRegistry.cc +++ b/src/nodes/mec/MECPlatform/ServiceRegistry/ServiceRegistry.cc @@ -36,7 +36,6 @@ ServiceRegistry::~ServiceRegistry() { void ServiceRegistry::initialize(int stage) { EV << "ServiceRegistry::initialize - stage " << stage << endl; - cSimpleModule::initialize(stage); inet::ApplicationBase::initialize(stage); // avoid multiple initializations From 12eef8ea799b77b6cba0ad2187587e1125a1a482 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 28 May 2024 15:43:09 +0200 Subject: [PATCH 12/31] LteHarqProcessTx, LteHarqUnitTx, LteHarqBufferTx, etc: make classes noncopyable There is no need to copy them in the code, and existing implementation of copying was incomplete. Removed incorrect and unused copy constructor and operator=. Descendant class didn't overrides these. --- src/stack/mac/buffer/harq/LteHarqBufferTx.cc | 18 --------- src/stack/mac/buffer/harq/LteHarqBufferTx.h | 11 +----- src/stack/mac/buffer/harq/LteHarqProcessTx.cc | 21 ----------- src/stack/mac/buffer/harq/LteHarqProcessTx.h | 10 +---- src/stack/mac/buffer/harq/LteHarqUnitTx.cc | 37 ------------------- src/stack/mac/buffer/harq/LteHarqUnitTx.h | 11 +----- 6 files changed, 3 insertions(+), 105 deletions(-) diff --git a/src/stack/mac/buffer/harq/LteHarqBufferTx.cc b/src/stack/mac/buffer/harq/LteHarqBufferTx.cc index b7beac66d..c76166ce6 100644 --- a/src/stack/mac/buffer/harq/LteHarqBufferTx.cc +++ b/src/stack/mac/buffer/harq/LteHarqBufferTx.cc @@ -29,24 +29,6 @@ LteHarqBufferTx::LteHarqBufferTx(unsigned int numProc, LteMacBase *owner, LteMac } } -LteHarqBufferTx& LteHarqBufferTx::operator=(const LteHarqBufferTx& other) -{ - if (&other == this) - return *this; - - macOwner_ = other.macOwner_; - numProc_ = other.numProc_; - numEmptyProc_ = other.numEmptyProc_; - selectedAcid_ = other.selectedAcid_; - nodeId_ = other.nodeId_; - - processes_ = new std::vector(numProc_); - for (unsigned int i = 0; i < numProc_; i++) - (*processes_)[i] = new LteHarqProcessTx( *(*other.processes_)[i] ); - - return *this; -} - UnitList LteHarqBufferTx::firstReadyForRtx() { unsigned char oldestProcessAcid = HARQ_NONE; diff --git a/src/stack/mac/buffer/harq/LteHarqBufferTx.h b/src/stack/mac/buffer/harq/LteHarqBufferTx.h index a919b7261..7032d3784 100644 --- a/src/stack/mac/buffer/harq/LteHarqBufferTx.h +++ b/src/stack/mac/buffer/harq/LteHarqBufferTx.h @@ -24,7 +24,7 @@ namespace simu5g { * TODO: commenti */ -class LteHarqBufferTx +class LteHarqBufferTx : omnetpp::noncopyable { protected: LteMacBase *macOwner_; @@ -50,15 +50,6 @@ class LteHarqBufferTx */ LteHarqBufferTx(unsigned int numProc, LteMacBase *owner, LteMacBase *dstMac); - /** - * Copy constructor and operator= - */ - LteHarqBufferTx(const LteHarqBufferTx& other) - { - operator=(other); - } - LteHarqBufferTx& operator=(const LteHarqBufferTx& other); - /* * Get a reference to the specified process */ diff --git a/src/stack/mac/buffer/harq/LteHarqProcessTx.cc b/src/stack/mac/buffer/harq/LteHarqProcessTx.cc index 35bae17ba..866378e87 100644 --- a/src/stack/mac/buffer/harq/LteHarqProcessTx.cc +++ b/src/stack/mac/buffer/harq/LteHarqProcessTx.cc @@ -34,27 +34,6 @@ LteHarqProcessTx::LteHarqProcessTx(unsigned char acid, unsigned int numUnits, un } } -LteHarqProcessTx& LteHarqProcessTx::operator=(const LteHarqProcessTx& other) -{ - if (&other == this) - return *this; - - macOwner_ = other.macOwner_; - - numProcesses_ = other.numProcesses_; - numHarqUnits_ = other.numHarqUnits_; - acid_ = other.acid_; - numEmptyUnits_ = other.numEmptyUnits_; - numSelected_ = other.numSelected_; - dropped_ = other.dropped_; - - units_ = new UnitVector(numHarqUnits_); - for (unsigned int i = 0; i < numHarqUnits_; i++) - (*units_)[i] = new LteHarqUnitTx( *(*other.units_)[i] ); - - return *this; -} - std::vector LteHarqProcessTx::getProcessStatus() { diff --git a/src/stack/mac/buffer/harq/LteHarqProcessTx.h b/src/stack/mac/buffer/harq/LteHarqProcessTx.h index e74a25b81..042d951b6 100644 --- a/src/stack/mac/buffer/harq/LteHarqProcessTx.h +++ b/src/stack/mac/buffer/harq/LteHarqProcessTx.h @@ -29,7 +29,7 @@ typedef std::vector > BufferStatus; * H-ARQ feedback. */ -class LteHarqProcessTx +class LteHarqProcessTx : omnetpp::noncopyable { protected: @@ -76,14 +76,6 @@ class LteHarqProcessTx LteHarqProcessTx(unsigned char acid, unsigned int numUnits, unsigned int numProcesses, LteMacBase *macOwner, LteMacBase *dstMac); - /** - * Copy constructor and operator= - */ - LteHarqProcessTx(const LteHarqProcessTx& other) - { - operator=(other); - } - LteHarqProcessTx& operator=(const LteHarqProcessTx& other); /** * Insert a pdu into an H-ARQ unit contained in this process. diff --git a/src/stack/mac/buffer/harq/LteHarqUnitTx.cc b/src/stack/mac/buffer/harq/LteHarqUnitTx.cc index 177c501b2..e569c0647 100644 --- a/src/stack/mac/buffer/harq/LteHarqUnitTx.cc +++ b/src/stack/mac/buffer/harq/LteHarqUnitTx.cc @@ -71,43 +71,6 @@ LteHarqUnitTx::LteHarqUnitTx(unsigned char acid, Codeword cw, } } -LteHarqUnitTx& LteHarqUnitTx::operator=(const LteHarqUnitTx& other) -{ - if (&other == this) - return *this; - - pdu_ = other.pdu_; - pduId_ = other.pduId_; - acid_ = other.acid_; - cw_ = other.cw_; - transmissions_ = other.transmissions_; - txTime_ = other.txTime_; - status_ = other.status_; - macOwner_ = other.macOwner_; - dstMac_ = other.dstMac_; - maxHarqRtx_ = other.maxHarqRtx_; - - nodeB_ = other.nodeB_; - - macPacketLoss_ = other.macPacketLoss_; - macCellPacketLoss_ = other.macCellPacketLoss_; - harqErrorRate_ = other.harqErrorRate_; - harqErrorRate_1_ = other.harqErrorRate_1_; - harqErrorRate_2_ = other.harqErrorRate_2_; - harqErrorRate_3_ = other.harqErrorRate_3_; - harqErrorRate_4_ = other.harqErrorRate_4_; - - macCellPacketLossD2D_ = other.macCellPacketLossD2D_; - macPacketLossD2D_ = other.macPacketLossD2D_; - harqErrorRateD2D_ = other.harqErrorRateD2D_; - harqErrorRateD2D_1_ = other.harqErrorRateD2D_1_; - harqErrorRateD2D_2_ = other.harqErrorRateD2D_2_; - harqErrorRateD2D_3_ = other.harqErrorRateD2D_3_; - harqErrorRateD2D_4_ = other.harqErrorRateD2D_4_; - - return *this; -} - void LteHarqUnitTx::insertPdu(Packet *pkt) { if (!pkt) diff --git a/src/stack/mac/buffer/harq/LteHarqUnitTx.h b/src/stack/mac/buffer/harq/LteHarqUnitTx.h index d2a369f81..8f2a6e4b9 100644 --- a/src/stack/mac/buffer/harq/LteHarqUnitTx.h +++ b/src/stack/mac/buffer/harq/LteHarqUnitTx.h @@ -36,7 +36,7 @@ class LteMacBase; * TXHARQ_PDU_EMPTY: yes not present not ready for tx * TXHARQ_PDU_SELECTED: no present will be tx */ -class LteHarqUnitTx +class LteHarqUnitTx : omnetpp::noncopyable { protected: @@ -101,15 +101,6 @@ class LteHarqUnitTx */ LteHarqUnitTx(unsigned char acid, Codeword cw, LteMacBase *macOwner, LteMacBase *dstMac); - /** - * Copy constructor and operator= - */ - LteHarqUnitTx(const LteHarqUnitTx& other) - { - operator=(other); - } - LteHarqUnitTx& operator=(const LteHarqUnitTx& other); - /** * Inserts a pdu in this harq unit. * From 8e9319cd4496e70b8a568225933df4995422dea9 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 28 May 2024 17:17:36 +0200 Subject: [PATCH 13/31] LtePdcpRrc: removed redundant initialization of nodeId_ Base class is already initializing the nodeId_ in the same stage. --- src/stack/pdcp_rrc/layer/LtePdcpRrc.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/stack/pdcp_rrc/layer/LtePdcpRrc.cc b/src/stack/pdcp_rrc/layer/LtePdcpRrc.cc index fb14779e3..f156dc06e 100644 --- a/src/stack/pdcp_rrc/layer/LtePdcpRrc.cc +++ b/src/stack/pdcp_rrc/layer/LtePdcpRrc.cc @@ -473,8 +473,6 @@ void LtePdcpRrcBase::finish() void LtePdcpRrcEnb::initialize(int stage) { LtePdcpRrcBase::initialize(stage); - if (stage == inet::INITSTAGE_LOCAL) - nodeId_ = getAncestorPar("macNodeId"); } void LtePdcpRrcEnb::deleteEntities(MacNodeId nodeId) From d17c7397a4af1042021a948f568767901ef4fe5f Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Fri, 31 May 2024 12:49:59 +0200 Subject: [PATCH 14/31] BackgroundTrafficManager: fix access of module parameter by the wrong name par("useAvgInterference") instead of the correct par("computeAvgInterference"). --- .../backgroundTrafficGenerator/BackgroundTrafficManager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.cc b/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.cc index 56b1d1002..e88efd2d8 100644 --- a/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.cc +++ b/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.cc @@ -97,7 +97,7 @@ void BackgroundTrafficManager::initialize(int stage) if (!getAncestorPar("enablePeriodicCqiUpdate")) { - if (getAncestorPar("useAvgInterference")) + if (getAncestorPar("computeAvgInterference")) { initializeAvgInterferenceComputation(); info->init = true; From c321bf2c01cd60539595823f98b549e82d8a053c Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 7 May 2024 15:56:27 +0200 Subject: [PATCH 15/31] all: change calls to registerSignal(), as it is a *static* member function of cComponent Replace otherModule->registerSignal() with (this->)registerSignal() in modules. Replace otherModule->registerSignal() with omnetpp::cComponent::registerSignal() in other classes. --- .../MecRTVideoStreamingReceiver.cc | 24 ++++----- src/stack/mac/buffer/harq/LteHarqBufferRx.cc | 4 +- src/stack/mac/buffer/harq/LteHarqBufferRx.h | 2 +- src/stack/mac/buffer/harq/LteHarqUnitTx.cc | 32 ++++++------ .../mac/buffer/harq_d2d/LteHarqBufferRxD2D.cc | 10 ++-- .../mac/buffer/harq_d2d/LteHarqUnitTxD2D.cc | 17 ++++--- src/stack/mac/scheduler/LteSchedulerEnb.cc | 4 +- src/stack/rlc/am/buffer/AmRxQueue.cc | 33 ++++++------ src/stack/rlc/um/entity/UmRxEntity.cc | 50 +++++++++---------- 9 files changed, 88 insertions(+), 88 deletions(-) diff --git a/src/apps/mec/RealTimeVideoStreamingApp/MecRTVideoStreamingReceiver.cc b/src/apps/mec/RealTimeVideoStreamingApp/MecRTVideoStreamingReceiver.cc index ca899d2ff..ce80fc6fa 100644 --- a/src/apps/mec/RealTimeVideoStreamingApp/MecRTVideoStreamingReceiver.cc +++ b/src/apps/mec/RealTimeVideoStreamingApp/MecRTVideoStreamingReceiver.cc @@ -103,18 +103,18 @@ void MecRTVideoStreamingReceiver::handleUeMessage(omnetpp::cMessage *msg) { ueAppModule_ = L3AddressResolver().findHostWithAddress(ueAppAddress)->getSubmodule("app",1); - e2eDelaySegment_ = ueAppModule_->registerSignal("rtVideoStreamingEnd2endDelaySegment"); - segmentSize_ = ueAppModule_->registerSignal("rtVideoStreamingSegmentPacketSize"); - frameSize_ = ueAppModule_->registerSignal("rtVideoStreamingFrameSize"); - playoutBufferLength_ = ueAppModule_->registerSignal("rtVideoStreamingPlayoutBufferLength"); - playoutDelayTime_ = ueAppModule_->registerSignal("rtVideoStreamingPlayoutDelay"); - playoutDelayTimeAll_ = ueAppModule_->registerSignal("rtVideoStreamingPlayoutDelayAll"); - segmentLoss_ = ueAppModule_->registerSignal("rtVideoStreamingSegmentLoss"); - interArrTime_ = ueAppModule_->registerSignal("rtVideoStreamingInterArrivalTimeSegment"); - frameDisplayed_ = ueAppModule_->registerSignal("rtVideoStreamingFramesDisplayed"); - - startSession_ = ueAppModule_->registerSignal("rtVideoStreamingStartSession"); - stopSession_ = ueAppModule_->registerSignal("rtVideoStreamingStopSession"); + e2eDelaySegment_ = registerSignal("rtVideoStreamingEnd2endDelaySegment"); + segmentSize_ = registerSignal("rtVideoStreamingSegmentPacketSize"); + frameSize_ = registerSignal("rtVideoStreamingFrameSize"); + playoutBufferLength_ = registerSignal("rtVideoStreamingPlayoutBufferLength"); + playoutDelayTime_ = registerSignal("rtVideoStreamingPlayoutDelay"); + playoutDelayTimeAll_ = registerSignal("rtVideoStreamingPlayoutDelayAll"); + segmentLoss_ = registerSignal("rtVideoStreamingSegmentLoss"); + interArrTime_ = registerSignal("rtVideoStreamingInterArrivalTimeSegment"); + frameDisplayed_ = registerSignal("rtVideoStreamingFramesDisplayed"); + + startSession_ = registerSignal("rtVideoStreamingStartSession"); + stopSession_ = registerSignal("rtVideoStreamingStopSession"); } auto mecPk = pk->peekAtFront(); diff --git a/src/stack/mac/buffer/harq/LteHarqBufferRx.cc b/src/stack/mac/buffer/harq/LteHarqBufferRx.cc index 7ec90c68b..9ec08a949 100644 --- a/src/stack/mac/buffer/harq/LteHarqBufferRx.cc +++ b/src/stack/mac/buffer/harq/LteHarqBufferRx.cc @@ -42,14 +42,14 @@ LteHarqBufferRx::LteHarqBufferRx(unsigned int num, LteMacBase *owner, if (macOwner_->getNodeType() == ENODEB || macOwner_->getNodeType() == GNODEB) { nodeB_ = macOwner_; - macCellThroughput_ = macOwner_->registerSignal("macCellThroughputUl"); + macCellThroughput_ = omnetpp::cComponent::registerSignal("macCellThroughputUl"); macDelay_ = macUe_registerSignal("macDelayUl"); macThroughput_ = macUe_registerSignal("macThroughputUl"); } else // this is a UE { nodeB_ = getMacByMacNodeId(macUe_->getMacCellId()); - macCellThroughput_ = nodeB_->registerSignal("macCellThroughputDl"); + macCellThroughput_ = omnetpp::cComponent::registerSignal("macCellThroughputDl"); macThroughput_ = macUe_registerSignal("macThroughputDl"); macDelay_ = macUe_registerSignal("macDelayDl"); } diff --git a/src/stack/mac/buffer/harq/LteHarqBufferRx.h b/src/stack/mac/buffer/harq/LteHarqBufferRx.h index e877893fa..6ccd4d6e2 100644 --- a/src/stack/mac/buffer/harq/LteHarqBufferRx.h +++ b/src/stack/mac/buffer/harq/LteHarqBufferRx.h @@ -161,7 +161,7 @@ class LteHarqBufferRx virtual omnetpp::simsignal_t macUe_registerSignal(const char* signal) { if (macUe_){ - return macUe_->registerSignal(signal); + return omnetpp::cComponent::registerSignal(signal); } return 0; } diff --git a/src/stack/mac/buffer/harq/LteHarqUnitTx.cc b/src/stack/mac/buffer/harq/LteHarqUnitTx.cc index e569c0647..711c1d11f 100644 --- a/src/stack/mac/buffer/harq/LteHarqUnitTx.cc +++ b/src/stack/mac/buffer/harq/LteHarqUnitTx.cc @@ -34,28 +34,28 @@ LteHarqUnitTx::LteHarqUnitTx(unsigned char acid, Codeword cw, if (macOwner_->getNodeType() == ENODEB || macOwner_->getNodeType() == GNODEB) { nodeB_ = macOwner_; - macPacketLoss_ = dstMac_->registerSignal("macPacketLossDl"); - macCellPacketLoss_ = macOwner_->registerSignal("macCellPacketLossDl"); - harqErrorRate_ = dstMac_->registerSignal("harqErrorRateDl"); - harqErrorRate_1_ = dstMac_->registerSignal("harqErrorRate_1st_Dl"); - harqErrorRate_2_ = dstMac_->registerSignal("harqErrorRate_2nd_Dl"); - harqErrorRate_3_ = dstMac_->registerSignal("harqErrorRate_3rd_Dl"); - harqErrorRate_4_ = dstMac_->registerSignal("harqErrorRate_4th_Dl"); - harqTxAttempts_ = macOwner->registerSignal("harqTxAttemptsDl"); + macPacketLoss_ = omnetpp::cComponent::registerSignal("macPacketLossDl"); + macCellPacketLoss_ = omnetpp::cComponent::registerSignal("macCellPacketLossDl"); + harqErrorRate_ = omnetpp::cComponent::registerSignal("harqErrorRateDl"); + harqErrorRate_1_ = omnetpp::cComponent::registerSignal("harqErrorRate_1st_Dl"); + harqErrorRate_2_ = omnetpp::cComponent::registerSignal("harqErrorRate_2nd_Dl"); + harqErrorRate_3_ = omnetpp::cComponent::registerSignal("harqErrorRate_3rd_Dl"); + harqErrorRate_4_ = omnetpp::cComponent::registerSignal("harqErrorRate_4th_Dl"); + harqTxAttempts_ = omnetpp::cComponent::registerSignal("harqTxAttemptsDl"); } else // UE { nodeB_ = getMacByMacNodeId(macOwner_->getMacCellId()); if (dstMac_ == nodeB_) // UL { - macPacketLoss_ = macOwner_->registerSignal("macPacketLossUl"); - macCellPacketLoss_ = nodeB_->registerSignal("macCellPacketLossUl"); - harqErrorRate_ = macOwner_->registerSignal("harqErrorRateUl"); - harqErrorRate_1_ = macOwner_->registerSignal("harqErrorRate_1st_Ul"); - harqErrorRate_2_ = macOwner_->registerSignal("harqErrorRate_2nd_Ul"); - harqErrorRate_3_ = macOwner_->registerSignal("harqErrorRate_3rd_Ul"); - harqErrorRate_4_ = macOwner_->registerSignal("harqErrorRate_4th_Ul"); - harqTxAttempts_ = macOwner->registerSignal("harqTxAttemptsUl"); + macPacketLoss_ = omnetpp::cComponent::registerSignal("macPacketLossUl"); + macCellPacketLoss_ = omnetpp::cComponent::registerSignal("macCellPacketLossUl"); + harqErrorRate_ = omnetpp::cComponent::registerSignal("harqErrorRateUl"); + harqErrorRate_1_ = omnetpp::cComponent::registerSignal("harqErrorRate_1st_Ul"); + harqErrorRate_2_ = omnetpp::cComponent::registerSignal("harqErrorRate_2nd_Ul"); + harqErrorRate_3_ = omnetpp::cComponent::registerSignal("harqErrorRate_3rd_Ul"); + harqErrorRate_4_ = omnetpp::cComponent::registerSignal("harqErrorRate_4th_Ul"); + harqTxAttempts_ = omnetpp::cComponent::registerSignal("harqTxAttemptsUl"); } else { diff --git a/src/stack/mac/buffer/harq_d2d/LteHarqBufferRxD2D.cc b/src/stack/mac/buffer/harq_d2d/LteHarqBufferRxD2D.cc index dd8dd706b..583e9281c 100644 --- a/src/stack/mac/buffer/harq_d2d/LteHarqBufferRxD2D.cc +++ b/src/stack/mac/buffer/harq_d2d/LteHarqBufferRxD2D.cc @@ -42,9 +42,9 @@ LteHarqBufferRxD2D::LteHarqBufferRxD2D(unsigned int num, LteMacBase *owner, MacN if (macOwner_->getNodeType() == ENODEB || macOwner_->getNodeType() == GNODEB) { nodeB_ = macOwner_; - macDelay_ = macOwner_->registerSignal("macDelayUl"); - macThroughput_ = getMacByMacNodeId(srcId_)->registerSignal("macThroughputUl"); - macCellThroughput_ = macOwner_->registerSignal("macCellThroughputUl"); + macDelay_ = omnetpp::cComponent::registerSignal("macDelayUl"); + macThroughput_ = omnetpp::cComponent::registerSignal("macThroughputUl"); + macCellThroughput_ = omnetpp::cComponent::registerSignal("macCellThroughputUl"); macThroughputD2D_ = 0; macDelayD2D_ = 0; macCellThroughputD2D_ = 0; @@ -52,7 +52,7 @@ LteHarqBufferRxD2D::LteHarqBufferRxD2D(unsigned int num, LteMacBase *owner, MacN else // this is a UE { nodeB_ = getMacByMacNodeId(macOwner_->getMacCellId()); - macCellThroughput_ = nodeB_->registerSignal("macCellThroughputDl"); + macCellThroughput_ = omnetpp::cComponent::registerSignal("macCellThroughputDl"); macThroughput_ = macUe_registerSignal("macThroughputDl"); macDelay_ = macUe_registerSignal("macDelayDl"); @@ -61,7 +61,7 @@ LteHarqBufferRxD2D::LteHarqBufferRxD2D(unsigned int num, LteMacBase *owner, MacN { macThroughputD2D_ = macUe_registerSignal("macThroughputD2D"); macDelayD2D_ = macUe_registerSignal("macDelayD2D"); - macCellThroughputD2D_ = check_and_cast(nodeB_)->registerSignal("macCellThroughputD2D"); + macCellThroughputD2D_ = omnetpp::cComponent::registerSignal("macCellThroughputD2D"); } else { diff --git a/src/stack/mac/buffer/harq_d2d/LteHarqUnitTxD2D.cc b/src/stack/mac/buffer/harq_d2d/LteHarqUnitTxD2D.cc index da789015b..3005fa7ae 100644 --- a/src/stack/mac/buffer/harq_d2d/LteHarqUnitTxD2D.cc +++ b/src/stack/mac/buffer/harq_d2d/LteHarqUnitTxD2D.cc @@ -19,16 +19,17 @@ using namespace omnetpp; LteHarqUnitTxD2D::LteHarqUnitTxD2D(unsigned char acid, Codeword cw, LteMacBase *macOwner, LteMacBase *dstMac) : LteHarqUnitTx(acid, cw, macOwner, dstMac) { + check_and_cast(nodeB_); + check_and_cast(macOwner_); if ((macOwner_->getNodeType() == UE) && (dstMac_ != nodeB_)) { - macCellPacketLossD2D_ = check_and_cast(nodeB_)->registerSignal("macCellPacketLossD2D"); - - macPacketLossD2D_ = check_and_cast(macOwner_)->registerSignal("macPacketLossD2D"); - harqErrorRateD2D_ = check_and_cast(dstMac_)->registerSignal("harqErrorRateD2D"); - harqErrorRateD2D_1_ = check_and_cast(dstMac_)->registerSignal("harqErrorRate_1st_D2D"); - harqErrorRateD2D_2_ = check_and_cast(dstMac_)->registerSignal("harqErrorRate_2nd_D2D"); - harqErrorRateD2D_3_ = check_and_cast(dstMac_)->registerSignal("harqErrorRate_3rd_D2D"); - harqErrorRateD2D_4_ = check_and_cast(dstMac_)->registerSignal("harqErrorRate_4th_D2D"); + macCellPacketLossD2D_ = omnetpp::cComponent::registerSignal("macCellPacketLossD2D"); + macPacketLossD2D_ = omnetpp::cComponent::registerSignal("macPacketLossD2D"); + harqErrorRateD2D_ = omnetpp::cComponent::registerSignal("harqErrorRateD2D"); + harqErrorRateD2D_1_ = omnetpp::cComponent::registerSignal("harqErrorRate_1st_D2D"); + harqErrorRateD2D_2_ = omnetpp::cComponent::registerSignal("harqErrorRate_2nd_D2D"); + harqErrorRateD2D_3_ = omnetpp::cComponent::registerSignal("harqErrorRate_3rd_D2D"); + harqErrorRateD2D_4_ = omnetpp::cComponent::registerSignal("harqErrorRate_4th_D2D"); } else { diff --git a/src/stack/mac/scheduler/LteSchedulerEnb.cc b/src/stack/mac/scheduler/LteSchedulerEnb.cc index f70315439..91d8432cb 100644 --- a/src/stack/mac/scheduler/LteSchedulerEnb.cc +++ b/src/stack/mac/scheduler/LteSchedulerEnb.cc @@ -133,8 +133,8 @@ void LteSchedulerEnb::initialize(Direction dir, LteMacEnb* mac) initializeAllocator(); // Initialize statistics - avgServedBlocksDl_ = mac_->registerSignal("avgServedBlocksDl"); - avgServedBlocksUl_ = mac_->registerSignal("avgServedBlocksUl"); + avgServedBlocksDl_ = omnetpp::cComponent::registerSignal("avgServedBlocksDl"); + avgServedBlocksUl_ = omnetpp::cComponent::registerSignal("avgServedBlocksUl"); } void LteSchedulerEnb::initializeSchedulerPeriodCounter(NumerologyIndex maxNumerologyIndex) diff --git a/src/stack/rlc/am/buffer/AmRxQueue.cc b/src/stack/rlc/am/buffer/AmRxQueue.cc index d46aa4197..71679c02b 100644 --- a/src/stack/rlc/am/buffer/AmRxQueue.cc +++ b/src/stack/rlc/am/buffer/AmRxQueue.cc @@ -60,26 +60,25 @@ void AmRxQueue::initialize() if (mac->getNodeType() == ENODEB || mac->getNodeType() == GNODEB) { - rlcCellPacketLoss_ = lteRlc_->registerSignal("rlcCellPacketLossUl"); - rlcPacketLoss_ = lteRlc_->registerSignal("rlcPacketLossUl"); - rlcPduPacketLoss_ = lteRlc_->registerSignal("rlcPduPacketLossUl"); - rlcDelay_ = lteRlc_->registerSignal("rlcDelayUl"); - rlcThroughput_ = lteRlc_->registerSignal("rlcThroughputUl"); - rlcPduDelay_ = lteRlc_->registerSignal("rlcPduDelayUl"); - rlcPduThroughput_ = lteRlc_->registerSignal("rlcPduThroughputUl"); - rlcCellThroughput_ = lteRlc_->registerSignal("rlcCellThroughputUl"); + rlcCellPacketLoss_ = registerSignal("rlcCellPacketLossUl"); + rlcPacketLoss_ = registerSignal("rlcPacketLossUl"); + rlcPduPacketLoss_ = registerSignal("rlcPduPacketLossUl"); + rlcDelay_ = registerSignal("rlcDelayUl"); + rlcThroughput_ = registerSignal("rlcThroughputUl"); + rlcPduDelay_ = registerSignal("rlcPduDelayUl"); + rlcPduThroughput_ = registerSignal("rlcPduThroughputUl"); + rlcCellThroughput_ = registerSignal("rlcCellThroughputUl"); } else { - cModule* nodeB = getRlcByMacNodeId(mac->getMacCellId(), UM); - rlcPacketLoss_ = lteRlc_->registerSignal("rlcPacketLossDl"); - rlcPduPacketLoss_ = lteRlc_->registerSignal("rlcPduPacketLossDl"); - rlcDelay_ = lteRlc_->registerSignal("rlcDelayDl"); - rlcThroughput_ = lteRlc_->registerSignal("rlcThroughputDl"); - rlcPduDelay_ = lteRlc_->registerSignal("rlcPduDelayDl"); - rlcPduThroughput_ = lteRlc_->registerSignal("rlcPduThroughputDl"); - rlcCellThroughput_ = nodeB->registerSignal("rlcCellThroughputDl"); - rlcCellPacketLoss_ = nodeB->registerSignal("rlcCellPacketLossDl"); + rlcPacketLoss_ = registerSignal("rlcPacketLossDl"); + rlcPduPacketLoss_ = registerSignal("rlcPduPacketLossDl"); + rlcDelay_ = registerSignal("rlcDelayDl"); + rlcThroughput_ = registerSignal("rlcThroughputDl"); + rlcPduDelay_ = registerSignal("rlcPduDelayDl"); + rlcPduThroughput_ = registerSignal("rlcPduThroughputDl"); + rlcCellThroughput_ = registerSignal("rlcCellThroughputDl"); + rlcCellPacketLoss_ = registerSignal("rlcCellPacketLossDl"); } } diff --git a/src/stack/rlc/um/entity/UmRxEntity.cc b/src/stack/rlc/um/entity/UmRxEntity.cc index 663cb9fa9..1dada4c3a 100644 --- a/src/stack/rlc/um/entity/UmRxEntity.cc +++ b/src/stack/rlc/um/entity/UmRxEntity.cc @@ -757,40 +757,40 @@ void UmRxEntity::initialize() if (mac->getNodeType() == ENODEB || mac->getNodeType() == GNODEB) { - rlcCellPacketLoss_ = parent->registerSignal("rlcCellPacketLossUl"); - rlcPacketLoss_ = parent->registerSignal("rlcPacketLossUl"); - rlcPduPacketLoss_ = parent->registerSignal("rlcPduPacketLossUl"); - rlcDelay_ = parent->registerSignal("rlcDelayUl"); - rlcThroughput_ = parent->registerSignal("rlcThroughputUl"); - rlcPduDelay_ = parent->registerSignal("rlcPduDelayUl"); - rlcPduThroughput_ = parent->registerSignal("rlcPduThroughputUl"); - rlcCellThroughput_ = parent->registerSignal("rlcCellThroughputUl"); - rlcPacketLossTotal_ = parent->registerSignal("rlcPacketLossTotal"); + rlcCellPacketLoss_ = registerSignal("rlcCellPacketLossUl"); + rlcPacketLoss_ = registerSignal("rlcPacketLossUl"); + rlcPduPacketLoss_ = registerSignal("rlcPduPacketLossUl"); + rlcDelay_ = registerSignal("rlcDelayUl"); + rlcThroughput_ = registerSignal("rlcThroughputUl"); + rlcPduDelay_ = registerSignal("rlcPduDelayUl"); + rlcPduThroughput_ = registerSignal("rlcPduThroughputUl"); + rlcCellThroughput_ = registerSignal("rlcCellThroughputUl"); + rlcPacketLossTotal_ = registerSignal("rlcPacketLossTotal"); } else // UE { - rlcPacketLoss_ = parent->registerSignal("rlcPacketLossDl"); - rlcPduPacketLoss_ = parent->registerSignal("rlcPduPacketLossDl"); - rlcDelay_ = parent->registerSignal("rlcDelayDl"); - rlcThroughput_ = parent->registerSignal("rlcThroughputDl"); - rlcPduDelay_ = parent->registerSignal("rlcPduDelayDl"); - rlcPduThroughput_ = parent->registerSignal("rlcPduThroughputDl"); - - rlcCellThroughput_ = nodeB_->registerSignal("rlcCellThroughputDl"); - rlcCellPacketLoss_ = nodeB_->registerSignal("rlcCellPacketLossDl"); + rlcPacketLoss_ = registerSignal("rlcPacketLossDl"); + rlcPduPacketLoss_ = registerSignal("rlcPduPacketLossDl"); + rlcDelay_ = registerSignal("rlcDelayDl"); + rlcThroughput_ = registerSignal("rlcThroughputDl"); + rlcPduDelay_ = registerSignal("rlcPduDelayDl"); + rlcPduThroughput_ = registerSignal("rlcPduThroughputDl"); + + rlcCellThroughput_ = registerSignal("rlcCellThroughputDl"); + rlcCellPacketLoss_ = registerSignal("rlcCellPacketLossDl"); } if (mac->isD2DCapable()) { - rlcPacketLossD2D_ = parent->registerSignal("rlcPacketLossD2D"); - rlcPduPacketLossD2D_ = parent->registerSignal("rlcPduPacketLossD2D"); - rlcDelayD2D_ = parent->registerSignal("rlcDelayD2D"); - rlcThroughputD2D_ = parent->registerSignal("rlcThroughputD2D"); - rlcPduDelayD2D_ = parent->registerSignal("rlcPduDelayD2D"); - rlcPduThroughputD2D_ = parent->registerSignal("rlcPduThroughputD2D"); + rlcPacketLossD2D_ = registerSignal("rlcPacketLossD2D"); + rlcPduPacketLossD2D_ = registerSignal("rlcPduPacketLossD2D"); + rlcDelayD2D_ = registerSignal("rlcDelayD2D"); + rlcThroughputD2D_ = registerSignal("rlcThroughputD2D"); + rlcPduDelayD2D_ = registerSignal("rlcPduDelayD2D"); + rlcPduThroughputD2D_ = registerSignal("rlcPduThroughputD2D"); } - rlcPacketLossTotal_ = parent->registerSignal("rlcPacketLossTotal"); + rlcPacketLossTotal_ = registerSignal("rlcPacketLossTotal"); // store the node id of the owner module (useful for statistics) ownerNodeId_ = mac->getMacNodeId(); From a2da3e042ccd22618ce30abadad8bf6cd1afbf42 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 21 May 2024 17:14:55 +0200 Subject: [PATCH 16/31] LteRealisticChannelModel: remove duplicate binder_ member, already exists in base class --- src/stack/phy/ChannelModel/LteRealisticChannelModel.cc | 2 -- src/stack/phy/ChannelModel/LteRealisticChannelModel.h | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/stack/phy/ChannelModel/LteRealisticChannelModel.cc b/src/stack/phy/ChannelModel/LteRealisticChannelModel.cc index a98cd95b4..72f158c90 100644 --- a/src/stack/phy/ChannelModel/LteRealisticChannelModel.cc +++ b/src/stack/phy/ChannelModel/LteRealisticChannelModel.cc @@ -95,8 +95,6 @@ void LteRealisticChannelModel::initialize(int stage) collectSinrStatistics_ = par("collectSinrStatistics"); - //get binder - binder_ = getBinder(); //clear jakes fading map structure jakesFadingMap_.clear(); } diff --git a/src/stack/phy/ChannelModel/LteRealisticChannelModel.h b/src/stack/phy/ChannelModel/LteRealisticChannelModel.h index 391d7cc4e..7754ef3c2 100644 --- a/src/stack/phy/ChannelModel/LteRealisticChannelModel.h +++ b/src/stack/phy/ChannelModel/LteRealisticChannelModel.h @@ -104,9 +104,6 @@ class LteRealisticChannelModel : public LteChannelModel //Thermal noise double thermalNoise_; - //pointer to Binder module - Binder* binder_; - //Cable loss double cableLoss_; From 727b1ec365b52d7c1f4b6635dd1a2106387b2da4 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Mon, 3 Jun 2024 15:42:02 +0200 Subject: [PATCH 17/31] LteDlFeedbackGenerator: replace getAncestorPar() call with par() The module already has the parameter "feedbackGeneratorType", getAncestorPar() found that. --- src/stack/phy/feedback/LteDlFeedbackGenerator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stack/phy/feedback/LteDlFeedbackGenerator.cc b/src/stack/phy/feedback/LteDlFeedbackGenerator.cc index cbabb451a..4c0f1aa98 100644 --- a/src/stack/phy/feedback/LteDlFeedbackGenerator.cc +++ b/src/stack/phy/feedback/LteDlFeedbackGenerator.cc @@ -240,7 +240,7 @@ void LteDlFeedbackGenerator::sendFeedback(LteFeedbackDoubleVector fb, { feedbackReq.request = true; feedbackReq.genType = getFeedbackGeneratorType( - getAncestorPar("feedbackGeneratorType").stringValue()); + par("feedbackGeneratorType").stringValue()); feedbackReq.type = getFeedbackType(par("feedbackType").stringValue()); feedbackReq.txMode = currentTxMode_; feedbackReq.rbAllocationType = rbAllocationType_; From b8b082555bbd9912c530f3199beead58dafad9ee Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Mon, 22 Apr 2024 12:05:52 +0200 Subject: [PATCH 18/31] MultihopD2D: remove unused code: the nullptr already checked by check_and_cast --- src/apps/d2dMultihop/MultihopD2D.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/apps/d2dMultihop/MultihopD2D.cc b/src/apps/d2dMultihop/MultihopD2D.cc index 3352b868b..1949adf8e 100644 --- a/src/apps/d2dMultihop/MultihopD2D.cc +++ b/src/apps/d2dMultihop/MultihopD2D.cc @@ -210,12 +210,6 @@ void MultihopD2D::handleRcvdPacket(cMessage* msg) EV << "MultihopD2D::handleRcvdPacket - Received packet from lower layer" << endl; Packet* pPacket = check_and_cast(msg); - - if (pPacket == nullptr) - { - throw cRuntimeError("MultihopD2D::handleMessage - FATAL! Error when casting to inet packet"); - } - auto mhop = pPacket->peekAtFront(); pPacket->removeControlInfo(); From c96e603a8d77af33e670b7d876b127b622d66ea1 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Fri, 3 May 2024 12:44:24 +0200 Subject: [PATCH 19/31] MecAppBase: simplified delete code --- src/apps/mec/MecApps/MecAppBase.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/apps/mec/MecApps/MecAppBase.cc b/src/apps/mec/MecApps/MecAppBase.cc index 499022aab..81693f53a 100644 --- a/src/apps/mec/MecApps/MecAppBase.cc +++ b/src/apps/mec/MecApps/MecAppBase.cc @@ -38,13 +38,7 @@ MecAppBase::MecAppBase() MecAppBase::~MecAppBase() { std::cout << "MecAppBase::~MecAppBase()" << std::endl; - if(sendTimer != nullptr) - { - if(sendTimer->isSelfMessage()) - cancelAndDelete(sendTimer); - else - delete sendTimer; - } + cancelAndDelete(sendTimer); sockets_.deleteSockets(); From b2c59910bd44d942753a5a5efd7365c171ababed Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Thu, 2 May 2024 09:34:34 +0200 Subject: [PATCH 20/31] TrafficFlowFilter: added CHK: findHostWithAddress() maybe returns nullptr --- src/corenetwork/trafficFlowFilter/TrafficFlowFilter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corenetwork/trafficFlowFilter/TrafficFlowFilter.cc b/src/corenetwork/trafficFlowFilter/TrafficFlowFilter.cc index 07baf2c79..70b587ada 100644 --- a/src/corenetwork/trafficFlowFilter/TrafficFlowFilter.cc +++ b/src/corenetwork/trafficFlowFilter/TrafficFlowFilter.cc @@ -151,7 +151,7 @@ TrafficFlowTemplateId TrafficFlowFilter::findTrafficFlow(L3Address srcAddress, L if (binder_->isMecHost(destAddress)) { // check if the destination belongs to another core network (for multi-operator scenarios) - std::string destGw = binder_->getNetworkName() + "." + (inet::L3AddressResolver().findHostWithAddress(destAddress))->getAncestorPar("gateway").stdstringValue(); + std::string destGw = binder_->getNetworkName() + "." + CHK(inet::L3AddressResolver().findHostWithAddress(destAddress))->getAncestorPar("gateway").stdstringValue(); if (strcmp(gateway_, destGw.c_str()) != 0) { // the destination is a MEC host under a different core network, send the packet to the gateway From d32b1861e8e536f25ce409f8bb0c93b7a045e682 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Thu, 2 May 2024 09:39:37 +0200 Subject: [PATCH 21/31] all: fixed missing namespaces --- .../mec/MECPlatform/MECServices/MECServiceBase/SocketManager.h | 2 +- src/stack/mac/layer/LteMacEnb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nodes/mec/MECPlatform/MECServices/MECServiceBase/SocketManager.h b/src/nodes/mec/MECPlatform/MECServices/MECServiceBase/SocketManager.h index 625ba8a8f..35002468d 100644 --- a/src/nodes/mec/MECPlatform/MECServices/MECServiceBase/SocketManager.h +++ b/src/nodes/mec/MECPlatform/MECServices/MECServiceBase/SocketManager.h @@ -35,7 +35,7 @@ class SocketManager : public omnetpp::cSimpleModule, public inet::TcpSocket::ICa MecServiceBase *service; inet::TcpSocket *sock; // ptr into socketMap managed by TCPSrvHostApp HttpBaseMessage* currentHttpMessage; - cQueue httpMessageQueue; + omnetpp::cQueue httpMessageQueue; std::string bufferedData; // internal: inet::TcpSocket::CallbackInterface methods diff --git a/src/stack/mac/layer/LteMacEnb.h b/src/stack/mac/layer/LteMacEnb.h index d5464af70..f42f4da1a 100644 --- a/src/stack/mac/layer/LteMacEnb.h +++ b/src/stack/mac/layer/LteMacEnb.h @@ -194,7 +194,7 @@ class LteMacEnb : public LteMacBase virtual BackgroundTrafficManager* getBackgroundTrafficManager(double carrierFrequency) { if (bgTrafficManager_.find(carrierFrequency) == bgTrafficManager_.end()) - throw cRuntimeError("LteMacEnb::getBackgroundTrafficManager - carrier frequency [%f] not valid.", carrierFrequency); + throw omnetpp::cRuntimeError("LteMacEnb::getBackgroundTrafficManager - carrier frequency [%f] not valid.", carrierFrequency); return bgTrafficManager_[carrierFrequency]; } From e8fe5c023fa9cd3fb22b5e69c77fa13726c6184d Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Thu, 2 May 2024 22:49:01 +0200 Subject: [PATCH 22/31] check all values --- src/nodes/ExtCell.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nodes/ExtCell.cc b/src/nodes/ExtCell.cc index 25b4f5d45..ed973a304 100644 --- a/src/nodes/ExtCell.cc +++ b/src/nodes/ExtCell.cc @@ -66,10 +66,12 @@ void ExtCell::initialize(int stage) { allocationType_ = RANDOM_ALLOC; } - else + else if (allocationType == "FULL_ALLOC") { allocationType_ = FULL_ALLOC; } + else + throw omnetpp::cRuntimeError("Unrecognized bandAllocationType: '%s'", allocationType.c_str()); // get the allocation parameters if (allocationType_ == FULL_ALLOC) From 44f567758a2338c19c3a45380a3d62da124291f8 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Thu, 6 Jun 2024 14:49:09 +0200 Subject: [PATCH 23/31] bugfix: LteNicBase: phy: bad @class property - LtePhyType is a ned parameter --- src/stack/LteNicBase.ned | 1 - 1 file changed, 1 deletion(-) diff --git a/src/stack/LteNicBase.ned b/src/stack/LteNicBase.ned index aee1bdd7c..e617b2bae 100644 --- a/src/stack/LteNicBase.ned +++ b/src/stack/LteNicBase.ned @@ -90,7 +90,6 @@ module LteNicBase extends NetworkInterface like ICellularNic // LtePhy submodule phy: like LtePhy { @display("p=363,389"); - @class(LtePhyType); } channelModel[numCarriers]: like LteChannelModelInterface { From 0559a8164fdd745b5775c5b76efcb5ba3ef88089 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Thu, 6 Jun 2024 14:52:37 +0200 Subject: [PATCH 24/31] bugfix: NRNicUe: nrPhy: bad @class property - LtePhyType is a ned parameter --- src/stack/NRNicUe.ned | 1 - 1 file changed, 1 deletion(-) diff --git a/src/stack/NRNicUe.ned b/src/stack/NRNicUe.ned index caf75b3fa..5bd87c351 100644 --- a/src/stack/NRNicUe.ned +++ b/src/stack/NRNicUe.ned @@ -58,7 +58,6 @@ module NRNicUe extends LteNicUeD2D // PHY Layer nrPhy: like LtePhy { @display("p=466,389"); - @class(LtePhyType); } // NR Channel Model nrChannelModel[numNRCarriers]: like LteChannelModelInterface { From 3fd1bdf13d4fae4ecedb18ae7ffba69281329a74 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Mon, 10 Jun 2024 15:16:58 +0200 Subject: [PATCH 25/31] NED: LteNicBase: modified submodule position for better comprehensibility The ip2nic module was overlapped a connection. --- src/stack/LteNicBase.ned | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stack/LteNicBase.ned b/src/stack/LteNicBase.ned index e617b2bae..a3c9c56d9 100644 --- a/src/stack/LteNicBase.ned +++ b/src/stack/LteNicBase.ned @@ -72,7 +72,7 @@ module LteNicBase extends NetworkInterface like ICellularNic // bridge between radio nic and network layer ip2nic: like INetworkLayer2CellularNic { nodeType = parent.nodeType; - @display("p=362,67"); + @display("p=412,67"); } // PDCP-RRC Layer pdcpRrc: like LtePdcpRrc { From dcf71dbe2249061aacd0b8fbf30a37e8651611fe Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 11 Jun 2024 11:40:05 +0200 Subject: [PATCH 26/31] fixup: UeRnisTestApp: fixed uninitialized pointer. --- src/apps/mec/RnisTestApp/UeRnisTestApp.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/apps/mec/RnisTestApp/UeRnisTestApp.cc b/src/apps/mec/RnisTestApp/UeRnisTestApp.cc index 0ac23d74d..107a59e25 100644 --- a/src/apps/mec/RnisTestApp/UeRnisTestApp.cc +++ b/src/apps/mec/RnisTestApp/UeRnisTestApp.cc @@ -35,6 +35,7 @@ Define_Module(UeRnisTestApp); UeRnisTestApp::UeRnisTestApp(){ selfStart_ = NULL; selfStop_ = NULL; + selfMecAppStart_ = nullptr; } UeRnisTestApp::~UeRnisTestApp(){ From 6af233906334a2c3590f3d76775c058c212f1b5f Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 11 Jun 2024 11:42:28 +0200 Subject: [PATCH 27/31] fixup: port/address swapped in documentation --- src/apps/mec/RnisTestApp/UeRnisTestApp.ned | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/mec/RnisTestApp/UeRnisTestApp.ned b/src/apps/mec/RnisTestApp/UeRnisTestApp.ned index fbe91183f..09a14d44d 100644 --- a/src/apps/mec/RnisTestApp/UeRnisTestApp.ned +++ b/src/apps/mec/RnisTestApp/UeRnisTestApp.ned @@ -30,8 +30,8 @@ simple UeRnisTestApp like IApp //connection infos int localPort = default(4000); - int deviceAppPort = default(4000); // ipAddress of the DeviceApp - string deviceAppAddress; // port of the DeviceApp + int deviceAppPort = default(4000); // port of the DeviceApp + string deviceAppAddress; // ipAddress of the DeviceApp double queryingPeriod @unit("s") = default(1s); // RNIS querying period From b71b5063630d316e31401abd99643678917377d5 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Wed, 12 Jun 2024 11:31:08 +0200 Subject: [PATCH 28/31] fixup: Ue, BackgroundUe: fixed default mobility module typename setting. --- src/nodes/Ue.ned | 6 +----- src/stack/backgroundTrafficGenerator/BackgroundUe.ned | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/nodes/Ue.ned b/src/nodes/Ue.ned index 194b820b9..7eb2b7cac 100644 --- a/src/nodes/Ue.ned +++ b/src/nodes/Ue.ned @@ -46,10 +46,6 @@ module Ue @figure[linkLayer.title](type=text; pos=845,461; anchor=ne; text="link layer"); @figure[submodules]; - - //# Mobility - mobility.typename = default("StationaryMobility"); - //# Apps int numApps = default(0); // no of apps. // Specify the app types in INI file with app[0..1].typename="UdpVideoStreamClient" syntax @@ -93,7 +89,7 @@ module Ue interfaceTable: InterfaceTable { @display("p=127.368004,257.868;is=s"); } - mobility: like IMobility if typename != "" { + mobility: like IMobility { @display("p=127.368004,172.26001;is=s"); } diff --git a/src/stack/backgroundTrafficGenerator/BackgroundUe.ned b/src/stack/backgroundTrafficGenerator/BackgroundUe.ned index 08e386e91..80cb9b627 100644 --- a/src/stack/backgroundTrafficGenerator/BackgroundUe.ned +++ b/src/stack/backgroundTrafficGenerator/BackgroundUe.ned @@ -18,10 +18,9 @@ module BackgroundUe { parameters: @display("i=device/pocketpc"); - mobility.typename = default("StationaryMobility"); string trafficGeneratorType = default("TrafficGeneratorBase"); submodules: - mobility: like IMobility if typename != "" { + mobility: like IMobility if typename != "" { @display("p=57,61;is=s"); } generator: like ITrafficGenerator { From 80aac89c850f2ffd846ffdeb193163557c2da8d8 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Fri, 14 Jun 2024 14:34:56 +0200 Subject: [PATCH 29/31] fixup: BackgroundCellTrafficManager: remove overrided function with identical functionality (bodies are equal) --- src/nodes/backgroundCell/BackgroundCellTrafficManager.cc | 8 -------- src/nodes/backgroundCell/BackgroundCellTrafficManager.h | 3 --- 2 files changed, 11 deletions(-) diff --git a/src/nodes/backgroundCell/BackgroundCellTrafficManager.cc b/src/nodes/backgroundCell/BackgroundCellTrafficManager.cc index f27c8e71d..01ca5c668 100644 --- a/src/nodes/backgroundCell/BackgroundCellTrafficManager.cc +++ b/src/nodes/backgroundCell/BackgroundCellTrafficManager.cc @@ -147,14 +147,6 @@ Cqi BackgroundCellTrafficManager::computeCqi(int bgUeIndex, Direction dir, inet: return meanCqi; } -unsigned int BackgroundCellTrafficManager::getBackloggedUeBytesPerBlock(MacNodeId bgUeId, Direction dir) -{ - int index = bgUeId - BGUE_MIN_ID; - Cqi cqi = bgUe_.at(index)->getCqi(dir); - - return bgAmc_->computeBitsPerRbBackground(cqi, dir, carrierFrequency_) / 8; -} - void BackgroundCellTrafficManager::racHandled(MacNodeId bgUeId) { Enter_Method("BackgroundTrafficManager::racHandled"); diff --git a/src/nodes/backgroundCell/BackgroundCellTrafficManager.h b/src/nodes/backgroundCell/BackgroundCellTrafficManager.h index eb2bcef4d..375bd7a91 100644 --- a/src/nodes/backgroundCell/BackgroundCellTrafficManager.h +++ b/src/nodes/backgroundCell/BackgroundCellTrafficManager.h @@ -51,9 +51,6 @@ class BackgroundCellTrafficManager : public BackgroundTrafficManager // returns the CQI based on the given position and power virtual Cqi computeCqi(int bgUeIndex, Direction dir, inet::Coord bgUePos, double bgUeTxPower = 0.0); - // returns the bytes per block of the given UE for in the given direction - virtual unsigned int getBackloggedUeBytesPerBlock(MacNodeId bgUeId, Direction dir); - // signal that the RAC for the given UE has been handled virtual void racHandled(MacNodeId bgUeId); From 82de2ae38bb1d1d05823306b88c8499adfb77e32 Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 18 Jun 2024 11:19:02 +0200 Subject: [PATCH 30/31] fixup: global nrCqiTable, getCqiFromTable() let static member of BackgroundTrafficManager --- .../backgroundTrafficGenerator/BackgroundTrafficManager.cc | 4 ++-- .../backgroundTrafficGenerator/BackgroundTrafficManager.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.cc b/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.cc index e88efd2d8..fc324b9f6 100644 --- a/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.cc +++ b/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.cc @@ -20,7 +20,7 @@ namespace simu5g { Define_Module(BackgroundTrafficManager); -const double nrCqiTable[16] = { +const double BackgroundTrafficManager::nrCqiTable[16] = { -9999.0, -9999.0, -9999.0, @@ -39,7 +39,7 @@ const double nrCqiTable[16] = { 25.5 }; -double getCqiFromTable(double snr) +double BackgroundTrafficManager::getCqiFromTable(double snr) { for (unsigned int i=0; i<16; i++) { diff --git a/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.h b/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.h index 06f9703bb..dc2c36caa 100644 --- a/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.h +++ b/src/stack/backgroundTrafficGenerator/BackgroundTrafficManager.h @@ -87,6 +87,8 @@ class BackgroundTrafficManager : public cSimpleModule virtual int numInitStages() const {return inet::INITSTAGE_LAST; } virtual void handleMessage(cMessage* msg); + static const double nrCqiTable[16]; + static double getCqiFromTable(double snr); // define functions for interactions with the NIC From ff3a3c32e7e5fd5b3d05a1cd2756c7fad8bd058a Mon Sep 17 00:00:00 2001 From: Zoltan Bojthe Date: Tue, 18 Jun 2024 11:17:55 +0200 Subject: [PATCH 31/31] fixup: BackgroundCellTrafficManager: remove nrCqiTable, getCqiFromTable(): already exists in base BackgroundTrafficManager class --- .../BackgroundCellTrafficManager.cc | 29 ------------------- .../BackgroundCellTrafficManager.h | 3 -- 2 files changed, 32 deletions(-) diff --git a/src/nodes/backgroundCell/BackgroundCellTrafficManager.cc b/src/nodes/backgroundCell/BackgroundCellTrafficManager.cc index 01ca5c668..2bfb211c8 100644 --- a/src/nodes/backgroundCell/BackgroundCellTrafficManager.cc +++ b/src/nodes/backgroundCell/BackgroundCellTrafficManager.cc @@ -22,35 +22,6 @@ namespace simu5g { Define_Module(BackgroundCellTrafficManager); -double BackgroundCellTrafficManager::nrCqiTable[16] = { - -9999.0, - -9999.0, - -9999.0, - -5.5, - -3.5, - -1.5, - 0.5, - 4.5, - 5.5, - 7.5, - 10.5, - 12.5, - 15.5, - 17.5, - 21.5, - 25.5 -}; - -double BackgroundCellTrafficManager::getCqiFromTable(double snr) -{ - for (unsigned int i=0; i<16; i++) - { - if (snr < nrCqiTable[i]) - return i-1; - } - return 15; -} - BackgroundCellTrafficManager::BackgroundCellTrafficManager() { } diff --git a/src/nodes/backgroundCell/BackgroundCellTrafficManager.h b/src/nodes/backgroundCell/BackgroundCellTrafficManager.h index 375bd7a91..ae6228106 100644 --- a/src/nodes/backgroundCell/BackgroundCellTrafficManager.h +++ b/src/nodes/backgroundCell/BackgroundCellTrafficManager.h @@ -37,9 +37,6 @@ class BackgroundCellTrafficManager : public BackgroundTrafficManager // reference to class AMC for this cell BackgroundCellAmc* bgAmc_; - static double nrCqiTable[16]; - double getCqiFromTable(double snr); - public: BackgroundCellTrafficManager(); virtual ~BackgroundCellTrafficManager();