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

[ns] Traffic Trace with prebuilt win 32 binary



I downloaded the ns-2.1b5.exe win32 binary, just to ensure that I hadn't flubbed anything in my build process. Then I took the "example-trace" file that is included in the source distribution, that is used in the tg.tcl example, and put it into the same directory. Then I run the following script, and I still get the same message "warning: no class variable Tracefile::debug_", and the trace output is empty.
 
ANY help would be greatly appreciated.
 
set ns [new Simulator]
set n0 [$ns node]; set n1 [$ns node]
set endtime 1.0
$ns duplex-link $n0 $n1 100.0M 2ms DropTail
set null0 [new Agent/Null]
$ns attach-agent $n1 $null0
set s [new Agent/UDP]
$ns attach-agent $n0 $s
set tfile [new Tracefile]
$tfile filename dumpster
set tr [new Application/Traffic/Trace]
$tr attach-tracefile $tfile
$tr attach-agent $s
$ns connect $s $null0
$ns at 0.0 "$tr start"
 
set flow [open tuttrace.out w]
$ns trace-queue $n0 $n1 $flow
 

$ns at [expr $endtime + .01] "finish"
proc finish {} {
 global ns  flow
 close $flow; $ns flush-trace
 exit 0
 }
$ns run
-----Original Message-----
From: Peter Rabinovitch
Sent: Wednesday, January 31, 2001 3:54 PM
To: [email protected]
Subject: [ns] Tracefile

Trying to run the following condensed version of tg.tcl in ns/tcl/ex. I get a "warning: no class variable Tracefile::debug_"
 
Any ideas? If I take the original tg.tcl script, and remove the lines for the tracefile driven source, it works fine, as has everything else up until now.
 
Thanks very much,
Peter.
 
 
set stoptime 10.0
set ns [new Simulator]
set n0 [$ns node]
set n1 [$ns node]
 
$ns duplex-link $n0 $n1 10Mb 5ms DropTail
 
set tfile [new Tracefile]
$tfile filename example-trace
set s0 [new Agent/UDP]
$ns attach-agent $n0 $s0
set null1 [new Agent/Null]
$ns attach-agent $n1 $null1
$ns connect $s0 $null1
 
set trace0 [new Application/Traffic/Trace]
$trace0 attach-tracefile $tfile
$trace0 attach-agent $s0
$ns at 1.0 "$trace0 start"
$ns at $stoptime "$trace0 stop"
proc finish file {
 }
$ns run