[ns] Application problem

Sergio.Herreria@det.uvigo.es Sergio.Herreria@det.uvigo.es
Thu Apr 25 05:20:34 2002


Hello!
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.