[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] global variables possible?



In otcl, add it as either a class variable (not a object variable) or a
global tcl variable (see a tcl book on how to do this). In c++, do it as a
class static member. If you want it in both worlds, declare it as a c++
static then declare a otcl class linkage method to access it; see
bind() and method() in packet.cc for an example. For more example, see
addr-params.cc.

On Tue, 17 Oct 2000, Zhenghua Fu wrote:

> In a wireless ad-hoc environment, is it possible 
> to introduce a "global" variable that every node 
> can read and write information during the simulation, 
> so that by checking this global variable, tcp agent
> can determine exactly what's going on in real time
> during simulation? 
> 
> Where should we add this global variable, what
> might be some options and problems of doing this? 
> Would be very appreciated for your suggestions!
> 
> Zhenghua
> 
>