[ns] Application problem (fwd)
Tue Apr 30 07:36:01 2002
I don't know how to use the schedule function. Could you help me?
Thanks in advance.
why dont you schedule the event after some time ... same after 0.00001s
On Thu, 25 Apr 2002 Sergio.Herreria@det.uvigo.es wrote:
> I want an application sends a packet when I call a function. The function
> I've made is:
> double now = Scheduler::instance().clock();
> Tcl& tcl = Tcl::instance();
> tcl.evalc("Simulator instance");
> char *ns = tcl.result();
> tcl.evalf("%s at %f \"%s send 40\"", ns, now+0.000001, app);
> The packet size is 40 bytes.
> I think it works well but I have two questions:
> 1) If I put: tcl.evalf("%s at %f \"%s send 40\"", ns, now, app);
> it generates the error: can't schedule command in past
> 2) Is there a simpler manner of doing this?
> Thanks all.