About Creating xml file for NetAnim

1,094 views
Skip to first unread message

Sandip Shivarkar

unread,
Sep 15, 2015, 5:02:42 AM9/15/15
to ns-3-users
Please tell me:
1) How to create the animation.xml file
2) What should be the location of animation.xml file i.e. under directory / allinone ns3.13/ns-3.23/src/netanim OR  /allinone/netanim
3) What modification are required in .cc file.

Konstantinos

unread,
Sep 15, 2015, 5:11:30 AM9/15/15
to ns-3-users
Hi,

They are all explained in the documentation

1) You do not create it. It is automatically created after the modifications you do in step (3).
2) Neither. It will be at the folder you run ./waf, e.g. /allinone-ns-3.23/ns-3.23/
3) Read the steps

Mandatory and optional set of steps

Here is the recommended set of steps for generating XML Animation traces.They must be applied just before the "Simulation::Run" statement.

NOTE: A node must have an associated mobility model in-order to be displayed on the animation. This applies for both stationary and mobile nodes (See notes below)

Mandatory
 0. Ensure that your wscript includes the "netanim" module. Example as in: src/netanim/examples/wscript. 
 1. Also include the header [#include "ns3/netanim-module.h"] in your test program
 2. Add the statement "AnimationInterface anim ("animation.xml");" before Simulator::Run()

Note that Step_0 is not required for /scratch. 
Reply all
Reply to author
Forward
0 new messages