[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] tcl.lookup
You should invoke class TclObject's static lookup method instead:
TclObject::lookup(const char * )
It is used all over ns. see any for an example.
--Padma.
On Thu, 19 Apr 2001, Guang Zeng wrote:
> Hi,
>
> I got a problem when I am doing some MobileIP simulation.
>
> I got a node named FA in my script.
> For example:
> -----------------------
> set FA [ns node 1.0.0]
> -------------------------
>
> And in C++ I wrote:
> -------------------------------------------------
> #include "object.h"
> .....
> ((NsObject*) tcl.lookup("FA"))->recv(p,h);
> ---------------------------------------------------
> I can pass the make, but when I run the Tcl script, the core dumped.
>
> And I used:
> ---------------------------------------
> printf("%d", tcl.lookup("FA"));
> ---------------------------------------
> it returns a lot of 0.
>
> Can anybody tell me what wrong?
> And how can I invoke a node's recv() in C++?
>
> Guang Zeng
> [email protected]
>
--
------------------------------------------------
Be true to your work, your word, and your friend.
--Thoreau
Padmaparna Haldar