[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Question about adding new queue type in ns2.1b6!
Please try the following:
$ns duplex-link $ns1 $ns2 5Mb 2ms Prob
sean
--------------------------------------------------------
Hei Xiaojun
Department of Electrical and Electronic Engineering
Hongkong University of Science and Technology
On Tue, 30 May 2000, Wu Wei wrote:
> 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)
> >
>
> Tarik Alj wrote:
>
> > Are you using this with CBQ? Try testing with a simple script first.
> >
> > I suggest you examine your constructor and the command function. Compare with
> > others like DropTail for example.
> >
> > If you want you can send me your .h/.cc files and I can try looking at them.
>