-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathHOWTOSIMULATE
49 lines (32 loc) · 1.6 KB
/
HOWTOSIMULATE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Install OMNeT++ version 5.3. Newer versions may work but have not been tested.
To install OMNeT++, download it, extract the source code and compile with:
. setenv
CC=gcc CXX=g++ ./configure WITH_OSG=no WITH_OSGEARTH=no
make -j4
Run the OMNeT++ eclipse ide.
To run the eclipse ide, open a shell in the tdmh directory and run the following commands
cd <path to omnetpp-5.3 directory>
. setenv
cd -
omnetpp
If you get an error you may be using a too new version of java, install java 8
sudo apt install openjdk-8-jre
sudo update-alternatives --config java
Select as workspace the "simulator" directory in this git repository ("file" > "switch workspace" if no popup appears)
If an "empty workspace" window appears, deselect "install inet framework" and "import OMNeT++ programming examples"
Select "file" > "open projects from file system"
Select as directory "simulator/wandstem-mac" in this git repository
Select "wandstem-mac" > "simulations" from the left pane
Double click on a ned file
Select the "debug" green button
TODO: simulations fail when compiled in release mode. Find out why?
Once eclipse builds the binaries, you can run then also from the command line
(from the "simulator/WandstemMac" directory:
# First, make sure the omnet setenv script is executed
cd <path to omnetpp-5.3 directory>
. setenv
cd -
# Then compile and run
MODE=debug make
./out/clang-debug/src/WandstemMac_dbg -m -u Cmdenv -n src:simulations simulations/Line4.ini
time ./out/clang-debug/src/WandstemMac_dbg -m -u Cmdenv -n src:simulations simulations/Line4.ini --cmdenv-express-mode=false --cmdenv-log-prefix="%l %o %N:" > /dev/null