Bug 866 - WiMAX mobility models not aggregated to Node
WiMAX mobility models not aggregated to Node
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wimax
pre-release
All All
: P2 critical
Assigned To: Mohamed Amine ISMAIL
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-08 01:37 EDT by Tom Henderson
Modified: 2010-04-11 15:39 EDT (History)
2 users (show)

See Also:


Attachments
patch to fix wimax-multicast example (773 bytes, patch)
2010-04-08 01:41 EDT, Tom Henderson
Details | Diff
patch to try to fix simple-ofdm-wimax-channel (1.16 KB, patch)
2010-04-08 01:45 EDT, Tom Henderson
Details | Diff
This patch fixes the bug. It includes the two previous patches. (4.06 KB, patch)
2010-04-11 15:38 EDT, Mohamed Amine ISMAIL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2010-04-08 01:37:40 EDT
Mobility models in WiMAX are added to the Phy, not to the node, and they are not aggregated.  

in wimax-phy.h, there is:

  /**
   * \return the mobility model of the device
   */
  virtual Ptr<Object> GetMobility (void);
  /**
   * \brief set the mobility model of the device
   * \param mobility the mobility model to set
   */
  virtual void SetMobility (Ptr<Object> mobility);

and the examples/wimax/wimax-multicast.cc adds mobility this way.

Unfortunately, this does not work since Object::DoStart() is never called and so the nodes do not move.
Comment 1 Tom Henderson 2010-04-08 01:41:12 EDT
Created attachment 817 [details]
patch to fix wimax-multicast example

This patch will fix wimax-multicast.cc example.  However, there is more to this because the channel needs to find these new aggregated mobility models.
Comment 2 Tom Henderson 2010-04-08 01:45:08 EDT
Created attachment 818 [details]
patch to try to fix simple-ofdm-wimax-channel

This patch tries to use the aggregated mobility models.  However, this patch leads to a problem.  There is a runtime assertion in the buffer deserialization (maybe a packet without a proper header was received?).

assert failed. file=../src/common/buffer.h, line=707, cond="m_current >= m_dataStart && m_current <= m_dataEnd"

(gdb) bt
#0  0x00007ffff72d9960 in ns3::Buffer::Iterator::ReadU8 (this=0x7ffffffe6af0)
    at ../src/common/buffer.h:706
#1  0x00007ffff79a07cf in ns3::GenericMacHeader::Deserialize (this=
    0x7ffffffe6f00, start=...) at ../src/devices/wimax/wimax-mac-header.cc:271
#2  0x00007ffff72fcd15 in ns3::Packet::RemoveHeader (this=0x820e10, header=...)
    at ../src/common/packet.cc:264
#3  0x00007ffff7995d60 in ns3::SubscriberStationNetDevice::DoReceive (this=
    0x7b4120, packet=...) at ../src/devices/wimax/ss-net-device.cc:742
#4  0x00007ffff796dffe in ns3::WimaxNetDevice::Receive (this=0x7b4120, burst=
    ...) at ../src/devices/wimax/wimax-net-device.cc:528
#5  0x00007ffff7975f55 in ns3::MemPtrCallbackImpl<ns3::WimaxNetDevice*, void (ns3::WimaxNetDevice::*)(ns3::Ptr<ns3::PacketBurst const>), void, ns3::Ptr<ns3::PacketBurst const>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator() (this=0x7b4d40, a1=...)
    at debug/ns3/callback.h:223
#6  0x00007ffff79bd16c in ns3::Callback<void, ns3::Ptr<ns3::PacketBurst const>, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty, ns3::empty>::operator() (this=0x7ffffffe76c0, a1=...)
    at debug/ns3/callback.h:410
#7  0x00007ffff79b85e8 in ns3::SimpleOfdmWimaxPhy::EndReceive (this=0x7960d0, 
    burst=...) at ../src/devices/wimax/simple-ofdm-wimax-phy.cc:464


To reproduce this, you should be able to apply these two patches in the tracker and try to run wimax-multicast
Comment 3 Mohamed Amine ISMAIL 2010-04-11 15:38:07 EDT
Created attachment 824 [details]
This patch fixes the bug. It includes the two previous patches.

This patch fixes the bug. It includes the two previous patches.
Comment 4 Mohamed Amine ISMAIL 2010-04-11 15:39:33 EDT
The patch is not yet pushed to ns-3-dev.