NS-3 has utility create_module.py which can make a project containing several custom modules in a folder with the name of project. I did this and had added "simulations" directory with script, resulting tree:
my-custom-app
├── device-a
│ ├── CMakeLists.txt
│ ├── doc
│ │ └── device-a.rst
│ ├── examples
│ │ ├── CMakeLists.txt
│ │ └── device-a-example.cc
│ ├── helper
│ │ ├── device-a-helper.cc
│ │ └── device-a-helper.h
│ ├── model
│ │ ├── device-a.cc
│ │ └── device-a.h
│ └── test
│ └── device-a-test-suite.cc
├── device-b
│ ├── CMakeLists.txt
│ ├── doc
│ │ └── device-b.rst
│ ├── examples
│ │ ├── CMakeLists.txt
│ │ └── device-b-example.cc
│ ├── helper
│ │ ├── device-b-helper.cc
│ │ └── device-b-helper.h
│ ├── model
│ │ ├── device-b.cc
│ │ └── device-b.h
│ └── test
│ └── device-b-test-suite.cc
└── simulations
├── CMakeLists.txt
└── run-simulation.cc
$ ./ns3 configure --enable-examples --enable-tests
and
$ ./ns3 build
are complete successfully, but
$ ./ns3 run "run-simulation"
does not find executable file since command:
$ find /home/igor/workspace_ns3.45/ns-allinone-3.45/ns-3.45/build -name "run-simulation*"
successfully found it in the "build" directory. Answer looks like:
/home/igor/workspace_ns3.45/ns-allinone-3.45/ns-3.45/build/run-simulation
My goal is to encapsulate my custom modules and simulation scripts inside the project. What is the right way to do this?
Thanks,
Igor
-------------------------------------------------------------------------------