不好意思...
想請教板上各位超強的大大...
小弟想做1個AP被10個station連上後由AP傳送資料給各個Station的腳本...
以下是小弟寫的部分
nn的值為10....
Application/Traffic/CBR set packetSize_ 512
Application/Traffic/CBR set rate_ 256Kb
for {set i 1} {$i < [expr $val(nn)]} {incr i} {
set udp_($i) [new Agent/UDP]
set cbr_($i) [new Application/Traffic/CBR]
$ns_ attach-agent $node_(0) $udp_($i)
$cbr_($i) attach-agent $udp_($i)
}
for {set i 1} {$i < [expr $val(nn)]} {incr i} {
set null_($i) [new Agent/Null]
$ns_ attach-agent $node_($i) $null_($i)
$ns_ connect $udp_($i) $null_($i)
}
$ns_ at 1.0 "$cbr_(1) start"
$ns_ at 1.1 "$cbr_(2) start"
$ns_ at 1.2 "$cbr_(3) start"
$ns_ at 1.3 "$cbr_(4) start"
$ns_ at 1.4 "$cbr_(5) start"
$ns_ at 1.5 "$cbr_(6) start"
$ns_ at 1.6 "$cbr_(7) start"
$ns_ at 1.7 "$cbr_(8) start"
$ns_ at 1.8 "$cbr_(9) start"
$ns_ at 1.9 "$cbr_(10) start"
$ns_ at 50.0 "puts \"NS EXITING...\""
$ns_ at 50.0 "stop"
不過執行後卻會出現"Scheduler: Event UID not valid!"的結果...
想請教各位大大...
我該怎麼改或怎麼寫才能達到我想要的結果??
讓1台AP能傳送資料給各個連上的Station??
麻煩各位高手能夠指點迷津...超級感謝!!