0
eval
在以下代碼中的含義?如何在TCL中使用「eval」程序?
proc poissontraffic { src dst interval starttime } {
global ns_ node_
set udp($src) [new Agent/UDP]
eval $ns_ attach-agent \$node_($src) \$udp($src)
set null($dst) [new Agent/Null]
eval $ns_ attach-agent \$node_($dst) \$null($dst)
set expl($src) [new Application/Traffic/Exponential]
eval \$expl($src) set packetSize_ 70
eval \$expl($src) set burst_time_ 0
# idle_time + pkt_tx_time = interval
eval \$expl($src) set idle_time_ [expr $interval*1000.0-70.0*8/250]ms
eval \$expl($src) set rate_ 250k
eval \$expl($src) attach-agent \$udp($src)
eval $ns_ connect \$udp($src) \$null($dst)
$ns_ at $starttime "$expl($src) start"
}
老兄,是不是更容易閱讀評估手冊頁? – user2141046