I'm trying to follow a Network Simulator tutorial using NS-2 version 2.35 on Ubuntu, but I can't seem to see the TCP window size and the error I get seems useless. The code:
set ns [new Simulator]
set tcp [new Agent/TCP]
$tcp set window_ 1
# This fails!
puts [$tcp window]
# So does this:
#puts [$tcp window_]
The output:
(_o10 cmd line 1)
invoked from within
"_o10 cmd window"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o10" line 2)
(SplitObject unknown line 2)
invoked from within
"$tcp window"
invoked from within
"puts [$tcp window]"
(file "window-test.tcl" line 8)
How do I fix this problem and output the TCP window size? More generally, is there a way to get more useful errors?