forked from riebl/artery
-
Notifications
You must be signed in to change notification settings - Fork 0
How to create a new Service and Scenario in Artery
Alexander Willecke edited this page Mar 29, 2023
·
5 revisions
- Have a look at the
ExampleService
insrc/artery/application
first - Create and edit Service in
src/artery/application/
(preferably as a new folder)- Service files:
Your_Service.cc
andYour_Service.h
- Message File (optional):
Your_Message.msg
(c.f. OMNet++ documentation) - CMakeLists.txt
- Service files:
- Create and edit
Your_Service.ned
file for Service insrc/artery/application
- Edit CMakeLists.txt in
src/artery/
and add your Service folderif(WITH_YOUR_SERVICE) add_subdirectory(application/Your_Service_directory) endif()
- Edit CMakeLists.txt in artery root folder and add your service as option
option(WITH_YOUR_SERVICE "Build Artery with Your Service" ON)
- Create new Scenario folder (name the folder with your scenario name) in
scenario/
- Create and edit necessary files for Sumo (c.f. SUMO documentation)
- Sumo config:
Your_Scenario.sumocfg
- Network file:
Your_Scenario.net.xml
- Routing file:
Your_Scenario.rou.xml
- Sumo config:
- Create and edit necessary files for Artery
- CMakeLists.txt (necessary line:
add_opp_run(your_scenario CONFIG omnetpp.ini)
) - omnetpp.ini (have a look at
scenarios/artery/omnetpp.ini
as is showcases many of Artery's features) - Set the
*.traci.launcher.sumocfg = Your_Scenario.sumocfg
in youromnetpp.ini
to launch your SUMO scenario - services.xml (specify the services the vehilces will run, e.g.
CaService
orYour_Service
) - sensors.xml (optional, when using the Environment Model and sensors)
- CMakeLists.txt (necessary line:
- Edit CMakeLists.txt in
scenario/
folder and add your scenario as subfolderadd_subdirectory(your_scenario_folder)
You should be able to build and run your scenario with cmake --build build --target run_your_scenario
.