DCE-Python-Binding-Error

54 views
Skip to first unread message

Sandeep

unread,
Apr 2, 2018, 8:56:47 PM4/2/18
to ns-3-users
Hey Everyone,

I am trying to run scripts available in the folder "dce/source/ns-3-dce/myscripts/" but ending up with python binding error. Even when i am running the example using the command "./waf --run example/dce-iperf " comes with same error but if i move the dce-iperf.cc file one folder up which is "ns-3-dce" then example work.

Is anybody know what's the problem with it , i am using python's version 2.7 

Please check the attachment for snapshot.

Thanks
dce-python-error.png

Sandeep

unread,
Apr 3, 2018, 12:39:57 PM4/3/18
to ns-3-users
Waiting to hear from someone who knows about it !!!
Message has been deleted

Dan Chow

unread,
Apr 3, 2018, 1:19:21 PM4/3/18
to ns-3-users
Check wscript and you will know how it works. You can see the modules it needed, the path for the executables, and the sources for it.

module.add_example(needed = ['core', 'internet', 'dce', 'point-to-point', 'netanim', 'csma'],
    target='bin/dce-iperf',
    source=['example/dce-iperf.cc', 'example/ccnx/misc-tools.cc'])

Just run with
./waf --run dce-iperf

As it is available. The snapshot has told you.

Sandeep

unread,
Apr 3, 2018, 6:55:54 PM4/3/18
to ns-3-users
There is no wscript for example in the 'example' folder. I tried with changing the wscript in the folder "myscripts/tuto1/" but nothing changed.

When i used this command " ./waf --run myscripts/tuto1/dce-tuto1" -> comes with error program not found

Using command in different "../../waf --run dce-tuto1" -> source not found.

I am just wondering is it working for you in this way. Please let me know if you need something else from me to help me in troubleshooting with this.

Thanks for the answer

Dan Chow

unread,
Apr 3, 2018, 9:01:10 PM4/3/18
to ns-3-users
Build commands for examples are in your/path/to/ns-3-dce/wscript, you can find the following function:

def build_dce_examples(module, bld):
  ...
 
module.add_example(needed = ['core', ...],
    target='bin/dce-iperf',
    source=['example/dce-iperf.cc', ...])
  ...  
 
Build commands for tuto1 are in your/path/to/ns-3-dce/myscripts/tuto1/wscript
, you can find the following function:

def build(bld):
  bld
.build_a_script('dce', needed = ['core', ...],
    target
='bin/dce-tuto1',
    source
=['dce-tuto1.cc'],)

You can see that all the executable binaries are located at your/path/to/ns-3-dce/build/bin, which can be run directly by:

./waf --run dce-iperf
./waf --run dce-tuto1

I suggest you search and read these files before posting for further help.

Sandeep

unread,
Apr 4, 2018, 2:18:51 AM4/4/18
to ns-3-users
Hi Dan ,

I already checked with wscript after you last post and everything seems fine as i didn't do any mess with the path. Please check the attachment for the code i copied from the wscript , even i tried to give exact path but still it's not working.

Thanks for the reply
reply.txt

Sandeep

unread,
Apr 4, 2018, 8:11:31 PM4/4/18
to ns-3-users
Can anybody please help me with this.


On Monday, April 2, 2018 at 5:56:47 PM UTC-7, Sandeep wrote:

Sandeep

unread,
Apr 10, 2018, 5:12:20 PM4/10/18
to ns-3-users
Can somebody reply about this problem !!


On Monday, April 2, 2018 at 5:56:47 PM UTC-7, Sandeep wrote:
Reply all
Reply to author
Forward
0 new messages