warning:please use -channel as shown in tcl/ex/wireless-mitf.tcl

来源:百度知道 编辑:UC知道 时间:2024/06/15 18:56:41
运行TCL脚本程序的时候为什么有这种错误?不明白是怎么回事
设置的chanenl如下:
set val(chan) Channel/WirelessChannel ;# channel type

set val(chan) Channel/WirelessChannel ;#Channel Type
# Create channel #1 and #2
set chan_1_ [new $val(chan)] 加上这句脚本
set chan_2_ [new $val(chan)]

# Create node(0) "attached" to channel #1

# configure node, please note the change below.
$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) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace ON \
-movementTrace OFF \
-channel $chan_1_ 修改处
原脚本是 channeltype $val(chan)
按照它的格式来改就是了
这是因为高版本的ns2支持多信道配置,因此无线节点设置信道要更改以前的方式 或者将节点配置的channeltype改成 channel就可以了

警告:请使用通道,如TCL与# 47;前与# 47;wireless-mitf.tcl

不明白也想学习看看