Hello everyone,I am new to ns2. I am trying to create nodes and links within a
procedure, and call this procedure during run time. I am able to create the
specified nodes and links within the procedure. The main issue is that trace
files are not being updated after using flush-trace command. The code which i
am usingset ns [new Simulator]set tracef [open "trace.tr" w]set namtracef [open
"namtrace.nam" w]$ns trace-all $tracef$ns namtrace-all $namtracefproc finish {}
{global ns namtracef tracef$ns flush-traceclose $namtracefclose $tracefexec nam
namtrace.nam &exit 0}proc createTopology { } {global nsfor {set i 0} { $i < 7}
{ incr i } { set n($i) [$ns node] } for {set i 0} {$i < 7} {incr i}
{ $ns duplex-link $n($i) $n([expr ($i+1)%7]) 1Mb 10ms DropTail}}$ns at 0.5
"createTopology"$ns at 5 "finish"$ns runThe output of namtrace.nam file :V -t *
-v 1.0a5 -a 0A -t * -n 1 -p 0 -o 0x7fffffff -c 30 -a 1A -t * -h 1 -m 1073741823
-s 0I am not sure what the mistake is. Thanks.Srikan!
th