当等待定时器过期时,我需要重新广播数据包,我遵循在How to add timer in aodv using ns2定义的步骤,我定义了代理和定时器类;交叉引用;代理构造函数中定时器对象的初始化;并最终到期(事件*)类B_suppression。当执行到达 agent->rebroadcast((Packet*)p, 0);它将终止并显示以下消息'无效的SDVCAST数据包类型'。从事件到包造成
我已经在NS2中实现了距离矢量协议,现在我想执行吞吐量和数据包延迟xgraph。我知道我必须为吞吐量和延迟以及exec xgraph命令插入方程式,但是我无法将它集成到我的代码中。有人能帮助我吗? set ns [new Simulator]
set nr [open thro.tr w]
$ns trace-all $nr
set nf [open thro.nam w]
$ns na
我试图保存proc Inverse2的输出$result,它在每一秒钟后被调度(它在另一个过程中被调用,该过程被重新调度为1秒,所以Inverse2程序) 我想输出是{XY现在}并指定变量它最新的两个实例 x1-> x location at current time (for example at 8.0)
y1-> y location at current time
x2-> x loc