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

Re: running queuemon-test.tcl



Thanks for the info. It's just updated in the snapshot. A patch against
ns-link.tcl v1.42 is attached below. 

- Haobo

--- ns-link.tcl~ 1999/03/04 02:21:39     
+++ ns-link.tcl  1999/08/11 22:16:23     
@@ -30,14 +30,14 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# @(#) $Header: /usr/src/mash/repository/vint/ns-2/tcl/lib/ns-link.tcl,v 1.42 1999/03/04 02:21:39 haoboy Exp $
+# @(#) $Header: /usr/src/mash/repository/vint/ns-2/tcl/lib/ns-link.tcl,v 1.43 1999/08/11 22:16:23 haoboy Exp $
 #
 Class Link
 Link instproc init { src dst } {
        $self next
 
         #modified for interface code
-       $self instvar trace_ fromNode_ toNode_ source_ dest_ color_ oldColor_
+       $self instvar trace_ fromNode_ toNode_ color_ oldColor_
        set fromNode_ $src
        set toNode_   $dst
        set color_ "black"
@@ -397,21 +397,21 @@
 
 SimpleLink instproc start-tracing { } {
        $self instvar qMonitor_ ns_ qtrace_ sampleInterval_
-       $self instvar source_ dest_
+       $self instvar fromNode_ toNode_
 
        if {$qtrace_ != 0} {
                $qMonitor_ trace $qtrace_
        }
-       $qMonitor_ set-src-dst [$source_ id] [$dest_ id]
+       $qMonitor_ set-src-dst [$fromNode_ id] [$toNode_ id]
 } 
 
 SimpleLink instproc queue-sample-timeout { } {
        $self instvar qMonitor_ ns_ qtrace_ sampleInterval_
-       $self instvar source_ dest_
+       $self instvar fromNode_ toNode_
 
        set qavg [$self sample-queue-size]
        if {$qtrace_ != 0} {
-               puts $qtrace_ "[$ns_ now] [$source_ id] [$dest_ id] $qavg"
+               puts $qtrace_ "[$ns_ now] [$fromNode_ id] [$toNode_ id] $qavg"
        }
        $ns_ at [expr [$ns_ now] + $sampleInterval_] "$self queue-sample-timeout"
 }


On Thu, 12 Aug 1999, Christof Brandauer wrote:

> Hi,
> 
> this has been on the list before.  it's a bug in
>    ~ns/tcl/lib/ns-link.tcl
> which hasn't yet been corrected.
> 
> i posted a patch in
> http://www-mash.cs.berkeley.edu/dist/archive/ns-users/9905/0082.html
> 
> hope this helps,
> chris 
> 
>  -----------------------------------------------------------------
>   Christof Brandauer                        [email protected]
>   Student of Applied Informatics                 
>   Department of Computer Science, University of Salzburg, Austria
>  ----------------------------------------------------------------- 
> 
> 
> On Wed, 11 Aug 1999, Huiwen Li wrote:
> 
> > Hello,
> > 
> > Did anyone ever run queuemon-test.tcl in ns/tcl/test? When I tried to run
> > it, it gave the error information like: cannot read "source_": no such
> > variable when executing "$source_ id" in "SimpleLink queue-sample-timeout"
> > But when I looked into definition for queue-sample-timeout, the source_ is a
> > member in the definition for Link object. Can someone tell me what is wrong?
> > Thanks a lot.
> > 
> > Huiwen
> > 
> 
>