2015-10-19 21 views
0

我只想設置一個節點在ns-2中休眠,並且我搜索了協議,並且發現了很多關於睡眠的對象和函數,但是我無法使用它們其他協議來設置一個節點進入休眠狀態。 當我使用它們時,我得到分段錯誤或浮點,我知道這些錯誤是什麼意思,但我找不到解決它們的方法。 就像我使用SMAC的sleep()函數一樣。 我已經在谷歌搜索和一週後,我仍然沒有找到任何解決方案...! 你們能幫我在這裏嗎?如何在ns2中設置一個節點休眠

回答

0

「睡眠」是當一個節點閒置時,我猜。

在ns-2.3x/tcl/ex /中有一些示例,其中包含「set idle_time_」。

您可以找到行號「設置idle_time_」有:

$ cd ns-2.3x/tcl/ex/ 
$ grep -Rin idle_time * 
The simulation examples are (grep will also list a lot of config files.tcl) : 
realaudio/ramodel.tcl 
sat-aloha.tcl 
srm-session.tcl 
srm.tcl 
tcpsrm.tcl (Edit line 130 to e.g.: exec tclsh8.6 ./namfilter.tcl out.nam) 
          (Copy namfilter.tcl to ex/ from nam-1.1x/bin/.) 
test-rcvr.tcl 
test-tbf.tcl 
tg.tcl 
wpan/{ wpan_demo1.tcl, wpan_demo2.tcl ....... wpan_demo5.tcl } 
xcp/2statemarkovB.tcl (xcp-tcp.tcl must be run beforehand to create the required xcp0.tr) 

請嘗試運行的文件。 →→一些有非常好的nam和xgraph可視化。

+0

非常感謝...這真的很有幫助。 – Jenova