如何解决Sconfig 0.00000 tap: on snoop: rts?犯错了吗?在
我正在使用 ns.35 和使用 DSR 执行此代码时在移动 Ad Hoc 网络 (MANET) 中开展一个项目
# Define options
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/Wirelessphy ;# network interface type
set val(mac) Mac/802_11 ;# MAC type
set val(ifq) CMUPriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 100000 ;# max packet in ifq
set val(nn) 38 ;# number of mobilenodes
set val(rp) DSR ;# routing protocol
set val(x) 800 ;# X dimension of topography
set val(y) 800 ;# Y dimension of topography
set val(seed) 0.0
set val(cp) "cbrNCR"
set val(sc) "set38"
set val(stop) 200.0 ;# time of simulation end
set ns_ [new Simulator]
set tracefile [open DSR.tr w]
#set windowVsTime2 [open win.tr w]
$ns_ trace-all $tracefile
$ns_ use-newtrace
#$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)
# set up topography object
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)
#Open the NAM trace file
set namfile [open manet.nam w]
$ns_ namtrace-all $namfile
$ns_ namtrace-all-wireless $namfile $val(x) $val(y)
set god_ [create-god $val(nn)]
set chan_1_ [new $val(chan)]
#
# Create nn mobilenodes [$val(nn)] and attach them to the channel.
#
# configure the nodes
$ns_ node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channel $chan_1_ \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-energyModel "EnergyModel" \
-initialEnergy 100.0 \
-txPower 2.0522 \
-rxPower 0.0591 \
-idlePower 0.00006 \
-sleepPower 0.000003 \
for {set i 0} {$i < $val(nn) } { incr i } {
set node_($i) [$ns_ node]
$node_($i) random-motion 0 ;# disable random motion
}
puts "Loading connection pattern..."
source $val(cp)
puts "Loading scenario file..."
source $val(sc)
proc finish {} {
global ns_ tracefile namfile
$ns_ flush-trace
close $tracefile
close $namfile
exec nam manet.nam &
exit 0
}
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ initial_node_pos $node_($i) 20
}
for {set i 0} {$i < $val(nn) } {incr i} {
$ns_ at $val(stop).000000001 "$node_($i) reset";
}
$ns_ at $val(stop) "$ns_ nam-end-wireless $val(stop)"
$ns_ at $val(stop).000000001 "puts \"NS EXITING...\"; $ns_ halt"
puts "Start Simulation..."
$ns_ run
Sconfig 0.00000 tap: on snoop: rts?犯错了吗?在 Sconfig 0.00000 打捞:在 !bd 上回复?在 Sconfig 0.00000 grat 错误:在 grat 回复:在 Sconfig 0.00000 $reply for props: on ring 0 search: on 使用 MOBICACHE 配置 0.00000
解决方法
Sconfig 是 DSR 设置。跟踪线表明哪些 Sconfig 处于开启状态。 ... 请参阅 Sconfig.jpg 等跟踪文档 https://drive.google.com/drive/folders/1X_SaZcTYF2tI5XGVClImBvAZY1_QOrDj?usp=sharing
Sconfig.jpg 显示了来自“NS-2 跟踪格式 - nsnam.html”= NS-2_TraceFormats-nsnam.html 的片段
$ cd ns-2.35
$ grep -nR Sconfig *
dsr/dsragent.cc:468: trace("Sconfig %.5f tap: %s snoop: rts? %s errs? %s",dsr/dsragent.cc:473: trace("Sconfig %.5f salvage: %s !bd replies? %s",dsr/dsragent.cc:477: trace("Sconfig %.5f grat error: %s grat reply: %s",dsr/dsragent.cc:481: trace("Sconfig %.5f $reply for props: %s ring 0 search: %s",dsr/linkcache.cc:309: trace("Sconfig %.5f using LINKCACHE %d",Scheduler::instance().clock(),dsr/mobicache.cc:209: trace("Sconfig %.5f using MOBICACHE",Scheduler::instance().clock());
dsr/simplecache.cc:204: trace("Sconfig %.5f using MOBICACHE",Scheduler::instance().clock());
这意味着 grep
已在 ns2、所有目录和所有子目录中搜索单词 Sconfig
。
当我使用此代码时 $ cd ns-2.35 $grep -nR Sconfig *. 出现如下:
make[3]: *** [CMakeFiles/node.dir/build.make:160: CMakeFiles/node.dir/deps/brotli/c/common/constants.c.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from /home/eran/CLionProjects/node/benchmark/napi/function_args/napi_binding.c:5:
/home/eran/CLionProjects/node/deps/v8/src/objects/string.h:8:10: fatal error: memory: No such file or directory
8 | #include <memory>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。