[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] How to change default values (listed in ns-default.tcl)?
Hi,
In my environment, it works like below.
The default value for Tclcl is converted into gen/ns_tcl.cc,
before make the ns binary.
It's enough not to use "make depend" or "make clean".
Check this file.
[/ns-allinone-2.1b8a/ns-2.1b8a/tcl/lib]% touch ns-default.tcl
[/ns-allinone-2.1b8a/ns-2.1b8a/tcl/lib]% cd ../..
[/ns-allinone-2.1b8a/ns-2.1b8a]% make
/PATH/bin/tclsh8.3 bin/tcl-expand.tcl tcl/lib/ns-lib.tcl \
tcl/rtglib/ns-rtProtoLS.tcl | ../tclcl-1.0b11/tcl2c++ et_ns_lib > \
gen/ns_tcl.cc
... cut ...
As another solution,
I suggest overwriting the default value on top of scenario script,
like below:
set ns [new Simulator]
Application/Traffic/CBR set packetSize_ 1000
Phy/WirelessPhy set bandwidth_ 1e6
... your scenario
This method don't need rebuilding.
--
Toshikazu Ichikawa <ichikawa@toshikazu.org>