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

Re: [ns] Question about adding new queue type in ns2.1b6!



Wu,

	ok, I'm sorry I did not give you a very good advice at all. I found out 
that the error is generated by 
	"Simulator instproc simplex-link { n1 n2 bw delay qtype args }" 
in tcl/lib/ns-lib.tcl Apparently it goes through a switch to find out how to 
create the queue. It first looks into an array :

if [info exists queueMap_($qtype)] {
     set qtype $queueMap_($qtype)
}

	then goes into the switch, apparently it does not find the queue type 
and does not fall into default. Take a look. CCing to the list.
	
Tarik. 

>Date: Tue, 30 May 2000 09:50:31 +0800
>From: Wu Wei <[email protected]>
>X-Accept-Language: zh-CN, en
>MIME-Version: 1.0
>To: [email protected], [email protected]
>Subject: Re: [ns] Question about adding new queue type in ns2.1b6!
>
>I tried  $ns duplex-link $ns1 $ns2 5Mb 2ms Queue/Prob
>but it does not work,because it complains no Queue/Queue/Prob exists,so I think
>it is not this problem.
>I wonder what I should do when I want to add a new queue type,because my code 
is
>very similiar to
>DropTail . I add my code to ns source code dir and add items in Makefile and
>default value in ns-default.tcl.
>Do I need do more?
>I wonder it complains "unblock_on_resume_" ,which is declared in queue.h ,can't
>be found.But I do inherit
>class Queue . Any hints are welcome!  (this mail attach my code and test file)
>Thanks
>error followed:
>>can't read "unblock_on_resume_": no such variable
>>    (Object set line 1)
>>    invoked from within
>>"Queue/Prob set unblock_on_resume_"
>>    invoked from within
>>"catch "$c set $var" val"
>>    (procedure "_o16" line 1)
>>    (SplitObject unknown line 1)
>>    invoked from within
>>"$queue_ target $link_"
>>    (procedure "_o17" line 24)
>>    (SimpleLink init line 24)
>>    invoked from within
>>"_o17 init _o12 _o14 5Mb 2ms _o16"
>>    (Class create line 1)
>>    invoked from within
>>"SimpleLink create _o17 _o12 _o14 5Mb 2ms _o16"
>>    invoked from within
>>"catch "$className create $o $args" msg"
>>    (procedure "new" line 3)
>>    invoked from within
>>"new SimpleLink     $n1 $n2 $bw $delay $q"
>>    ("default" arm line 2)
>> invoked from within
>>"switch -exact $qtypeOrig {
>>RTM {
>>set c [lindex $args 1]
>>set link_($sid:$did) [new CBQLink        $n1 $n2 $bw $delay $q $c]
>>}
>>CBQ -
>>CBQ/WRR {
>>if {[llen..."
>>    (procedure "_o3" line 27)
>>    (Simulator simplex-link line 27)
>>    invoked from within
>>"_o3 simplex-link _o12 _o14 5Mb 2ms Prob"
>>    ("eval" body line 1)
>>    invoked from within
>>"eval $self simplex-link $n1 $n2 $bw $delay $type $args"
>>    (procedure "_o3" line 9)
>>    (Simulator duplex-link line 9)
>>    invoked from within
>>"$ns duplex-link $n1 $n2 5Mb 2ms Prob"
>>    (file "probtest.tcl" line 11)
>>
>