PLEASE HELP: LoRa module example with netanim in NS-3

358 views
Skip to first unread message

David Janelidze

unread,
Jul 16, 2018, 7:08:53 PM7/16/18
to ns-3-users
Hello, I'm new to ns-3 and I'm new to networking as well. I'm trying to create LoRa simulation and its visual presentation in netanim. The module I work on with is the next one ==> https://github.com/signetlabdei/lorawan
For the first steps I want to make animation of the built-in example of the LoRa module from /lorawan/examples/complete-lorawan-network-example.cc (complete-lorawan-network-example.cc)
I have seen codes of several examples I'm trying to do this:

At first in the beggining I wrote #include "ns3/netanim-module.h"


And at the end after ==> Simulator::Stop (appStopTime + Hours (2)); <== after that I wrote:

 AnimationInterface anim ("pirveli.xml");
  anim.SetConstantPosition(gateways.Get(0), 1.0, 2.0);
  anim.SetConstantPosition(endDevices.Get(1), 2.0, 3.0);
  anim.SetConstantPosition(endDevices.Get(2), 3.0, 4.0);
 
I've tried to visualize only several nodes to see if it has output. Probably lora module sets it nodes positions automatically and I don't know how to indicate them there, but the first problem is that it doesn't run at all and it has some problem with referencing.
This is the output:

Auto Generated Inline Image 1

David Janelidze

unread,
Jul 16, 2018, 7:58:45 PM7/16/18
to ns-3-users
I figured it out myself I copied to the different folder and it compiles and somehow works but when I opened netanim and run the animation it was not quite I was expected. Can you help me to construct adequate animation for this module? 

There is attached screenshot of the xml trace file output looked like with the way above I described it.
Screenshot from 2018-07-16 16-54-44.png
Reply all
Reply to author
Forward
0 new messages