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

[ns] Reading .tr



Hi everybody,
not only i am a beginner in using NS, but also in editing TCL scripts,
that's why i don't know how to read trace files:
if in my tcl script i create a file out0.tr

set f0 [open out0.tr w]

and i then write on that file

puts $f0 "$now [expr $bw0/$time*8/1000000]"

(lines taken from Marc Greis' tutorial example4.tcl)

where do i have to look for and what lines do i have to add to my tcl
script
to read out0.tr ? I would like to save the result of the simulation
in a file, what must i do to do that ? (and what are the possible
extensions
of the file?)
In the particular case mentioned, i would like to view a series of lines
showing
the sampling instant and the corresponding bandwidth value.
Thanks for your help,
                                       Andrea.