simple-fsm-tcp.tcl

来自「NS-2.28的802.11e协议扩展源代码」· TCL 代码 · 共 38 行

TCL
38
字号
set ns [new Simulator]$ns abstract-tcpset f [open simple-fsm.nam w]$ns namtrace-all $fset n(0) [$ns node]set n(1) [$ns node]$ns duplex-link $n(0) $n(1) 5Mb 10ms DropTail$ns duplex-link-op $n(0) $n(1) queuePos 0.5$ns duplex-link-op $n(0) $n(1) orient rightset tcp [new Agent/AbsTCP/RenoAck]$tcp set class_ 1set sink [new Agent/AbsTCPSink]$ns attach-agent $n(0) $tcp$ns attach-agent $n(1) $sink$ns connect $tcp $sinkset ftp [new Application/FTP]$ftp attach-agent $tcp$ns at 0.05 "$ftp producemore 31"$ns at 10 "finish"proc finish {} {    global ns f    $ns flush-trace    close $f    puts "running nam..."    exec nam simple-fsm.nam &    exit 0}$ns run

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?