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

Re: automagic configuration at sim startup



> You can add its initialization into tclAppInit.cc in the same way
> init_misc() is done, if that is what you want. 

I was thinking more along the lines of a particular method that was
defined as virtual in the NSObject class that was called at the start of
the simulation (i.e. when $ns run is called), and any class that needed
some kind of initialisation at the start of the simulation (say, for
example, a number of parameters are specified and the some combination of
these is used in calculations during the simulation - then at the start of
the simulation, this combination of the parameters could be determined,
and used throughout the simulation, rather than recalculating it each
time) could define this method knowing that it would be called when the
simulation starts. If the class did not define this method, then the
method higher up the class hierarchy would be called instead.

I guess this doesn't exist in ns.

Rgds,
Sean.