[Ns-developers] Application::Start/Stop, time parameter inconsistent with Simulator::Schedule

Tom Henderson tomh at tomh.org
Tue May 27 23:02:23 PDT 2008


craigdo at ee.washington.edu wrote:
>>>> Alas, it's easy to make this mistake since 
>> Application::Start/Stop() accept
>>>> absolute time, while Simulator::Schedule accepts relative time...
>>> I also agree that this is confusing, though most likely 
>> doesn't matter
>>> in almost all cases (i.e., they're scheduled at time 0, so 
>> there's no
>>> difference).
>> At some point in time, Schedule was using absolute time but 
>> that is not
>> the case anymore because the extra Simulator::Now () was felt 
>> to be too
>> verbose. It would be nice to align Application with this to avoid this
>> kind of mistake.
> 
> Yes, this kind of thing drives me to distraction.  It's consistent
> everywhere except for the most commonly used, highest visibility case ;-)
> ... 
> 
> Let's change Application.
> 

We already have an example for naming an absolute time event: 
Simulator::StopAt();

Would Application::StartAt() and Application::StopAt() make it more clear?


More information about the Ns-developers mailing list