[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] node-config problems with new wireless API (-topoInstance invalid command error)



Hi

I am attempting to compile sample scenarios from Jorg Widmers 
excellent Mobile Vehicle Navigation system project at 
http://www.icsi.berkeley.edu/~widmer/mnav/

I have been trying to get some of his Scenario files to work. For the 
last two days I have concentrated on one - sim.tcl. From the mailing 
list I've found that the problem is to do with changes to the wireless 
APi - especially with reference to the node config. - I found this out 
from the NS  archive list and they recommend looking at an example 
file in \tcl\ex\wireless-mitf.tcl to see how to update the scenario 
file to the new wireless node-config API.

Basically I have changed the sim.tcl file to have the various variables 
set up at the top of the files (as in example wireless-mitf.tcl) eg.

set val (ifq) 	 Queue/DropTail/PriQueue
set val(rp) 	 NOAH
set val(ant) 	Antenna/OmniAntenna
set val(chan)	Channel/WirelessChannel
...
...

I then have the following lines  further down....

set  topo  [new Topography]
$topo load_flatgrid $val(x) $val(y)
create-god $val(nn)

#wired nodes
set node_(0)  [$ns_ node 1.0.0]
...
...

set chan_1_ [new $val(chan)]

$ns_ node-config  -mobileIP  ON \
		     ...
         		     ..
		     -ifqLen $val(ifq)
		     ...
		     -topoInstance $topo \
		     ...
		     -channel  $chan_1_

(I may have obviously left out some of the other changes that are 
recommended inthe wireless-mitf.tcl example script).

The error message that I get on attempting to run sim.tcl is:

ns sim.tcl

num_nodes is set 8
invalid command name "-topoInstance" while executing
"-topoInstance $topo \
	-agentTrance ON \
	-routerTrace OFF \
	-macTrace ON \
	-wiredRouting ON \
..."
(file sim.tcl line 50)

****************************

I'm just not sure where to look for assistance. I've been trawling the 
NS mailing list for days but I'd thought I'd try posting this as 
someone may spot  immediately what I'm forgetting etc.



Yours sincerely
Kevin Curran
______________________________
University of Ulster
Magee College
Dept Informatics
Northland Road
Derry
BT48 7JL

Phone: +44 (0)1504 375565
Fax: +44 (0)1504 375565
Web: http://www2.infm.ulst.ac.uk/~kevin