[ns]Tcl variable name from C++

Gwendal LE GRAND Gwendal.Le-Grand@lip6.fr
Thu, 2 Mar 2000 09:59:48 +0100


try
$ns gen-map

> -----Message d'origine-----
> De : owner-ns-users@mash.CS.Berkeley.EDU
> [mailto:owner-ns-users@mash.CS.Berkeley.EDU]De la part de Mark Butler
> Envoyé : mercredi 1 mars 2000 12:24
> À : ns-users@mash.CS.Berkeley.EDU
> Objet : [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
>