[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns-users] Auto-creation of file traces
I have a large number of sources for which I'd like to create
traces and trace files. Could anyone advise on the following code?
for {set node 0} {$node < 5} {incr node} {
set tf$node [open out$node.tr w]
set tracer$node [ $ns create-trace Recv tf$node tcp$node sink$node ]
$tracer$node target [$tcp$node target]
tcp$node target $tracer$node
}
There is a problem with syntax, as the interpreter complains about
not being able to open tf(0). I've tried several variants with brackets
and '$' in different positions, but the correct syntax eludes me.
Any help greatly appreciated.
thanks,
rik wade