#=================#error#=================najmaismat@ubuntu:~/ns-allinone-2.29/ns-2.29$ ns hi.tclnum_nodes is set 5invalid command name "create_common_node" while executing"create_common_node " (file "hi.tcl" line 50)
# ======================================================================# Main Program (Part of the script)# ======================================================================## Initialize Global Variables#set ns_ [new Simulator]set tracefile [open hi.tr w]$ns_ use-newtrace$ns_ trace-all $tracefile
# set up topography objectset topo [new Topography]$topo load_flatgrid $val(x) $val(y)## Create God#create-god $val(nn)set rng [new RNG] $rng seed [clock seconds]set chan [new $val(chan)]
#common sensor node procedure callcreate_common_node
## procedure common sensor node
proc create_common_node {} { global val ns_ node_ topo udp_ app_ gen_ contador_nodos rng
$ns_ node-config -sensorNode ON \-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 ON \-channel $chan \-energyModel $val(en) \-initialEnergy 10.0\-rxPower 0.024 \-txPower 0.036 \
No comments:
Post a Comment