Bug 2466 - a small bug in the AnimationInterface::ConnectCallbacks method
a small bug in the AnimationInterface::ConnectCallbacks method
Status: NEW
Product: ns-3
Classification: Unclassified
Component: netanim
PC Linux
: P5 minor
Assigned To: John Abraham
Depends on:
  Show dependency treegraph
Reported: 2016-08-07 09:33 EDT by Junling Bu
Modified: 2016-08-09 22:17 EDT (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Junling Bu 2016-08-07 09:33:05 EDT
   I think this is really a small bug in the AnimationInterface::ConnectCallbacks method

  1374 void 
  1375 AnimationInterface::ConnectCallbacks ()
  1376 {
  1377   // Connect the callbacks
  1378   Config::Connect ("/ChannelList/*/TxRxPointToPoint",
  1379                    MakeCallback (&AnimationInterface::DevTxTrace, this));
  1380   Config::Connect ("NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxBegin",
  1381                    MakeCallback (&AnimationInterface::WifiPhyTxBeginTrace, this));
  1382   Config::Connect ("NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxBegin",
  1383                    MakeCallback (&AnimationInterface::WifiPhyRxBeginTrace, this));
  1384   Config::ConnectWithoutContext ("/NodeList/*/$ns3::MobilityModel/CourseChange",
  1385                    MakeCallback (&AnimationInterface::MobilityCourseChangeTrace, this));
  1386   Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WimaxNetDevice/Tx",

At the line 1380 and 1382, I think we miss '/' which should be "/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxBegin" and "/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxBegin".

Another point I noticed  is that Config::ConnectWithoutContext at line 1384. 
Since all callbacks use Config::Connect except for "CourseChange", is there any special reason that we cannot use it for "CourseChange".


Comment 1 John Abraham 2016-08-09 22:01:32 EDT
It doesn't seem to make a difference for some reason. With/without the change the I get the same number for below

#ns-3-dev john$ ./waf --run wireless-animation &> out
#ns-3-dev john$ grep WifiPhyTxBegin out | wc -l

But I pushed it anyway

Comment 2 John Abraham 2016-08-09 22:17:37 EDT
I think it is because the mobility model is aggregated to a node (optionally) much later than the  the other models, which are aggregated closer to the creation of the stack.

But I'm not sure at this point