[Ns-bugs] [Bug 893] Lazy CourseChange notification for WaypointMobilityModel
code at nsnam.ece.gatech.edu
Thu Aug 5 21:16:13 PDT 2010
--- Comment #3 from Tom Henderson <tomh at tomh.org> 2010-08-06 00:16:13 EDT ---
(In reply to comment #2)
> Unless I'm missing something, the suggestion of adding Simulator::Schedule
> (waypoint.time, &WaypointMobilityModel::Update, this) to the AddWaypoint method
> actually will work.
> As long as we call Update() at the time of each waypoint (see course of events
> when now == m_next.time), the newWaypoint will be true and NotifyCourseChange
> will be called at the proper time. At this point, m_current is set to m_next,
> and the new m_next triggers a NotifyCourseChange again _only_ when now ==
> m_next.time again.
It has been a while since I drew that conclusion but I think my concern was due
to the statement preceding it:
if ( now <= m_current.time )
if m_current is set to m_next, and the next time Update() is called (at
m_next.time), now will be equal to m_current.time (which was set to m_next.time
previously), and the method will return without the notification.
But, I think a test case will settle the issue, so if you think it will work OK
and have a test for it, I'm fine with your suggestion.
> Tom, your suggestion of making this configurable has placated my performance
> concerns, as long as the new (non-lazy) behavior is disabled by default :)
Yes, I did not post that suggestion in the tracker, but I suggested to you to
make this an attribute to satisfy performance concerns, and I would be OK with
making the default be the current behavior.
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs