[brite-users] Help: error when using node generated by create_topology in BRITE's NS format

khodor abboud kabboud at hotmail.fr
Fri Jun 8 11:31:14 EDT 2007


Hello evry Body,
I am using the NS format generated by brite. when i try to use the node
generated by the procedure create_topology (for monotoring per example), i
have this error :

// can't read "n(3)": no such variable
    while executing
"$ns monitor-queue create_topology.$n(3) $n(6) """
    invoked from within
"set qmon36  [$ns monitor-queue create_topology.$n(3) $n(6) ""]"
    (file "topology.tcl" line 189)//


the code is :

// proc create_topology {} {
        global ns

        #nodes:
        set num_node 10
        for {set i 0} {$i < $num_node} {incr i} {
           set n($i) [$ns mpls-node]
        }

        set node0 [$ns node]
        set node1 [$ns node]

         #links:
        set qtype CBQ

        $ns duplex-link $node0 $n(3) 10.0Mb 3ms DropTail
        $ns duplex-link $n(0) $n(6) 10.0Mb 2.312773335190996ms $qtype
        $ns duplex-link $n(1) $n(0) 10.0Mb 2.9694568204843463ms $qtype
        $ns duplex-link $n(2) $n(1) 10.0Mb 1.8352240604833803ms $qtype
        $ns duplex-link $n(3) $n(2) 10.0Mb 1.5822334297190923ms $qtype
        $ns duplex-link $n(4) $n(0) 10.0Mb 1.4360234541568795ms $qtype
        $ns duplex-link $n(5) $n(3) 10.0Mb 2.559521441995941ms $qtype
        $ns duplex-link $n(6) $n(3) 10.0Mb 0.7953178172063804ms $qtype
        $ns duplex-link $n(7) $n(4) 10.0Mb 2.7512102890042183ms $qtype
        $ns duplex-link $n(8) $n(7) 10.0Mb 1.6254465755920127ms $qtype
        $ns duplex-link $n(9) $n(3) 10.0Mb 0.5596028576377098ms $qtype
        $ns duplex-link $n(7) $node1 10.0Mb 3ms DropTail
}

#end function create_topology


set qs 100



## Queue Monitor for some links

set qmon36  [$ns monitor-queue $n(3) $n(6) ""]

set qmon63  [$ns monitor-queue $n(6) $n(3) ""]

set sample36 [new Samples]

$qmon04 set-delay-samples $sample36

set sample63 [new Samples]

$qmon40 set-delay-samples $sample63

$ns queue-limit $n(3) $n(6) $qs //

Best regards,

_________________________________________________________________
Avec Windows Live OneCare éliminez tous les virus de votre PC ! 
http://www.windowslive.fr/liveonecare/default.asp



More information about the brite-users mailing list