How to build DCE scratch with my ns3 module (no python)?

52 views
Skip to first unread message

易胜峰

unread,
Jun 20, 2022, 1:39:34 PM6/20/22
to ns-3-users
Hi all,
I have successfully compiled DCE1.10 on Ubuntu16.04. Now I want to use my NS3 module in DCE(use both DCE and ns3). I have add my script to the DCE 'example/' directory and some support in DCE's wscript. But I have some problems building the script.
For example the lorawan module is one of the modules I need in my script.
If I set it like this in wscript(without lorawan)
#############
module.add_example(needed = ['core', 'dce', 'mobility', 'wifi', 'fd-net-device'],
                       target='bin/dce-emu-scratch',
                       source=['example/dce-emu-scratch/dce-emu-scratch.cc'])
#############
I got
1.png
after adding lorawan to wscript, it said "program 'dce-emu-scratch' not found;".
#############
module.add_example(needed = ['core', 'dce', 'mobility', 'wifi', 'fd-net-device', 'lorawan'],
                       target='bin/dce-emu-scratch',
                       source=['example/dce-emu-scratch/dce-emu-scratch.cc'])
#############
2.png

PS. the ns3 building is like this.
3.png

I guess the problem is caused by the NS3 module (no python). So I want to know if DCE scratch can build with own ns3 module (no python)? If yes, how can I make it?

易胜峰

unread,
Jun 21, 2022, 3:59:04 AM6/21/22
to ns-3-users
Hi all,
I think i have solved it. By adding "ns3waf.check_modules" to the "def configure(conf):" function of the DCE/wscript file, DCE will check the corresponding module during configure.
For example "ns3waf.check_modules(conf, ['lorawan'], mandatory = False)"
4.png
Then the script can run successfully.
Reply all
Reply to author
Forward
0 new messages