Hello, I m facing a problem when i tried to see the trace-queue command through node n2 and n3. Wrong ans is coming repeatedly. Here is my script : set ns [new Simulator] $ns color 1 Blue $ns color 2 Red #Open the trace files set tracefile1 [open out.tr w] set winfile [open WinFile w] set namfile [open out.nam w] proc finish {} { global ns tracefile1 namfile $ns flush-trace close $tracefile1 close $namfile exec nam out.nam & exit 0 } set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] set n4 [$ns node] set n5 [$ns node] $ns duplex-link $n0 $n2 2mb 10ms DropTail $ns duplex-link $n1 $n2 2mb 10ms DropTail $ns simplex-link $n2 $n3 0.3mb 100ms DropTail $ns simplex-link $n3 $n2 0.3mb 100ms DropTail $ns duplex-link $n3 $n4 0.5mb 40ms DropTail $ns duplex-link $n3 $n5 0.5mb 30ms DropTail $ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns duplex-link-op $n2 $n3 orient right $ns duplex-link-op $n3 $n2 orient left $ns duplex-link-op $n3 $n4 orient right-up $ns duplex-link-op $n3 $n5 orient right-down $ns queue-limit $n2 $n3 20 $ns trace-queue $n2 $n3 $tracefile1 $ns namtrace-queue $namfile set tcp [new Agent/TCP] $ns attach-agent $n0 $tcp set sink [new Agent/TCPSink] $ns attach-agent $n4 $sink $ns connect $tcp $sink $tcp set fid_ 1 $tcp set packetSize_ 552 set ftp [new Application/FTP] $ftp attach-agent $tcp set udp [new Agent/UDP] $ns attach-agent $n1 $udp set null [new Agent/Null] $ns attach-agent $n5 $null $ns connect $udp $null $udp set fid_ 2 set cbr [new Application/Traffic/CBR] $cbr attach-agent $udp $cbr set packetSize_ 1000 $cbr set rate_ 0.01Mb $cbr set random_ false $ns at 0.1 "$cbr start" $ns at 1.0 "$ftp start" $ns at 124.0 "$ftp stop" $ns at 124.5 "$cbr stop" proc plotWindow {tcpSource file} { global ns set time 0.1 set now [$ns now] set cwnd [$tcpSource set cwnd_] puts $file "$now $cwnd" $ns at [expr $now+$time] "plotWindow $tcpSource $file" } $ns at 0.1 "plotWindow $tcp $winfile" $ns at 125.0 "finish" $ns run
The following Error came : wrong # args: should be "_o3 self class proc n1 n2 ?file?" (Simulator namtrace-queue line 1) invoked from within "$ns namtrace-queue $namfile" (file "tuto-2t.tcl" line 48) Can anyone tell me --- where i need 2 change ? --------------------------------- Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.