Reputation: 67
I am using OMNeT++ 5.5.1 installed in Ubuntu 19.04 and it is working fine in IDE environment.
But, I need to run an INET project from Ubuntu terminal. Can anyone suggest me what command to write in terminal if:
wireless/sensornetwork/omnetpp.ini
)?omnetpp.ini
?Thank you
Upvotes: 0
Views: 1395
Reputation: 7002
To run a simulation from command line do the following:
Go to directory of the example you want to start, e.g.:
cd showcases/wireless/sensornetwork
To see available config names in omnetpp.ini
type:
opp_run -a
To run selected config (e.g. LMac
) with GUI type the following command:
opp_run -m -u Qtenv -n ../../../src:../..:../../../tutorials:../../../showcases -l ../../../src/INET omnetpp.ini -c LMac
To see all runs for selected config type:
opp_run -s -c LMac omnetpp.ini -q runs
To start one selected run (e.g. 5) from config (e.g. LMac
) without GUI type the following command:
opp_run -m -u Cmdenv -n ../../../src:../..:../../../tutorials:../../../showcases -l ../../../src/INET omnetpp.ini -c LMac -r 5
To start all runs in selected config (e.g. LMac
) type the following command:
opp_run -m -u Cmdenv -n ../../../src:../..:../../../tutorials:../../../showcases -l ../../../src/INET omnetpp.ini -c LMac
The main options for opp_run
:
-u Qtenv
selects graphical view of a simulation (for command environment use -u Cmdenv
)-n
indicates directories of NED files-l
selects library (here: libINET.so
)For more information about running simulations look to OMNeT++ Manual.
Upvotes: 3