Closed Chiqq closed 2 months ago
Hi! !
I'm recently trying to create a custom service with my own scenario. Thanks to the documentations on the official website and example scenarios, I am currently be able to create new service to vehicle nodes. However, when it comes to stationary nodes, I will encounter the following error:
(NED module type "RSUService" not found (fully qualified type name expected) -- in module (artery::StationaryMiddleware) World.rsuRSU_0.middleware (id=34), at t=0.548813502304s, event #2)
Here's my service setting:
- Create the stationary points with RSUs.xml
<RSUs> <rsu id="RSU_0" positionX="103.0" positionY="100.0"> <antenna direction="-1.5707963267948966"/> <antenna direction="0"/> </rsu> </RSUs>
- Define separate rsuservices.xml
<?xml version="1.0" encoding="utf-8"?> <services> <service type="RSUService"> <listener port="8001" /> </service> </services>
The RSUService.ned/.h/.cc are all located in the same scenario folder.
- Set service.xml in omnetpp.ini
*.staticNodes.nodes = xmldoc("RSUs.xml") *.node[*].middleware.services = xmldoc("services.xml") *.rsu*.middleware.datetime = "2018-03-19 10:00:00" *.rsu*.middleware.services = xmldoc("rsuservices.xml")
The vehicle nodes will use the services.xml which is separate with rsuservice.xml
- Following the guideline to create the CMakeLists.txt
add_artery_feature(junctionservice VehicleService.cc RSUService.cc) generate_opp_message(Blockagestatus.msg TARGET junctionservice DIRECTORY junctionservice_msgs) add_opp_run(junctiontest CONFIG omnetpp.ini)
If I use services from application directory such as RsuCaService in the rsuservice.xml, there'll be no problem. So, I'm wondering that maybe something wrong with the CMakelist that it didn't account my RSUService.xml for stationary nodes.
Could anybody help me?
I now change the run setting in CMakelist.txt to: ''' add_opp_run(junctiontest NED_FOLDERS ${CMAKE_CURRENT_SOURCE_DIR} CONFIG omnetpp.ini) ''' Got no more error described above. Is this solution right?
Yes, the location of your new NED files needs to be included so OMNeT++ finds them during runtime.
Thank you very much for the reply and your time!!
Hi! !
I'm recently trying to create a custom service with my own scenario. Thanks to the documentations on the official website and example scenarios, I am currently be able to create new service to vehicle nodes. However, when it comes to stationary nodes, I will encounter the following error:
(NED module type "RSUService" not found (fully qualified type name expected) -- in module (artery::StationaryMiddleware) World.rsuRSU_0.middleware (id=34), at t=0.548813502304s, event #2)
Here's my service setting:
Create the stationary points with RSUs.xml
Define separate rsuservices.xml
The RSUService.ned/.h/.cc are all located in the same scenario folder.
Set service.xml in omnetpp.ini
.rsu.middleware.datetime = "2018-03-19 10:00:00" .rsu.middleware.services = xmldoc("rsuservices.xml")
add_artery_feature(junctionservice VehicleService.cc RSUService.cc) generate_opp_message(Blockagestatus.msg TARGET junctionservice DIRECTORY junctionservice_msgs) add_opp_run(junctiontest CONFIG omnetpp.ini)