Simple Animation problem?

129 views
Skip to first unread message

Peter King

unread,
Jan 31, 2017, 9:42:50 AM1/31/17
to ns-3-users
I'm an ns-3 newbie and am trying to work my way through the tutorials.
I thought I would add animation to first.cc as a test of my understanding, so I

#include "ns3/netanim-module.h"

and  add 3 lines to the code (after having created the nodes, and before Simulator::Run())

AnimationInterface anim("animation.xml");
anim.SetConstantPosition (nodes.Get(0), 1.0,0.0);
anim.SetConstantPosition (nodes.Get(1), 2.0 ,3.0);

It compiles successfully but when I run it, I get the message

msg="Node:0 not found in Location table", file=../src/netanim/model/animation-interface.cc, line=1499

What magic am I missing, I wa following the instructions in the NetAnim3.104 section of this wiki

Hoping this is not a stupid question?

Peter King


Tommaso Pecorella

unread,
Feb 4, 2017, 6:39:35 AM2/4/17
to ns-3-users
Hi,

it must be invoked as "AnimationInterface::SetConstantPosition" and before the AnimationInterface instantiation.
It is actually a limitation of AnimationInterface.

Cheers,

T.
Reply all
Reply to author
Forward
0 new messages