main.tcl

来自「R. Lo Cigno, P. Larcheri 802.11e closed」· TCL 代码 · 共 54 行

TCL
54
字号
source "init.tcl"# Exclusion of useless packet headersremove-packet-header AODV aSRM CtrMcast Diffusion Encap\                HttpInval IMEP IPinIP IVS LDP mcastCtrl MFTP MPLS\                MIP Ping PGM PGM_SPM PGM_NAK RAP RTP Resv rtProtoDV rtProtoLS SR Src_rt SRM SRMEXT\                Snoop TCPA TFRC TFRC_ACK TORA GAF UMP Pushback NVset ns_ [new Simulator]$ns_ use-scheduler Heap   ;# The scheduler uses a heap structurens-random seed  717source "param.tcl"set tracefd     [open "$opt(dir)$opt(idx).tr" w]set topo        [new Topography]$ns_ set-address-format hierarchical           ;# Wired-cum-wireless scenarios need hierarchical routing$ns_ node-config -addressType hierarchical$ns_ trace-all $tracefd$ns_ set RouterTrace "OFF"$ns_ set AgentTrace_ "OFF"$ns_ set MacTrace_   "OFF"$topo load_flatgrid $opt(x) $opt(y)        ;# Defines the size of the topographycreate-god [expr $opt(nn) + $opt(bs)]      ;# The God object creates a matrix to store connectivity informationsource "topology.tcl"source "motion.tcl"source "traffic.tcl"source "script.tcl"source "finish.tcl"$ns_ at [expr $opt(stop) + 10.0] "finish"$ns_ at [expr $opt(stop) + 11.0] "puts \"NS EXITING...\" ; $ns_ halt"save_parproc stampa_tempo {} {  global ns_  puts "tempo : [$ns_ now]"  $ns_ at [expr [$ns_ now] + 1.0] "stampa_tempo"}$ns_ at 0.0 "stampa_tempo"puts "Starting Simulation..."$ns_ run    ;# The simulation starts...

⌨️ 快捷键说明

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