如何在 ns2 中设置节点休眠 [英] how to set a node to sleep in ns2

查看:83
本文介绍了如何在 ns2 中设置节点休眠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想在 ns-2 中将节点设置为休眠,并且我在协议中进行了搜索,我发现了很多关于休眠的对象和函数,但我无法在其他协议中使用它们来将节点设置为休眠.当我使用它们时,我会遇到 Segmentation fault 或 Floating point,我知道这些错误意味着什么,但我找不到解决它们的方法.就像我使用 SMAC 的 sleep() 函数一样.我在谷歌搜索,一周后我仍然没有找到任何解决方案......!你们能帮我吗...?

I just want to set a node to sleep in ns-2 and i have searched in protocols and i found a lot of objects and functions about sleep but i couldn't use them in other protocols to set a node to sleep. when i use them i get Segmentation fault or Floating point and i know what these errors mean but i can't find a way to solve them. Like when i use sleep() function from SMAC. I have searched in google and after a week i still didn't find any solution...! could you guys please help me here...?

推荐答案

睡眠"是指节点空闲时,我猜.

"Sleep" is when a node is turned idle, I guess.

在 ns-2.3x/tcl/ex/中有一些带有set idle_time_"的例子.

There are some examples in ns-2.3x/tcl/ex/ with "set idle_time_".

您可以使用以下命令找到set idle_time_"的行号:

You can find the line numbers for "set idle_time_" with :

$ 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 可视化.

Please try running the files. → → Some have really good nam and xgraph visualizations.

这篇关于如何在 ns2 中设置节点休眠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆