Hi
I think that you should use the following commands to call Tcl command in
your C++ code
for instance, if you want to call $ns now in your C++ code then you may use
this
Tcl& tcl = Tcl::instance();
tcl.evalf("$ns now");
float g=atof(tcl.result());
the above command will get the current time of simulator and print it
through c++ code.
Hope it works
Thanks
Regards
2008/5/12 Sidney Doria <[EMAIL PROTECTED]>:
>
> Hi,
>
> I suppose this can be very easy, but after read the chapter 3 of ns-2
> manual:
>
> how to call a TCL command from C++ code?
>
> For instance, I use many commands in .TCL code, just like:
>
> $ns_ at 0.1000000000 "$node_(0) join 0xE000000"
>
> *** How can I do a "join 0xE000000" from the node (using C++)? ***
>
>
> I would like to instruct the node (myself) to join in a multicast
> group. This call will be done by
> an APP attached to the node, but the join will be done by a routing
> agent (attached to the same node).
>
> --
> Sidney Doria
> Redes ad hoc móveis
> Mestrado em Computação
> UFCG
> Brasil
>
> "Nessa jornada, o conhecimento será o seu escudo..."
> (Mestre dos Magos no episódio do grimoire de ouro)
>
>
--
Mubashir Husain Rehmani
M2R Réseaux et Télécommunications
L2S Supélec
Université de Paris Sud XI
Mobile France: 00 33 (0)6 32 00 89 35