Skip to content

Commit ce0283c

Browse files
wischhofavarga
authored andcommitted
RniService: fix incomplete CamelCase renaming
In the recent refactorings, the RNIService was renamed to RniService. However, not all service names were adapted. As a consequence, in the service registry the Service was registered correctly with the name "RniService" but later requested as "RNIService" leading to a situation where the service is not found and not available. This caused a segment violation since the service pointer was not checked for being null. This fix corrects the naming and also adds a check to determine if the service pointer is null.
1 parent 7ee79cc commit ce0283c

6 files changed

Lines changed: 22 additions & 22 deletions

File tree

simulations/nr/mec/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The "numMecServices" parameter selects the number of MEC services running on the
1919

2020
```
2121
*.mecHost.mecPlatform.numMecServices = 1
22-
*.mecHost.mecPlatform.mecService[0].typename = "RNIService"
22+
*.mecHost.mecPlatform.mecService[0].typename = "RniService"
2323
*.mecHost.mecPlatform.mecService[0].localAddress = "mecHost.mecPlatform"
2424
*.mecHost.mecPlatform.mecService[0].localPort = 10020
2525
```

simulations/nr/mec/requestResponseApp/ApplicationDescriptors/ResponseApp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"appServiceRequired": [
1313
{
1414
"ServiceDependency" :{
15-
"serName" : "RNIService",
15+
"serName" : "RniService",
1616
"version" : "v1",
1717
"serCategory": "Network"
1818
}

simulations/nr/mec/rnisTest/ApplicationDescriptors/RnisTestApp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"appServiceRequired": [
1313
{
1414
"ServiceDependency" :{
15-
"serName" : "RNIService",
15+
"serName" : "RniService",
1616
"version" : "v2",
1717
"serCategory": "RNI"
1818
}

simulations/nr/mec/rnisTest/README.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ The simulations/NR/mec/rnisTest folder includes a simulation example that shows
66
and use the Radio Network Information Service.
77

88
The RnisTest configuration in the omnetpp.ini file represents a scenario with one UE in a single-cell
9-
network, endowed with one MEC Host. The MEC Platform within the MEC Host provides the RNIService.
9+
network, endowed with one MEC Host. The MEC Platform within the MEC Host provides the RniService.
1010

1111
The UE runs the UeRnisTestApp locally and interacts with the MecRnisTestApp residing at the MEC Host.
1212
The implementation of the applications can be found in apps/mec/RnisTestApp folder.
1313

1414
At the beginning of the simulation, the UE requests to MEC Orchestrator to instantiate a new
1515
MecRnisTestApp. Upon receiving an acknowledgement indicating that the MEC app has been deployed, the
1616
UeRnisTestApp sends a "start" message to the MecRnisTestApp, triggering a periodic request for
17-
information to the RNIService from the MEC app.
18-
The RNIService replies with a message in JSON format including the L2Measurements, as specified by
17+
information to the RniService from the MEC app.
18+
The RniService replies with a message in JSON format including the L2Measurements, as specified by
1919
the ETSI MEC specifications about the RNIS API. Each response obtained by the MEC app is forwarded
2020
to the UE app, which in turn prints it out to the Qtenv log (and to a file, if the logger flag
2121
has been set).con

src/simu5g/apps/mec/MecRequestResponseApp/MecResponseApp.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void MecResponseApp::handleMp1Message(int connId)
164164
if (!jsonBody.empty()) {
165165
jsonBody = jsonBody[0];
166166
std::string serName = jsonBody["serName"];
167-
if (serName == "RNIService") {
167+
if (serName == "RniService") {
168168
if (jsonBody.contains("transportInfo")) {
169169
nlohmann::json endPoint = jsonBody["transportInfo"]["endPoint"]["addresses"];
170170
EV << "address: " << endPoint["host"] << " port: " << endPoint["port"] << endl;
@@ -176,7 +176,7 @@ void MecResponseApp::handleMp1Message(int connId)
176176
}
177177
}
178178
else {
179-
EV << "MecPlatooningApp::handleMp1Message - RNIService not found" << endl;
179+
EV << "MecPlatooningApp::handleMp1Message - RniService not found" << endl;
180180
serviceAddress_ = L3Address();
181181
}
182182
}
@@ -221,7 +221,7 @@ void MecResponseApp::doComputation()
221221
void MecResponseApp::sendGetRequest()
222222
{
223223
//check if the ueAppAddress is specified
224-
if (serviceSocket_->getState() == inet::TcpSocket::CONNECTED) {
224+
if (serviceSocket_ != NULL && serviceSocket_->getState() == inet::TcpSocket::CONNECTED) {
225225
EV << "MecResponseApp::sendGetRequest(): send request to the Location Service" << endl;
226226
std::stringstream uri;
227227
uri << "/example/rni/v2/queries/layer2_meas"; //TODO filter the request to get less data
@@ -243,7 +243,7 @@ void MecResponseApp::established(int connId)
243243

244244
// once the connection with the Service Registry has been established, obtain the
245245
// endPoint (address+port) of the Location Service
246-
const char *uri = "/example/mec_service_mgmt/v1/services?ser_name=RNIService";
246+
const char *uri = "/example/mec_service_mgmt/v1/services?ser_name=RniService";
247247
std::string host = mp1Socket_->getRemoteAddress().str() + ":" + std::to_string(mp1Socket_->getRemotePort());
248248

249249
Http::sendGetRequest(mp1Socket_, host.c_str(), uri);

tests/fingerprint/simulations.csv

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@
8484
/simulations/nr/mec/multiMecHost/, -f omnetpp.ini -c MultiMec -r 0, 20s, 0c01-c7b5/tplx;c6f8-ec85/~tNl;e58a-847e/sz, PASS,
8585
/simulations/nr/mec/multiOperator/, -f omnetpp.ini -c MultiOperator_MultiMec -r 0, 20s, c183-b1c3/tplx;a202-f6a6/~tNl;cc38-1a03/sz, PASS,
8686
/simulations/nr/mec/multiOperator/, -f omnetpp.ini -c MultiOperator_SingleMec -r 0, 20s, 7453-5838/tplx;5837-c83e/~tNl;16ba-7503/sz, PASS,
87-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c best_case -r 0, 5s, d2fc-dc3c/tplx;adec-e439/~tNl;f173-dc15/sz, PASS,
88-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c best_case_load_gen -r 0, 5s, d2fc-dc3c/tplx;adec-e439/~tNl;f173-dc15/sz, PASS,
89-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c bgUEs_gnb1 -r 0, 5s, c2a1-90a8/tplx;adec-e439/~tNl;b658-0a63/sz, PASS,
90-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c bgUEs_gnb2 -r 0, 5s, c2a1-90a8/tplx;adec-e439/~tNl;b658-0a63/sz, PASS,
91-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c farRNI -r 0, 5s, 238a-f3c0/tplx;adec-e439/~tNl;7361-1ae9/sz, PASS,
92-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c MultiMec -r 0, 5s, c2a1-90a8/tplx;adec-e439/~tNl;b658-0a63/sz, PASS,
93-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c nearRNI -r 0, 5s, 4f00-54a0/tplx;adec-e439/~tNl;13f8-3e9e/sz, PASS,
94-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c nearRNI_bgUEs_gnb1 -r 0, 5s, 4f00-54a0/tplx;adec-e439/~tNl;13f8-3e9e/sz, PASS,
95-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c nearRNI_bgUEs_gnb2 -r 0, 5s, 4f00-54a0/tplx;adec-e439/~tNl;13f8-3e9e/sz, PASS,
96-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c worst_case -r 0, 5s, d2fc-dc3c/tplx;adec-e439/~tNl;f173-dc15/sz, PASS,
97-
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c worst_case_load_gen -r 0, 5s, d2fc-dc3c/tplx;adec-e439/~tNl;f173-dc15/sz, PASS,
87+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c best_case -r 0, 10s, 2d01-2d89/tplx;646f-e204/~tNl;9843-27a5/sz, PASS,
88+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c best_case_load_gen -r 0, 10s, 070a-89e5/tplx;68c9-daad/~tNl;6443-27aa/sz, PASS,
89+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c bgUEs_gnb1 -r 0, 10s, eb0e-1658/tplx;865f-562a/~tNl;ab2c-d2d2/sz, PASS,
90+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c bgUEs_gnb2 -r 0, 10s, eb0e-1658/tplx;865f-562a/~tNl;ab2c-d2d2/sz, PASS,
91+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c farRNI -r 0, 10s, 0228-ea68/tplx;92d5-51b1/~tNl;8a0a-1273/sz, PASS,
92+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c MultiMec -r 0, 10s, eb0e-1658/tplx;865f-562a/~tNl;ab2c-d2d2/sz, PASS,
93+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c nearRNI -r 0, 10s, dc22-f3a4/tplx;124b-f628/~tNl;0d13-0af5/sz, PASS,
94+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c nearRNI_bgUEs_gnb1 -r 0, 10s, dc22-f3a4/tplx;124b-f628/~tNl;0d13-0af5/sz, PASS,
95+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c nearRNI_bgUEs_gnb2 -r 0, 10s, dc22-f3a4/tplx;124b-f628/~tNl;0d13-0af5/sz, PASS,
96+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c worst_case -r 0, 10s, 170c-d176/tplx;e749-180f/~tNl;6443-27aa/sz, PASS,
97+
/simulations/nr/mec/requestResponseApp/, -f omnetpp.ini -c worst_case_load_gen -r 0, 10s, 49b7-5399/tplx;9753-99a0/~tNl;6443-27aa/sz, PASS,
9898
/simulations/nr/mec/rnisTest/, -f omnetpp.ini -c RnisTest -r 0, 5s, c9a0-d49e/tplx;633f-50d8/~tNl;6ae9-f4dc/sz, PASS,
9999
/simulations/nr/mec/singleMecHost/, -f omnetpp.ini -c BgGeneratorApp -r 0, 5s, a64d-8180/tplx;1cf9-34be/~tNl;9ff0-3d43/sz, PASS,
100100
/simulations/nr/mec/singleMecHost/, -f omnetpp.ini -c LoadGenerator -r 0, 5s, f45b-c2e3/tplx;527b-faab/~tNl;9ff0-3d43/sz, PASS,
@@ -120,7 +120,7 @@
120120
/simulations/nr/tutorial/, -f omnetpp.ini -c Multiple-UEs -r 0, 5s, 1c69-a30b/tplx;fae1-004b/~tNl;911b-750d/sz, PASS,
121121
/simulations/nr/tutorial/, -f omnetpp.ini -c Numerology -r 0, 5s, fb28-e3fd/tplx;d46b-e1ec/~tNl;e91e-f3d9/sz, PASS,
122122
/simulations/nr/tutorial/, -f omnetpp.ini -c Single-UE -r 0, 5s, f524-33c2/tplx;8675-5f47/~tNl;8da4-38f2/sz, PASS,
123-
/simulations/nr/videostreaming_dataset_generator/, -f omnetpp.ini -c UrbanNetwork -r 0, 5s, 03fa-04ee/tplx;56e7-b598/~tNl;7b04-51bc/sz, PASS,
123+
/simulations/nr/videostreaming_dataset_generator/, -f omnetpp.ini -c UrbanNetwork -r 0, 10s, 5987-db9a/tplx;8c3b-d289/~tNl;2b40-6bb9/sz, PASS,
124124
/tutorials/nr/, -f omnetpp.ini -c BgTraffic -r 0, 5s, 9e6c-745b/tplx;77bc-4597/~tNl;3421-2729/sz, PASS,
125125
/tutorials/nr/, -f omnetpp.ini -c CarrierAggregation -r 0, 5s, dd77-d910/tplx;6f78-f509/~tNl;e1f6-d784/sz, PASS,
126126
/tutorials/nr/, -f omnetpp.ini -c Multiple-UEs -r 0, 5s, e36e-b3c6/tplx;9607-cd9f/~tNl;b433-42c8/sz, PASS,

0 commit comments

Comments
 (0)