[Ns-developers] log time -> log context

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Fri May 23 17:57:49 PDT 2008


On Fri, 2008-05-23 at 19:01 +0100, Gustavo Carneiro wrote:

>  to the start of scheduled callback function.  But I think this is not
> going to be common, so the extra effort will rarely be needed.

If the only problem is the initial effort, I am fine with doing it
myself: talking about this in this thread is taking orders of magnitude
more effort and time than actually implementing it :)

> If I knew that most Schedule calls were Node transitions, I would
> design a different API.  As it is now, the API that makes sense to me
> is this one.

That is a fair point.

>         What you are trying to suggest also goes against the design of
>         the
>         current API which is to move _all_ per-event arguments to the
>         Schedule
>         calls: we could have done what you suggested for all other
>         arguments:
>         
>         Simulator::SetNextDelay (Time delay);
>         Simulator::SetNextArguments (...);
> 
> It's not the same thing.  Simulator::SetCurrentNode does not apply to
> the next Schedule call specifically; it applies to all future Schedule
> calls.

The "expected" semantics of SetNextArguments is that it would have
stayed the same until you actually change it, hence, making it apply to
all future Schedule calls. But that is really a hypothetic case since we
are talking an API which is not and never will be.

> Well, I am proposing the only way that makes sense to me.  If it does
> not make sense to you then I have to withdraw.  A pity, but I can
> understand that it has to make sense to you... it's life.

I have looked again at your proposal and I really think that it would be
nice to avoid going against the way the rest of the API has been
designed.

Mathieu



More information about the Ns-developers mailing list