ubuntu 12.04 32 bit
network simulator 2.35
i want to give topology file at run time in ns2.35
working on random scenarios,, so have to run numerous simulations for statistics but every time running topology ,,i have to rewrite topology file name in TCL script which is very time consuming
this is what i was doing before
in myscript.tcl i write following lines
set val(sc) "./t1" ;# t1 is nodes topology/scenario file
it is running successfully ,,, but so as to run numerous various topologies i have to rewrite file name i.e t1..assuming rest of the parameters are same..
i want to give topology file at terminal such as
ns myscript.tcl < t1
for this i add some lines in my tcl script
set vals [read stdin]
puts "I am valued as "
but it is only reading the file,,,topology is not actually executed by simulator.. nodes are not placed at the positions as mentioned in scenario file
i tried one thing more so as to source the instance of variable
set v "[ read stdin]"
it is running without any error but toplogy still not executed...nodes are not positioned at the XY positions mentioned in scenario file
dont know ..which step i missed....