Hi

>From C++ use it is better to use:
Scheduler::instance().clock()

You can also call the Otcl code from C++, but the former will call C++
again. So if you use C++, call C++ functions directly. Here is the Otcl
solution

Tcl& tcl = Tcl::instance();
tcl.evalf("[Simulator instance] now");

Then analyse tcl.result()

Sincerely,
Alexander Sayenko (PhD)
Assistant
Telecommunication laboratory, MIT department
University of Jyvaskyla, Finland



Dear NS-users

I am modifying an extension of ns (RSVP-TE\ns), and at some point I need to
have an access to the current date (given in tcl by $ns now). I don't know
how to do this. I suppose I could use something like:

Tcl& tcl = Tcl::instance();
tcl.evalf("%d now", my_simulator_instance);

but I don't know how to refer to the simulator instance.

I would be very grateful if you could help me on this topic.

Mit freundlichen Grüßen, with kind regards, cordialement,

----------------------------------------------------------
Gilles BERTRAND
Telecom INT (GET) - University of Stuttgart
----------------------------------------------------------



-- 
Internal Virus Database is out-of-date.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.2/329 - Release Date: 02.05.2006


Reply via email to