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

ns-2.1b6 and vlan.tcl



Hi

I have downloaded the current version verion of ns and I try to re-use a
model which worked fine before with version b5.
I needed to modify vlan.tcl to split the procedure addNode into two
procedures : addNode and another procedure called addVlink.
What was done by one procedure is now done by two. Thus, i did not change
the declaration of the procedure and now the vlan test fails !

This is the message i get when running "ns vlantest-flat.tcl"
	sourcing tcl/lan/vlan.tcl...
	wrong # args: should be {LanNode instproc name args body}
	    (Class instproc line 1)
    	invoked from within
	"LanNode instproc addNode {nodes bw delay {llType ""} {ifqType ""} \
      	          {macType ""} {phyType ""}} {
      	  $self instvar ifqType_ llType_ macType_ chanType_ ..."
    	(file "../lan/vlan.tcl" line 86)
    	invoked from within
	"source.orig ../lan/vlan.tcl"
	    ("uplevel" body line 1)
	    invoked from within
	"uplevel source.orig $fileName"
	    (procedure "source" line 12)
	    invoked from within
	"source ../lan/vlan.tcl"
	    (file "vlantest-flat.tcl" line 2)


What i don't understand is that addNode has the right number of arguments :
here is the corresponding line in vlan.tcl (which is identical to the
b6-current version)

LanNode instproc addNode {nodes bw delay {llType ""} {ifqType ""} \
		{macType ""} {phyType ""}} {						#Then we have the body

Some help would be greatly appreciated.

Thanks

Gwendal

--------------------- Gwendal LE GRAND-----------------------------------
Universite Pierre et Marie Curie 		tel : +33 (0) 1 44 27 75 12
Laboratoire LIP6-CNRS,				fax: +33 (0) 1 44 27 74 95    
8 Rue du Capitaine Scott			mailto:[email protected]
75015 Paris, France				http://www-rp.lip6.fr/~legrand