Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ComNetsHH/ldacs_simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
kunterbunt committed Nov 5, 2023
2 parents 60d9eea + 9375553 commit e2fbddb
Show file tree
Hide file tree
Showing 7 changed files with 178 additions and 267 deletions.
19 changes: 19 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Lindner
given-names: Sebastian
orcid: https://orcid.org/0000-0002-5694-9675
- family-names: Fuger
given-names: Konrad
orcid: https://orcid.org/0000-0002-8472-1483
- family-names: Ahmed
given-names: Musab Ahmed Eltayeb
orcid: https://orcid.org/0000-0001-5554-3414
- family-names: Timm-Giel
given-names: Andreas
orcid: https://orcid.org/0000-0002-5998-6113
title: "LDACS MCSOTDMA Simulator"
version: 1.0
doi: 10.5281/zenodo.8085497
date-released: 2023-06-26
52 changes: 49 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8085497.svg)](https://doi.org/10.5281/zenodo.8085497)

The L-Band Digital Aeronautical Communications System (LDACS) simulator provides an installation script for the simulator that downloads the other simulator components, defines simulation scenarios and provides result evaluation and graph creation.
Copyright (C) 2023 Sebastian Lindner, Konrad Fuger, Musab Ahmed Eltayeb Ahmed, Andreas Timm-Giel, Institute of Communication Networks, Hamburg University of Technology, Hamburg, Germany

Expand Down Expand Up @@ -29,14 +31,25 @@ A wrapper integrates the different components into OMNeT++.
All result evaluation and plotting is done with Python.

# Installation
tl;dr: open `install.sh` or `install_mac.sh` and adjust the number of cores `NUM_CPUS` to use for compiling; then run `./install.sh` or `./install_mac.sh`.
tl;dr: install `pipenv` on your system, open `install.sh` and adjust the number of cores `NUM_CPUS` to use for compiling; then run `./install.sh` if you're on Linux or `./install.sh mac` if you're on Mac.

Long version: all simulator components are bundled together into one installation script `install.sh` or `install_mac.sh`.
Long version: all simulator components are bundled together into one installation script `install.sh`.
By passing `mac` as an argument to the install script, it downloads the Mac version of the OMNeT++ simulator instead of the Linux version; this is the only difference between Linux and Mac versions of this simulator.
Please run it, and pay attention to the output.
For example, it downloads the OMNeT++ simulator of the right version from GitHub.
If this download via `wget` doesn't succeed, for example because GitHub's servers are beyond their capacity (you'll get a `503` error), then later parts of the script fail.
This is a very simple Bash script, so peek inside, it's easy to understand, and there's no error recovery built-in, so please debug using common sense!

Result parsing and graph generation is done using Python in respective scripts in `scenarios/results/`.
The packages that are required for this are installed in local `pipenv` environments, so make sure that you have `pipenv` available on your system!

## Debug mode
By default, the simulator is compiled in release mode so that simulations run faster.
To compile in debug mode, respective lines are commented-out in the `install.sh`.
Comment them in if you need debug mode.

If you get errors, chances are high that some component is still in release mode: every LDACS simulator component, the OMNeT++ simulator itself and the inet framework must *all* be in debug mode.

# Navigation
## Code
All custom code lives under `omnetpp-5.6.2/workspace/<component>`.
Expand All @@ -48,4 +61,37 @@ All network scenarios live under `scenarios`.
At first, you won't want to touch these files, but to see the nitty and gritty of the simulation setups, this is where you'll find it.

All results are generated from the `scenarios/results` folder.
Please go there and read its readme after installation!
Please go there and read its readme after installation!

# Simulator Components
The LDACS MCSOTDMA Simulator is composed of the following parts, which the `install.sh` downloads:

## The OMNeT++ Simulator
v5.6.2 is downloaded from [GitHub.com](https://github.com/omnetpp/omnetpp/releases).

## The INET Framework
v4.2.5 in a slightly modified version is downloaded from [GitHub.com](https://github.com/eltayebmusab/inet).

## The glue Library
v1.0 is downloaded from [Zenodo.org](https://zenodo.org/record/8082659).

## The RLC Library
v1.0 is downloaded from [Zenodo.org](https://zenodo.org/record/8082851).

## The ARQ Library
v1.0 is downloaded from [Zenodo.org](https://zenodo.org/record/8082899).

## The MCSOTDMA Library
v1.0 is downloaded from [Zenodo.org](https://zenodo.org/record/8082927).

## The Channel Model
v1.0 is downloaded from [Zenodo.org](https://zenodo.org/record/8082925).

## The Trace-Based App
v1.0 is downloaded from [Zenodo.org](https://zenodo.org/record/8082929).

## The Wrapper Library
v1.0 is downloaded from [Zenodo.org](https://zenodo.org/record/8082931).

## The modified GPSR Protocol
v1.0 is downloaded from [Zenodo.org](https://zenodo.org/record/8082919).
118 changes: 71 additions & 47 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,31 @@
NUM_CPUS=10 # set to your no. of cores

LOC_OMNET=https://github.com/omnetpp/omnetpp/releases/download/omnetpp-5.6.2/omnetpp-5.6.2-src-linux.tgz
LOC_OMNET_MAC=https://github.com/omnetpp/omnetpp/releases/download/omnetpp-5.6.2/omnetpp-5.6.2-src-macosx.tgz
LOC_INET=https://github.com/eltayebmusab/inet/archive/refs/tags/v4.2.5.tar.gz
LOC_GLUE=[email protected]:ComNetsHH/ldacs_glue.git
LOC_RLC=[email protected]:ComNetsHH/ldacs_rlc.git
LOC_ARQ=[email protected]:ComNetsHH/ldacs_arq.git
LOC_MCSOTDMA=[email protected]:ComNetsHH/ldacs_mcsotdma.git
LOC_RADIO=[email protected]:ComNetsHH/ldacs_tracebased_channel_model.git
LOC_APP=[email protected]:ComNetsHH/ldacs_tracebased_app.git
LOC_WRAPPER=[email protected]:ComNetsHH/ldacs_wrapper.git

LOC_GLUE=https://zenodo.org/record/8082659/files/ComNetsHH/ldacs_glue-v1.0.zip
LOC_RLC=https://zenodo.org/record/8082851/files/ComNetsHH/ldacs_rlc-v1.0.zip
LOC_ARQ=https://zenodo.org/record/8082899/files/ComNetsHH/ldacs_arq-v1.0.zip
LOC_MCSOTDMA=https://zenodo.org/record/8082927/files/ComNetsHH/ldacs_mcsotdma-v1.0.zip
LOC_RADIO=https://zenodo.org/record/8082925/files/ComNetsHH/ldacs_tracebased_channel_model-v1.0.zip
LOC_APP=https://zenodo.org/record/8082929/files/ComNetsHH/ldacs_tracebased_app-v1.0.zip
LOC_WRAPPER=https://zenodo.org/record/8082931/files/ComNetsHH/ldacs_wrapper-v1.0.zip
LOC_GPSR=https://zenodo.org/record/8082919/files/ComNetsHH/ldacs_gpsr-v1.0.zip
# Download OMNeT++ v5.6.2, unpack and go to directory.
echo "Downloading OMNeT++"
wget $LOC_OMNET
echo -e "\n\nUnpacking OMNeT++"
tar -xvzf omnetpp-5.6.2-src-linux.tgz
rm omnetpp-5.6.2-src-linux.tgz
echo -n "Downloading OMNeT++ "
if [ $1 = "mac" ]; then
echo "for Mac"
wget $LOC_OMNET_MAC
echo -e "\n\nUnpacking OMNeT++"
tar -xvzf omnetpp-5.6.2-src-macosx.tgz
rm omnetpp-5.6.2-src-macosx.tgz
else
echo "for Linux"
wget $LOC_OMNET
echo -e "\n\nUnpacking OMNeT++"
tar -xvzf omnetpp-5.6.2-src-linux.tgz
rm omnetpp-5.6.2-src-linux.tgz
fi
echo -e "\n\nCompiling OMNeT++"
cd omnetpp-5.6.2/
# Set PATH, configure and build.
Expand Down Expand Up @@ -62,9 +72,10 @@ cd ..

# Compile GLUE
echo -e "\n\nDownloading GLUE lib"
git clone $LOC_GLUE
cd intairnet-linklayer-glue
git pull
mkdir ldacs_glue
wget $LOC_GLUE
tar -xvzf ldacs_glue-v1.0.zip -C ldacs_glue --strip-components=1
cd ldacs_glue
mkdir cmake-build-release
cd cmake-build-release
cmake -DCMAKE_BUILD_TYPE=Release ..
Expand All @@ -78,9 +89,11 @@ cd ../..

# Compile RLC
echo -e "\n\nDownloading and compiling RLC lib"
git clone $LOC_RLC
cd avionic-rlc
ln -s ../intairnet-linklayer-glue/ glue-lib-headers
mkdir ldacs_rlc
wget $LOC_RLC
tar -xvzf ldacs_rlc-v1.0.zip -C ldacs_rlc --strip-components=1
cd ldacs_rlc
ln -s ../ldacs_glue/ glue-lib-headers
mkdir cmake-build-release
cd cmake-build-release
cmake -DCMAKE_BUILD_TYPE=Release ..
Expand All @@ -94,9 +107,11 @@ cd ../..

# Compile ARQ
echo -e "\n\nDownloading and compiling ARQ lib"
git clone $LOC_ARQ
cd avionic-arq/dev
ln -s ../../intairnet-linklayer-glue/ glue-lib-headers
mkdir ldacs_arq
wget $LOC_ARQ
tar -xvzf ldacs_arq-v1.0.zip -C ldacs_arq --strip-components=1
cd ldacs_arq/dev
ln -s ../../ldacs_glue/ glue-lib-headers
mkdir cmake-build-release
cd cmake-build-release
cmake -DCMAKE_BUILD_TYPE=Release ..
Expand All @@ -110,9 +125,12 @@ cd ../../..

# Compile MCSOTDMA
echo -e "\n\nDownloading and compiling MCSOTDMA lib"
git clone $LOC_MCSOTDMA
cd mc-sotdma
ln -s ../intairnet-linklayer-glue/ glue-lib-headers
ldacs_mcsotdma-v1.0.zip
mkdir ldacs_mcsotdma
wget $LOC_MCSOTDMA
tar -xvzf ldacs_mcsotdma-v1.0.zip -C ldacs_mcsotdma --strip-components=1
cd ldacs_mcsotdma
ln -s ../ldacs_glue/ glue-lib-headers
mkdir cmake-build-release
cd cmake-build-release
cmake -DCMAKE_BUILD_TYPE=Release ..
Expand All @@ -124,29 +142,35 @@ make -j$NUM_CPUS tuhh_intairnet_mc-sotdma
# make -j$NUM_CPUS tuhh_intairnet_mc-sotdma
cd ../..

# # Clone radio
# Clone radio
echo -e "\n\nDownloading channel model"
git clone $LOC_RADIO
cd intairnet-radio/src
mkdir ldacs_tracebased_channel_model
wget $LOC_RADIO
tar -xvzf ldacs_tracebased_channel_model-v1.0.zip -C ldacs_tracebased_channel_model --strip-components=1
cd ldacs_tracebased_channel_model/src
opp_makemake -f -s --deep -O out -KINET4_PROJ=../../inet4 -DINET_IMPORT -I../../inet4 -I. -I../../inet4/src -L../../inet4/src -lINET
#opp_makemake -f -s --deep -O out -KINET4_PROJ=../../inet4 -DINET_IMPORT -I../../inet4 -I. -I../../inet4/src -L../../inet4/src -lINET_dbg
# make MODE=debug -j$NUM_CPUS
make MODE=release -j$NUM_CPUS
cd ../..

# # Clone traceBacedApp
# Clone traceBacedApp
echo -e "\n\nDownloading UdpTracedBasedApp"
git clone $LOC_APP
cd intairnet-tracebasedapp/src
mkdir ldacs_tracebased_app
wget $LOC_APP
tar -xvzf ldacs_tracebased_app-v1.0.zip -C ldacs_tracebased_app --strip-components=1
cd ldacs_tracebased_app/src
opp_makemake --make-so -f --deep -KINET_PROJ=../../inet4 -DINET_IMPORT -I../../inet4/src -L../../inet4/src -lINET
make MODE=release -j$NUM_CPUS

cd ../..

# Clone gpsr
echo -e "\n\nDownloading GPSR modified"
git clone [email protected]:e-4/research-projects/intairnet-collection/intairnet-gpsr.git
cd intairnet-gpsr
mkdir ldacs_gpsr
wget $LOC_GPSR
tar -xvzf ldacs_gpsr-v1.0.zip -C ldacs_gpsr --strip-components=1
cd ldacs_gpsr
cd src
opp_makemake -f -s --deep -O out -KINET4_PROJ=../../inet4 -DINET_IMPORT -I../../inet4 -I. -I../../inet4/src -L../../inet4/src -lINET
# make MODE=debug -j$NUM_CPUS
Expand All @@ -156,21 +180,22 @@ cd ../..

# Clone wrapper
echo -e "\n\nDownloading OMNET++ wrapper"
git clone $LOC_WRAPPER
cd intairnet-omnet-wrapper/intairnet-link-layer
mkdir ldacs_wrapper
wget $LOC_WRAPPER
tar -xvzf ldacs_wrapper-v1.0.zip -C ldacs_wrapper --strip-components=1
cd ldacs_wrapper/intairnet-link-layer
echo "Compiling simulation binary"
unlink glue-lib
ln -s ../../intairnet-linklayer-glue/cmake-build-release ./glue-lib
ln -s ../../intairnet-linklayer-glue ./glue-lib-headers
ln -s ../../avionic-rlc/cmake-build-release ./avionic-rlc
ln -s ../../avionic-rlc ./avionic-rlc-headers
ln -s ../../mc-sotdma/cmake-build-release ./mc-sotdma
ln -s ../../mc-sotdma ./mc-sotdma-headers
ln -s ../../avionic-arq/dev/cmake-build-release ./avionic-arq
ln -s ../../avionic-arq/dev ./avionic-arq-headers
ln -s ../../ldacs_glue/cmake-build-release ./glue-lib
ln -s ../../ldacs_glue ./glue-lib-headers
ln -s ../../ldacs_rlc/cmake-build-release ./ldacs_rlc
ln -s ../../ldacs_rlc ./ldacs_rlc-headers
ln -s ../../ldacs_mcsotdma/cmake-build-release ./ldacs_mcsotdma
ln -s ../../ldacs_mcsotdma ./ldacs_mcsotdma-headers
ln -s ../../ldacs_arq/dev/cmake-build-release ./ldacs_arq
ln -s ../../ldacs_arq/dev ./ldacs_arq-headers
cd src
opp_makemake -f --deep -O out -KINET4_PROJ=../../../inet4 -DINET_IMPORT -I../../../inet4 -I../../../intairnet-tracebasedapp/src -I../../../intairnet-radio/src -I../../../intairnet-gpsr/src -I../glue-lib-headers -I../avionic-rlc-headers -I../avionic-arq-headers -I../mc-sotdma-headers -I. -I../../../inet4/src -L../../../inet4/src -L../../../intairnet-tracebasedapp/out/gcc-release/src/ -L../../../intairnet-radio/out/gcc-release/src/ -L../../../intairnet-gpsr/out/gcc-release/src/ -L../glue-lib -L../avionic-rlc -L../avionic-arq -L../mc-sotdma -lINET -lintairnet-tracebasedapp -lintairnet-radio -lintairnet-gpsr -lintairnet_linklayer_glue -ltuhh_intairnet_rlc -ltuhh_intairnet_arq -ltuhh_intairnet_mc-sotdma
#opp_makemake -f --deep -O out -KINET4_PROJ=../../../inet4 -DINET_IMPORT -I../../../inet4 -I../../../intairnet-traceBasedApp/src -I../../../intairnet-radio/src -I../../../intairnet-gpsr/src -I../glue-lib-headers -I../avionic-rlc-headers -I../avionic-arq-headers -I../mc-sotdma-headers -I. -I../../../inet4/src -L../../../inet4/src -L../../../intairnet-traceBasedApp/out/gcc-release/src/ -L../../../intairnet-radio/out/gcc-debug/src/ -L../../../intairnet-gpsr/out/gcc-debug/src/ -L../glue-lib -L../avionic-rlc -L../avionic-arq -L../mc-sotdma -lINET_dbg -lintairnet-traceBasedApp_dbg -lintairnet-radio_dbg -lintairnet-gpsr_dbg -lintairnet_linklayer_glue -ltuhh_intairnet_rlc -ltuhh_intairnet_arq -ltuhh_intairnet_mc-sotdma
opp_makemake -f --deep -O out -KINET4_PROJ=../../../inet4 -DINET_IMPORT -I../../../inet4 -I../../../ldacs_tracebased_app/src -I../../../ldacs_tracebased_channel_model/src -I../glue-lib-headers -I../ldacs_rlc-headers -I../ldacs_arq-headers -I../ldacs_mcsotdma-headers -I../../../ldacs_gpsr/src -I. -I../../../inet4/src -L../../../ldacs_gpsr/out/gcc-release/src/ -L../../../inet4/src -L../../../ldacs_tracebased_app/out/gcc-release/src/ -L../../../ldacs_tracebased_channel_model/out/gcc-release/src/ -L../glue-lib -L../ldacs_rlc -L../ldacs_arq -L../ldacs_mcsotdma -lINET -lldacs_tracebased_app -lldacs_tracebased_channel_model -lintairnet_linklayer_glue -ltuhh_intairnet_rlc -ltuhh_intairnet_arq -ltuhh_intairnet_mc-sotdma -lldacs_gpsr
#opp_makemake -f --deep -O out -KINET4_PROJ=../../../inet4 -DINET_IMPORT -I../../../inet4 -I../../../ldacs_tracebased_app/src -I../../../ldacs_tracebased_channel_model/src -I../glue-lib-headers -I../ldacs_rlc-headers -I../ldacs_arq-headers -I../ldacs_mcsotdma-headers -I../../../ldacs_gpsr/src -I. -I../../../inet4/src -L../../../inet4/src -L../../../ldacs_gpsr/out/gcc-release/src/ -L../../../ldacs_tracebased_app/out/gcc-release/src/ -L../../../ldacs_tracebased_channel_model/out/gcc-debug/src/ -L../glue-lib -L../ldacs_rlc -L../ldacs_arq -L../ldacs_mcsotdma -lINET_dbg -lldacs_tracebased_app_dbg -lldacs_tracebased_channel_model_dbg -lintairnet_linklayer_glue -ltuhh_intairnet_rlc -ltuhh_intairnet_arq -ltuhh_intairnet_mc-sotdma -lldacs_gpsr
# make MODE=debug -j$NUM_CPUS
make MODE=release -j$NUM_CPUS

Expand All @@ -180,4 +205,3 @@ cd ../../scenarios/results
echo -e "\n\nInstall python packages into local pipenv environment"
make install-python-env
echo -e "\n\nAll done! Try it by running the following commands:\ncd scenarios/results\nmake sanity-check\nThis should start simulations and create graphs in the scenarios/results/_imgs/ directory."

Loading

0 comments on commit e2fbddb

Please sign in to comment.