[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compilation problem.
Hi,
when i compile the tcl program in ~ns/tcl/ex/simple.tcl i get the
following error:
guru>ns simple.tcl
_o2: unable to dispatch method traceall
while executing
"$ns traceall $f "
(file "simple.tcl" line 5)
can anyone help me with this problem???
the file(simple.tcl) is given below.
#simple.tcl
set ns [new Simulator]
set f [open out.tr w]
$ns traceall $f
set nf [open out.nam w]
$ns namtraceall $nf
set n0 [$ns node]
set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
$ns duplexlink $n0 $n2 5Mb 2ms DropTail
$ns duplexlink $n1 $n2 5Mb 2ms DropTail
$ns duplexlink $n2 $n3 1.5Mb 10ms DropTail
set udp0 [new Agent/UDP]
$ns attachagent $n0 $udp0
set cbr0 [new Application/Traffic/CBR]
$cbr0 attachagent $udp0
$udp0 set class_ 0
set null0 [new Agent/Null]
$ns attachagent $n3 $null0
$ns connect $udp0 $null0
$ns at 1.0 "$cbr0 start"
puts [$cbr0 set packetSize_]
puts [$cbr0 set interval_]
set tcp [new Agent/TCP]
$tcp set class_ 1
$ns attachagent $n1 $tcp
set sink [new Agent/TCPSink]
$ns attachagent $n3 $sink
set ftp [new Application/FTP] ;
$ftp attachagent $tcp
$ns at 1.2 "$ftp start"
$ns connect $tcp $sink
$ns at 1.35 "$ns detachagent $n0 $tcp ; $ns detachagent $n3 $sink"
$ns at 3.0 "finish"
proc finish {} {
global ns f nf
$ns flushtrace
close $f
close $nf
puts "running nam..."
exec nam out.nam &
exit 0
}
$ns run
# end of simple.tcl
thanks.
satish