Re: [ns] Accessing object created in Tcl from C++

2006-08-21 Thread Prashant Batra

Hi Vijay,

The problem described by you seems to be something very specific to your 
codei mean to the modifications you have doneso it is really not 
possible for me to tell you anything straightforward on the matter.
I am sure if you take a deeper look into your code and try and 
understand what is it that a wireless node is expecting and I am not 
providing, you will definitely be able to work things out.

Sorry and All the Best.

 - Prashant

Vijay Ghorpade wrote:

  
 Hi Prashant,
   I have a problem with ns-2
 When i make some change in the node class and compile the code it 
 doesnot give any errors. The wired scripts also work.
 But when i try with wireless scripts it gives either segmentation 
 fault or event UID not found error.
 Why it is so. Can you help me out

 Vijay


 On Fri, 18 Aug 2006 Prashant Batra wrote :
 
 Hi Shafiq,
 
 To access a variable declared in your TCL script, you can use the 
 following
 method :-
 
 Tcl tcl = Tcl::instance();
 tcl.lookup(char* s);
 
 The 'lookup()' function of Tcl class takes a pointer to the name of the
 variable in the TCL script and returns you a TclObject class object,
 which you can further typecast into your specific object type and use.
 
   - Prashant
 
 
 
 Shafiq Hashmi wrote:
   Hello all,
  
   Is it possible to access an object of Agent/RCAgent, created in 
 Tcl, from another C++ class.
  
   Can anybody tell me ?
  
   Thanx
   Shafiq
  
  
 



 http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/[EMAIL
  PROTECTED] 



Re: [ns] Accessing object created in Tcl from C++

2006-08-18 Thread Prashant Batra

Hi Shafiq,

To access a variable declared in your TCL script, you can use the following 
method :-

Tcl tcl = Tcl::instance();
tcl.lookup(char* s);

The 'lookup()' function of Tcl class takes a pointer to the name of the 
variable in the TCL script and returns you a TclObject class object, 
which you can further typecast into your specific object type and use.

 - Prashant



Shafiq Hashmi wrote:
 Hello all,

 Is it possible to access an object of Agent/RCAgent, created in Tcl, from 
 another C++ class.

 Can anybody tell me ?

 Thanx
 Shafiq