Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ns2 我在执行生成的错误时生成file.tcl_Ns2 - Fatal编程技术网

Ns2 我在执行生成的错误时生成file.tcl

Ns2 我在执行生成的错误时生成file.tcl,ns2,Ns2,有人知道这个错误吗 无效的命令名o3 执行时 ns namtrace all nf file.tst.tcl第6行)如果需要帮助,可以发布更清晰的代码 无论如何,只要看一下[0]中给出的示例,并尝试查找您的代码与他们的代码之间的差异 谢谢 尼古拉斯 [0]请格式化您的代码,使其易于阅读。另外,请问一个真实的问题。 #Create a simulator object set ns [new Simulator] #Open the nam trace file set nf [open ou

有人知道这个错误吗 无效的命令名o3 执行时 ns namtrace all nf
file.tst.tcl第6行)

如果需要帮助,可以发布更清晰的代码

无论如何,只要看一下[0]中给出的示例,并尝试查找您的代码与他们的代码之间的差异

谢谢

尼古拉斯


[0]

请格式化您的代码,使其易于阅读。另外,请问一个真实的问题。
#Create a simulator object  set ns [new Simulator]
#Open the nam trace file  set nf [open out.nam w]
$ns namtrace-all $nf  #Define a 'finish' procedure   proc finish {} {           global ns nf           $ns flush-trace           #Close the trace file           close $nf           #Execute nam on the trace file           exec nam out.nam &           exit 0   }    # Insert your own code for topology creation   # and agent definitions, etc. here      # Node address is 0   $ns node-config -UmtsNodeType rnc   set rnc [$ns create-Umtsnode]    # Node address is 1   $ns node-config -UmtsNodeType bs \                   -downlinkBW 32kbs \                   -downlinkTTI 10ms \                   -uplinkBW 32kbs \                   -uplinkTTI 10ms \   set bs [$ns create-Umtsnode]   #Iub configuration between RNC and BS   $ns setup-Iub $bs $rnc 622Mbit 622Mbit 15ms 15ms DummyDropTail 000   # Node address for ue1 is 2   $ns node-config -UmtsNodeType ue \                   -baseStation $bs \                   -radioNetworkController $rnc    set ue1 [$ns create-Umtsnode]   # Node address for sgsn0 and ggsn0 is 3 and 4, respectively   set sgsn0 [$ns node]   set ggsn0 [$ns node]   # Node address for node1 is 5   set node1 [$ns node]    $ns duplex-link $node1 $ggsn0 622Mbit 1ms DropTail 1000   $ns duplex-link $ggsn0 $sgsn0 622Mbit 1ms DropTail 1000   $ns duplex-link $sgsn0 $rnc 622Mbit 1ms DropTail 1000    $rnc add-gateway $sgsn0      set rtp_sender [new Agent/RTP]   $ns attach-agent $node1 $rtp_sender      set rtp_receiver [new Agent/RTP]   $ns attach-agent $ue1 $rtp_receiver      # Create a CBR traffic source and attach it to udp0   set cbr0 [new Application/Traffic/CBR]   $cbr0 set packetSize_ 500   $cbr0 set interval_ 0.005   $cbr0 attach-agent $rtp_sender   #creation of DCH channel   $ns node-config -llType UMTS/RLC/AM \                   -downlinkBW 64kbs \                   -uplinkBW 64kbs \                   -downlinkTTI 10ms \                   -uplinkTTI 10ms   set dch0 [$ns create-dch $ue1 $rtp_receiver]   #Call the finish procedure after 5 seconds simulation time   $ns at 5.0 "finish"   #Run the simulation   $ns run