Starting with the Waseda Sato Lab repository - Waseda-Sato-lab/ccn-sim GitHub Wiki

Obtaining the sources

To obtain the sources, one has to use git. The easiest way to do that is using the Sato-member-debian Virtualbox image. It is highly recommended that you use SSH keys to obtain and upload the sources. Please consult the Github page about generating and adding SSH keys to your account.

If you have already set your SSH key, to obtain the sources you can use the following command:

~ $ git clone [email protected]:Waseda-Sato-lab/ccn-sim.git

If you do not have your SSH key set, then you can use the equivalent command using the HTTPS protocol;

~ $ git clone https://github.com/Waseda-Sato-lab/ccn-sim.git

In both cases, the commands will create a directory ccn-sim in the directory in which you are standing.

Compiling

The main scenario building is done within the repository structure in ccn-sim/ndn-campus. The scenarios one has to build are defined in C++ source files in the ccn-sim/ndn-campus/scenarios folder. To configure and compile the sources, all you have to do is the following:

~/ccn-sim/ndn-campus $ ./waf configure

On older versions of Ubuntu and on newer versions of Debian, sometimes the waf script does not find the Boost libraries. In these cases it is better to point waf to the default library location. The command is below:

~/ccn-sim/ndn-campus $ ./waf configure --boost-includes=/usr/include/boost --boost-libs=/usr/lib/x86_64-linux-gnu

Once configured, all that is left is to compile with the following command:

~/ccn-sim/ndn-campus $ ./waf 

The process will compile all the scenarios in the scenarios/ directory and should not produce any errors.

Running a simulation

If all has proceeded as planned, then one can run the compiled simulations. If your C++ scenario was named example.cc, then you can use the following command:

~/ccn-sim/ndn-campus $ ./waf --run example

If you want to run the scenario with visualization, first make sure that the python-gnomedesktop package is installed. A simple way to check is the following:

# apt-get install python-gnomedesktop

Once that installation is completed, you can run the same scenario with visualization using the following command:

~/ccn-sim/ndn-campus $ ./waf --run example --vis