Developing New Features
If you want to implement new features, simulation models or algorithms in SiENA, please read this manual. SiENA is fairly complex, but there is a good chance that you only need to change small parts of it.
Overview
Before continuing with a detailed description of how to integrate new functionality, here is an overview of all important stuff.
- If you have any remaining questions after reading this manual, please ask the maintainers. They will try to answer and update this manual.
- Read the installation instructions carefully
- Make yourselve familiar with ns-3, there is a chance that your problem might be related to ns-3, it’s a complex software
- Important files and folders
ns-3.27/src/siena
The source of SiENA inside ns-3; the folder structure should be self-explanatoryns-3.27/data
Config files and data basisns-3.27/scratch/siena.cc
The script to start SiENAns-3.27/src/siena/wscript
Tells ns-3 about the module; update withns-3.27/tools/initProject.py
ns-3.27/waf-configure
Init ns-3; e.g. set debug or optimized mode
- Changing algorithms, etc. with the Registry
- Register your generic function in
siena/modules/Registry.h
with an unique name - Use name in the config; e.g.
PrivADE_Plus.json
"server_handle_token":"my_fancy_function"
- Register your generic function in
Eclipse
ns-3 and SiENA are intended to be used with Eclipse. Install the C++ version of Eclipse. Clone the github repository and add the project to Eclipse. It is already an Eclipse project which is indicated by the wizard. If you name the project siena, the building and running the project will already work. Otherwise:
- Project Properties
- C/C++ Build
- Builder Settings
- Build command: ${workspace_loc:siena}/ns-3.27/waf
- Generate Makefiles automatically: No
- Build directory: ${workspace_loc:siena}/ns-3.27/build
- Refresh Policy: Add siena/ns-3.27
- Builder Settings
- C/C++ Build
- Run Configuration
- Main
- C/C++ Application: ns-3.27/build/scratch/siena
- Arguments
- Working directory: ${workspace_loc:siena/ns-3.27/}
- Environment
- Add
LD_LIBRARY_PATH
-${workspace_loc:siena/ns-3.27/build};${workspace_loc:siena/BRITE}
- Add
- Main