Bugzilla – Bug 2190
Add LrWpan support to NetAnim
Last modified: 2017-03-12 20:42:51 UTC
I'm trying to figure out if an easy patch is possible.
Created attachment 2160 [details] Initial LrWpan support I have no idea of what I did. It's just a monkey-copy of te WiFi one (with some modifications to skip the ACKs). As a side note, ACKs are skipped because it's damn hard to track the actual source and destination.
Bug #2191 dependency is because even if we apply this patch, without 2191 the user will not see anything really useful.
Hello Professor Tommaso, I am currently working with NS-3 (3.26) and NetAnim (3.107). I have created a network of 6LoWPAN nodes (based on the example: src/sixlowpan/examples/example-ping-lr-wpan.cc) and I have included animation to the network (based on the example: src/netanim/examples/wireless-animation.cc). I can see the nodes in the NetAnim but I do no get any animation on the ping6 exchange. Here you have attached a patch, how does that work? how can I installed/included/used it to make my animation work? I am totally new in this, but I am a good student. Thanks!
Hi Tommaso, Can you give me a sample program so that I work on pushing this diff? john
(In reply to John Abraham from comment #4) > Hi Tommaso, > > Can you give me a sample program so that I work on pushing this diff? > > john Hi John, for lr-wpan this will do: src/sixlowpan/examples/example-ping-lr-wpan.cc Cheers
(In reply to Tommaso Pecorella from comment #5) > (In reply to John Abraham from comment #4) > > Hi Tommaso, > > > > Can you give me a sample program so that I work on pushing this diff? > > > > john > > Hi John, > > for lr-wpan this will do: > src/sixlowpan/examples/example-ping-lr-wpan.cc > > Cheers Can you please confirm, if this diff is still good from your side? ns-3-dev johnabraham$ hg diff src/lr-wpan/model/lr-wpan-phy.cc diff -r a6ab52173a9c src/lr-wpan/model/lr-wpan-phy.cc --- a/src/lr-wpan/model/lr-wpan-phy.cc Sat Mar 11 16:53:26 2017 -0800 +++ b/src/lr-wpan/model/lr-wpan-phy.cc Sat Mar 11 17:39:19 2017 -0800 @@ -546,6 +546,10 @@ LrWpanLqiTag lqiTag; p->RemovePacketTag (lqiTag); + m_phyTxBeginTrace (p); + m_currentTxPacket.first = p; + m_currentTxPacket.second = false; + Ptr<LrWpanSpectrumSignalParameters> txParams = Create<LrWpanSpectrumSignalParameters> (); txParams->duration = CalculateTxTime (p); txParams->txPhy = GetObject<SpectrumPhy> (); @@ -557,9 +561,6 @@ m_channel->StartTx (txParams); m_pdDataRequest = Simulator::Schedule (txParams->duration, &LrWpanPhy::EndTx, this); ChangeTrxState (IEEE_802_15_4_PHY_BUSY_TX); - m_phyTxBeginTrace (p); - m_currentTxPacket.first = p; - m_currentTxPacket.second = false; return; } else if ((m_trxState == IEEE_802_15_4_PHY_RX_ON)
Hi John, not really. AnimationInterface must be updated to handle the new NetDevices. I'm attaching a new patch (it's the old one, I just fixed the patching errors).
Created attachment 2795 [details] LrWpan support
Created attachment 2796 [details] LrWpan screenshot To clarify the previous message. Without the AnimationInterface changes the nodes are correctly shown (also their addresses), but the packets aren't.
Created attachment 2797 [details] Simplest test program W.r.t. the standard example, this one has: - AnimationInterface enabled, and - IPv4 stack disabled (not really necessary)
Thanks I committed, http://code.nsnam.org/ns-3-dev/rev/2d47f478b889
Should we close this and #2191 ?