Difference between revisions of "Install and run Aqua-Sim-NG code"

From Zheng Peng's Wiki
Jump to: navigation, search
(Created page with "== How-To == * download and unpack ns-3.27 source code: <code>wget http://www.nsnam.org/release/ns-allinone-3.27.tar.bz2</code> <code>tar xjf ns-allinone-3.27.tar.bz2</code...")
 
(How-To)
Line 1: Line 1:
== How-To ==
+
== How-To build ns-3 + aqua-sim==
  
 
* download and unpack ns-3.27 source code:
 
* download and unpack ns-3.27 source code:
Line 13: Line 13:
 
- move to ../src directory of ns-3:
 
- move to ../src directory of ns-3:
  
<code>cd "ns-3_working_dir/src/"</code>
+
<code>cd "ns-3_working_dir/ns-3.27/src/"</code>
  
 
- for multichannel MAC development:
 
- for multichannel MAC development:
Line 24: Line 24:
  
 
* build ns-3 with aqua-sim source code:
 
* build ns-3 with aqua-sim source code:
 +
 +
- change to ns-3 working directory:
 +
 +
<code>cd "ns-3_working_dir/ns-3.27/</code>
 +
 +
- configure and build using "waf":
 +
 +
<code>./waf clean</code>
 +
 +
<code>./waf configure --build-profile=debug --enable-examples</code>
 +
 +
<code>./waf</code>
 +
 +
 +
== How-To run examples ==
 +
 +
After building ns-3 + aqua-sim, simulation scripts can be run using <code>./waf --run 'script_name'</code> command.
 +
 +
The scripts are located in "/scratch" folder, and also in "examples" folders of the corresponding ns-3 models, located in "src/" folder.
 +
 +
E.g., the corresponding examples of aqua-sim models are located in <code>../src/aqua-sim-ng/examples/</code>
 +
 +
'''Note:''' Names of the scripts to execute may differ from the names of the corresponding .cc files.
 +
 +
For example, in order to run "../src/aqua-sim-ng/examples/multichannel_mac_example.cc" script, the following command should be executed:
 +
 +
<code>./waf --run ./waf --run MultichannelMacExample</code>
 +
 +
'script_source_name.cc' and corresponding 'script_name' mapping can be found in "../src/model_name/examples/wscript" file.

Revision as of 09:41, 17 August 2018

How-To build ns-3 + aqua-sim

  • download and unpack ns-3.27 source code:

wget http://www.nsnam.org/release/ns-allinone-3.27.tar.bz2

tar xjf ns-allinone-3.27.tar.bz2

Note: Aqua-Sim-NG has been tested with ns-3.27. The higher versions of ns-3 (i.e., 3.28, 3.29) might not be compilable with aqua-sim modules.

  • get aqua-sim source code:

- move to ../src directory of ns-3:

cd "ns-3_working_dir/ns-3.27/src/"

- for multichannel MAC development:

git clone https://github.com/dugdmitry/aqua-sim-ng.git

- original version from main repository:

git clone https://github.com/rmartin5/aqua-sim-ng.git

  • build ns-3 with aqua-sim source code:

- change to ns-3 working directory:

cd "ns-3_working_dir/ns-3.27/

- configure and build using "waf":

./waf clean

./waf configure --build-profile=debug --enable-examples

./waf


How-To run examples

After building ns-3 + aqua-sim, simulation scripts can be run using ./waf --run 'script_name' command.

The scripts are located in "/scratch" folder, and also in "examples" folders of the corresponding ns-3 models, located in "src/" folder.

E.g., the corresponding examples of aqua-sim models are located in ../src/aqua-sim-ng/examples/

Note: Names of the scripts to execute may differ from the names of the corresponding .cc files.

For example, in order to run "../src/aqua-sim-ng/examples/multichannel_mac_example.cc" script, the following command should be executed:

./waf --run ./waf --run MultichannelMacExample

'script_source_name.cc' and corresponding 'script_name' mapping can be found in "../src/model_name/examples/wscript" file.