Skip to content

Commit

Permalink
space veins
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgeorge309 committed May 17, 2024
1 parent 729a368 commit e9d8eef
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
44 changes: 43 additions & 1 deletion opp_env/database/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -2056,6 +2056,11 @@ def get_project_descriptions():
},
"required_projects": {"omnetpp": ["4.2.1"]},
# ../../../neta Delay.ini -n ../..:../../..:$INET_ROOT/src
"smoke_test_commands": [
"NETA_BIN=$(echo $NETA_ALLINONE_ROOT/neta/out/*-debug/src/neta)",
"cd neta/src/simulations/AttackScenarios/DelayAttackScenario",
"$NETA_BIN Delay.ini -n $NETA_ALLINONE_ROOT/neta/src:$INET_ROOT/src",
],
"download_commands": [
"mkdir -p neta_allinone-1.0/neta",
"cd neta_allinone-1.0/neta",
Expand Down Expand Up @@ -2242,7 +2247,7 @@ def get_project_descriptions():
{
# POSTPONED - doesn't build; postponed due to openGL
"name": "artery", "version": "oppsummit2015",
"required_projects": {"omnetpp": ["4.6.*"], "vanetza": ["master"], "veins": ["5.2"]},
"required_projects": {"omnetpp": ["4.6.*"], "vanetza": ["master"], "veins": ["4.4"]},
"nix_packages": ["cmake", "boost"],
"download_url": "https://github.com/riebl/artery/archive/refs/tags/opp-summit2015.tar.gz",
"setenv_commands": [
Expand Down Expand Up @@ -2311,6 +2316,43 @@ def get_project_descriptions():
"clean_commands": ["make clean"]
},

{
# DONE
# TODO: add to catalog
"name": "space_veins", "version": "0.3",
"required_projects": {"omnetpp": ["5.7.x"]},
"nix_packages": ["proj", "python2", "sumo"],
"download_url": "https://github.com/veins/space_veins/archive/refs/tags/space_Veins-0.3.tar.gz",
"patch_commands": [
"mv src/makefrag src/makefrag.orig",
"export PYTHON2_BIN=${pkgs.python2}/bin/python2",
'sed -i "s|/usr/bin/env python2|$PYTHON2_BIN|" run',
'sed -i "s|../veins/src/veins|$VEINS_ROOT/src/veins|" run',
"mv src/makefrag.orig src/makefrag",
"""sed -i 's|\\#\\*.satellite\[0\].satelliteMobility.satelliteName = ""|*.satellite[0].satelliteMobility.satelliteName = "ISS (ZARYA)"|' examples/space_veins/omnetpp.ini""",
"""sed -i 's|\\#\\*.satellite\[0\].satelliteMobility.tle_line_one = ""|*.satellite[0].satelliteMobility.tle_line_one = "1 25544U 98067A 24066.21503963 .00016480 00000+0 29947-3 0 9999"|' examples/space_veins/omnetpp.ini""",
"""sed -i 's|\\#\\*.satellite\[0\].satelliteMobility.tle_line_two = ""|*.satellite[0].satelliteMobility.tle_line_two = "2 25544 51.6406 105.7199 0005859 331.9893 139.5156 15.49668492442586"|' examples/space_veins/omnetpp.ini""",
],
"smoke_test_commands": [
"""if [ "$BUILD_MODE" = "debug" ]; then DEBUG_POSTFIX="_dbg"; fi""",
"$VEINS_ROOT/sumo-launchd.py -v & bg_pid=$! &> /dev/null",
"cd examples/space_veins && opp_run$DEBUG_POSTFIX -l ../../src/space_veins -n ../../src:../../src/space_veins:../../src/space_veins/modules:../../src/space_veins/nodes:../../lib/inet/src:../../lib/veins/subprojects/veins_inet/src/veins_inet:../../lib/veins/src/veins:. -u Cmdenv -c Null-Island-Launchd --sim-time-limit=1s > /dev/null",
"kill $bg_pid &> /dev/null",
],
"setenv_commands": [
"echo $PYTHON2_BIN",
"export PROJ_ROOT=${pkgs.proj}",
"export PROJ_DEV_ROOT=${pkgs.proj.dev}",
"export INET_ROOT=$SPACE_VEINS_ROOT/lib/inet",
"export VEINS_ROOT=$SPACE_VEINS_ROOT/lib/veins",
"export SUMO_ROOT=${pkgs.sumo}",
'export OMNETPP_IMAGE_PATH="$OMNETPP_IMAGE_PATH:$VEINS_ROOT/images:$INET_ROOT/images"',
],
"build_commands": ["source setenv -f && ./configure && make makefiles && make -j16 MODE=$BUILD_MODE"],
# "build_commands": ["cd lib/inet && source setenv -f && make makefiles && make -j16 MODE=$BUILD_MODE && cd ../veins && source setenv -f && ./configure && make -j16 MODE=$BUILD_MODE && cd subprojects/veins_inet && source setenv -f && ./configure && make -j16 MODE=$BUILD_MODE && cd ../../../.. && make makefiles && cd src && make -j16 MODE=$BUILD_MODE"],
"clean_commands": ["make clean"]
},

{
# NOT WORKING - build errors
"name": "leach", "version": "master",
Expand Down
2 changes: 1 addition & 1 deletion opp_env/database/veins.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def make_veins_project_description(version, inet_versions, sumo_version, omnetpp
"sed -i 's|^#!/usr/bin/env python$|#!/usr/bin/env python2|' configure" if version<="4.6" else "",
],
"setenv_commands": [
'export OMNETPP_IMAGE_PATH="$OMNETPP_IMAGE_PATH:$VEINS_ROOT/images"',
'export OMNETPP_IMAGE_PATH="$OMNETPP_IMAGE_PATH:$VEINS_ROOT/images:$INET_ROOT/images"',
"export SUMO_ROOT=${pkgs.sumo}",
"source setenv" if version >= "5.1" else "",
"if [[ ! ($INET_VERSION < '4.0.0') ]]; then cd subprojects/veins_inet && source setenv; else cd subprojects/veins_inet3 && source setenv; fi" if version >= "5.1" else "",
Expand Down

0 comments on commit e9d8eef

Please sign in to comment.