Get started with 5G-LENA in matter of minutes.
The first thing to do is take some confidence with the ns-3 environment. We cannot really help you here, but you can find on the Web a lot of information and tutorials. So, we will download and build the 5G-LENA project, but then we will point out some ns-3 tutorials before entering the NR domain.
We try to keep in sync with the latest advancements in ns-3-dev. By the version 1.0, we have upstreamed all our patches to ns-3-dev, making our module independent from the ns-3 version used.
To download a working copy of the ns-3-dev repository, you can do the following:
$ git clone firstname.lastname@example.org:nsnam/ns-3-dev.git $ cd ns-3-dev
Provide your username and password when asked. If you don't have an account on gitlab.com, you can use
https:/ as the repository address.
In case you are already using the git mirror of ns-3-dev, hosted at GitHub or GitLab, you are already ready to go (please make sure to be up-to-date with
git pull in the master branch!).
Before v1.0, the NR module needed a custom ns-3-dev version. For those of you that are upgrading from v0.4 to v1.0, the steps to switch to the official ns-3 repository are the following (without recreating the repo configuration):
$ git remote add nsnam email@example.com:nsnam/ns-3-dev.git $ git checkout master $ git pull nsnam master
Anyway, we will make sure that the master of our custom ns-3-dev will stay up-to-date with respect to the official ns-3-dev.
To test the installation, after following one of the previous point, you can do a simple configuration and compile test (more options for that later):
$ ./waf configure --enable-examples --enable-tests $ ./waf
A success for both previous commands indicates an overall success.
As a precondition to the following steps, you must have a working local git repository. If that is the case, then, your local git repo is ready to include our nr module:
cd src git clone firstname.lastname@example.org:cttc-lena/nr.git cd ..
Please note that the src/nr directory will be listed as "Untracked files" every time you do a git status command. Ignore it, as the directory lives as an independent module. As a result, we have now two parallel repository, but one lives inside the other. We are working to be able to put nr inside the contrib/ directory, as per standard ns-3 rules.
To test the resulting repository, let's configure the project again:
$ ./waf configure --enable-examples --enable-tests
If the NR module is recognized correctly, you should see "nr" in the list of built modules. If that is not the case, then most probably the previous point failed. Otherwise, you could compile it:
If that command returns successfully, Welcome to the NR world !
We assume that your work lives in a separate branch, and that the 'master' branch of the NR repository is left untouched as the first time you downloaded it. If it is not the case, then please move all your work in a separate branch.
A vanilla 'master' branch can be updated by simply running:
$ cd ns-3-dev/src/nr $ git checkout master $ git pull
At each release, we will incorporate into the master branch all the work that is meant to be released.
For what regards ns-3-dev (the main directory in which, under src/ or contrib/, you saved the NR module) the story is a bit different. Since we often rewrite its history to keep pace with ns-3-dev plus our patches to LTE that have not been accepted in the mainline, it is possible that with a simple
git pull it will not upgrade correctly. What we suggest is, if the
git pull strategy leads to conflicts, to download again our ns-3-dev repository, following the instructions at the beginning of this file (the repository is gitlab.com:cttc-lena/ns-3-dev.git).
If it is the first time you work with the ns-3 environment, we recommend to take things slowly (but steady) and going forward through simple steps. The ns-3 documentation https:/
- The ns-3 core tutorial: https:/
/ www.nsnam.org/ docs/ tutorial/ html/ index.html
- The ns-3 core manual: https:/
/ www.nsnam.org/ docs/ manual/ html/ index.html
- The LTE documentation: https:/
/ www.nsnam.org/ docs/ models/ html/ lte.html