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

Re: [ns] Why bind variables ?



> 1) in what cases should i define the same variable in
> OTCl and C++ and use the "bind" function ?

bind allows you to access a variable defined in C++ to be acessed from the
tcl interface

> 2) in what other cases it's better to pass that
> parameter from OTCl to C++ (and viceversa) putting it
> as a function parameter ?

depends on what you want to do. sometimes you may want to control some
parameter of your agent. then its better to bind. but if you want to pass
something to your agent, you will be better off by defining a new command
for the agent ie add code to the command method

you might want to read the ns manual for more information on tcl linkage. 

cheers
debo