[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns]Tcl variable name from C++
There is a way to lookup an object if you know the name that Tcl gives it
using TclObject::lookup(_o121). But is there a way of getting the actual
variable name from this ?
As an example if I have
set node1 [$ns node]
then $node1 is of the form _o121 or similar. Can I get, from C++, the fact
that it is called 'node1'.
This may sound a strange thing to want to do, but I would like to get some
information back regarding the number of the node which has received a
packet so that I can display 'Node 3 receives a packet' within the Nam
simulation. But all I can get at the moment is 'Node _o121 receives a
packet'.
Thanks,
Mark
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com