[ns] May I use 'instvar' to bind an array variable?
matt Wood
withhighprob at gmail.com
Wed Jan 14 06:20:51 PST 2009
Dear all,
In the node configuration procedure 'instvar' is used to bind several
global variables, e.g., in ns-lib.tcl we have:
Simulator instproc create-wireless-node args {
$self instvar routingAgent_ wiredRouting_ propInstance_ llType_ \
macType_ ifqType_ ifqlen_ phyType_ chan chan2 chan3 chan4 chan5 antType_
energyModel_ inic_tialEnergy_ txPower_ rxPower_ idlePower_ topoInstance_
level1_ level2_ inerrProc_ outerrProc_ FECProc_
...
(an example to configure multi-interface, from http://greenw.blogspot.com/)
I wonder if I may use an array variable to take place of using 'chan chan2
chan3 ...' one by one. If it is allowed please tell me how. If not, is
there any other way to create an array variable of global range?
Thank you very much.
Best regards,
Matt Wood
More information about the Ns-users
mailing list