Dear all,

I have declared the following variable:
set cbr(7) [new Application/Traffic/CBR]
$cbr(7) attach-agent $udp(7)
...more code...

Now, when I want to start the traffic the following works fine:
$ns at $time_udp_start "$cbr(7) start"

But the same command within a procedure i.e.:
proc events {} {
global cbr(7) ;# NOTE 
$ns at $time_udp_start "$cbr(7) start"
...more code...
}

produces the error: can't read "cbr(7)": no such variable. Please note that I 
have included the global command. Does anyone have any idea?

Many Thanks                                       

Reply via email to