Netanim for older version of NS3

316 views
Skip to first unread message

Mas

unread,
Oct 31, 2019, 3:34:55 PM10/31/19
to ns-3-users
Hi All,
I have a limitation to use ns3.18 (old version) due implementation of some specific protocol. I want to know how i can run netanim to display animation. in ns3.18.  There is netanim folder with source code and one can generate .xml file by including "ns3/netanim-module.h" but ther is no execuatable (netanim)  to be passed .xm file as argument to display simulation results. So how can i see animation of simulation.

Thanks

Tom Henderson

unread,
Oct 31, 2019, 4:21:14 PM10/31/19
to ns-3-...@googlegroups.com, Mas
You need to build netanim, It is probably located in the
ns-allinone-3.18/netanim directory. If you go to the ns-allinone-3.18
directory, you will see a 'build.py' script that will attempt to build
netanim.

Once netanim is built, you can run it from within the netanim directory,
and then you need to import the XML file created from your ns-3 simulation.

This wiki page has more information:
https://www.nsnam.org/wiki/NetAnim_3.108

Netanim is not actively supported so some instructions may be stale.

- Tom

Mas

unread,
Nov 8, 2019, 1:05:43 AM11/8/19
to ns-3-users
Hi Tom
Thanks for giving time, I have seen netanim folder but there is bo build.py, instead there are two files "waf" and "wscript". Can you tell how i can compile it if there is no build.py.  I am already using other files and running simulation in this old version (my limitation)  but cant have netanim built.

Tom Henderson

unread,
Nov 8, 2019, 8:46:55 AM11/8/19
to ns-3-...@googlegroups.com, Mas
On 11/7/19 10:05 PM, Mas wrote:
> Hi Tom
> Thanks for giving time, I have seen netanim folder but there is bo
> build.py, instead there are two files "waf" and "wscript". Can you tell
> how i can compile it if there is no build.py.  I am already using other
> files and running simulation in this old version (my limitation)  but
> cant have netanim built.

build.py is in the ns-allinone-3.18 directory, not the netanim directory
(i.e. one level up from netanim)-- assuming that you have obtained
ns-3.18 release by downloading ns-allinone-3.18.

- Tom

Mas

unread,
Nov 8, 2019, 10:05:18 AM11/8/19
to ns-3-users
Thanks Tom once again.
Actually I have downloaded stdma implementation with ns3.18 folder and it does not contain build.py. I have downloaded this from
https://github.com/m00re/ns-3-stdma
And I build it with waf.
Whereas when I see official ns3.18 I get build.py. I think I need to build manually by downloading qt as mentioned in official ns3.18 build.py.

Tom Henderson

unread,
Nov 8, 2019, 12:31:06 PM11/8/19
to ns-3-...@googlegroups.com
I think you can do the following to try to build netanim. You probably
will do best with the most recent release of netanim (3.108) than the
version that comes with ns-allinone-3.18 (netanim-3.103).

1) download netanim-3.108 release, which is just the tagged version of
the tip of the repository:

$ hg clone http://code.nsnam.org/netanim

2) cd into netanim, and try to build:

$ cd netanim
$ qmake NetAnim.pro
$ make

3) if it succeeds, you should be able to invoke NetAnim

$ ./NetAnim

- Tom

Mas

unread,
Nov 9, 2019, 10:26:29 AM11/9/19
to ns-3-users
Thanks Tom

Mas

unread,
Nov 11, 2019, 1:00:00 PM11/11/19
to ns-3-users
Dear Tom
I am able to get it running as per your instructions but when i provide xml file created with ns3 it says "This XML format is not supported. Minimum version 3.108".
As i have told earlier that i am using older version of ns3 (ver  3.18) due implementation of STDMA. Should i get older version of netanim and build it ? Where i can get netanim version compatible with ns3.18 ( I have netanim folder in ns3.18 but running "qmake NetAnim.pro" says NetAnim.pro not found)

Tom Henderson

unread,
Nov 11, 2019, 3:13:39 PM11/11/19
to ns-3-...@googlegroups.com
On 11/11/19 10:00 AM, Mas wrote:
Dear Tom
I am able to get it running as per your instructions but when i provide xml file created with ns3 it says "This XML format is not supported. Minimum version 3.108".
As i have told earlier that i am using older version of ns3 (ver  3.18) due implementation of STDMA. Should i get older version of netanim and build it ? Where i can get netanim version compatible with ns3.18 ( I have netanim folder in ns3.18 but running "qmake NetAnim.pro" says NetAnim.pro not found)

The netanim folder within ns-3 is the supporting library (ns-3-specific) needed to generate the XML traces.  You need to be outside of ns-3 (ns-3.18) in a separate folder containing the netanim application.  You should find the file NetAnim.pro there.

Netanim version 3.103 was the one distributed with ns-3.18.  You can obtain it from:

https://www.nsnam.org/release/ns-allinone-3.18.tar.bz2

- Tom


On Saturday, November 9, 2019 at 8:26:29 PM UTC+5, Mas wrote:
Thanks Tom

On Friday, November 8, 2019 at 10:31:06 PM UTC+5, Tom Henderson wrote:
On 11/8/19 7:05 AM, Mas wrote:
> Thanks Tom once again.
> Actually I have downloaded stdma implementation with ns3.18 folder and it does not contain build.py. I have downloaded this from
> https://github.com/m00re/ns-3-stdma
> And I build it with waf.
> Whereas when I see official ns3.18 I get build.py. I think I need to build manually by downloading qt as mentioned in official ns3.18 build.py.
>

I think you can do the following to try to build netanim.  You probably
will do best with the most recent release of netanim (3.108) than the
version that comes with ns-allinone-3.18 (netanim-3.103).

1) download netanim-3.108 release, which is just the tagged version of
the tip of the repository:

$ hg clone http://code.nsnam.org/netanim

2) cd into netanim, and try to build:

$ cd netanim
$ qmake NetAnim.pro
$ make

3) if it succeeds, you should be able to invoke NetAnim

$ ./NetAnim

- Tom
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/d57950dc-1958-4abb-9b49-f150f6e99863%40googlegroups.com.


Mas

unread,
Nov 12, 2019, 4:50:57 AM11/12/19
to ns-3-users
Thanks alot Tom
finally i get it done. Thanks for giving time.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages