?? capture-scenario.tcl
字號:
## A wireless lan scenario to study the capture effect### defaultsset num_nodes 7 ;# number of mobilenodes in the scenarioset pktsize 512 ;# pktsize for background trafficset endtime 120# Queue set limit_ 200proc create_scenario { } { global ns_ node_ num_nodes global pktsize ########################################################## # Setup FTP flows for {set i 1} {$i < $num_nodes} {incr i} { set B [new Application/FTP] set B_src [new Agent/TCP] set B_sink [new Agent/TCPSink/DelAck] $B_src set packetSize_ $pktsize $B_src set class_ [expr $i + 1] $ns_ attach-agent $node_(0) $B_src $ns_ attach-agent $node_($i) $B_sink $ns_ connect $B_src $B_sink $B attach-agent $B_src puts "FTP B$i with pktsize $pktsize flows from Node0 to Node$i" $ns_ at 3.0 "$B start" }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -