visualizer usage

55 views
Skip to first unread message

Janki Chhatbar

unread,
Jan 27, 2015, 2:26:23 AM1/27/15
to ns-3-...@googlegroups.com
HI

I have added obj = bld.add_ns3_program('visualizer') in ns3-20/examples/tutorial/wscript and ran first.cc in ns3-20 folder by giving command ./waf --run first --visualize. I have not included visualizer-module.h in first.cc but have included ns3::Visualizer::Run();.

This is throwing error  obj = bld.add_ns3_program('visualizer')
AttributeError: 'BuildContext' object has no attribute 'add_ns3_program'
 
Can anyone help..

Tommaso Pecorella

unread,
Jan 27, 2015, 8:40:13 AM1/27/15
to ns-3-...@googlegroups.com
Hi,

mind if I ask you where did you find the idea to add "obj = bld.add_ns3_program('visualizer')" to the wscript ?

T.

Janki Chhatbar

unread,
Jan 28, 2015, 12:04:15 AM1/28/15
to ns-3-...@googlegroups.com

Janki Chhatbar
M.Tech (Embedded Systems)
Nirma University
(+91) 9409239106

--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/4QrlqRgOqZ8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Tommaso Pecorella

unread,
Jan 28, 2015, 2:35:50 AM1/28/15
to ns-3-...@googlegroups.com
That post is from 3 years ago, and it refers to **10** versions ago. It's not a big surprise if it's not working.

Check the PyViz wiki page: http://www.nsnam.org/wiki/PyViz, read it, understand it, and you'll find out how to enable the visualiser in the tutorial.
Note that the wiki page is old as well, and the script syntax is slightly changed. However, if you understand what's the idea, then you'll know what to do.

T.

Janki Chhatbar

unread,
Jan 28, 2015, 2:37:15 AM1/28/15
to ns-3-...@googlegroups.com
Thanks a lot.. I will look into it.

Janki Chhatbar
M.Tech (Embedded Systems)
Nirma University
(+91) 9409239106

Janki Chhatbar

unread,
Jan 29, 2015, 4:31:12 AM1/29/15
to ns-3-...@googlegroups.com
Got it... Add
CommandLine cmd;
cmd.Parse (argc, argv);

in the code and run the code with --vis option.
Reply all
Reply to author
Forward
0 new messages