2015-10-19 22 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