[Ns-bugs] [Bug 893] Lazy CourseChange notification for WaypointMobilityModel
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Fri Sep 24 03:30:15 PDT 2010
http://www.nsnam.org/bugzilla/show_bug.cgi?id=893
--- Comment #10 from Pavel Boyko <boyko at iitp.ru> 2010-09-24 06:30:14 EDT ---
Well,
finally I have an opinion on this bug ;)
I suggest to keep enable/disable course change notifications attribute and
make this a recommended practice for complex mobility models. I see two main
reasons for this:
1. Course change notification itself can be meaningless for non-linear mobility
models. For example some time ago we have extensively used circular mobility
model which can continuously notify about course changes. Now we are close to
implementing the airplane and m.b. the satellite mobility models which also do
not have linear segments at all. To monitor nodes movements we use periodic
position polling instead of listening to CourseChange in these cases.
2. I am happy to note that currently traced callbacks allow me to _completely_
decouple event producers and consumers in the ns-3 -- in the sense that trace
source knows strictly nothing about its listeners. I find this an important
architecture achievement and want to keep it. Letting trace source know the
number of listeners as proposed is definitely a step in the wrong direction.
Anyway, runtime optimizations is too weak reason to break nice architecture
invariants :)
Tom, please close this bug.
(In reply to comment #8)
> Mathieu suggested, at the tail end of the release review of this, to consider
> doing away with the Attribute and instead track whether there are listeners to
> the course change callback (and have lazy notify be a performance optimization
> for when there are no listeners).
>
> Do people want to go with that solution? It would be fine with me but we have
> no existing patch for it.
>
> Mathieu, is there a way to learn whether there are listeners registered, using
> the existing TracedCallback, or do we need to add an explicit counter in the
> class?
--
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
mailing list