[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] trace method for RED queue
> I was going through ~ns/tcl/test/test-suite-red.tcl, to understand how it
> is monitoring its current queue lgt and average queue lgt. I came across
> the function that enables tracing (for the red1 class). It does the
> following
>
> $self instvar tchan_ node_
> set redq [[$ns link $node_(r1) $node_(r2)] queue]
> set tchan_ [open all.q w]
> $redq trace curq_
> $redq trace ave_
> $redq attach $tchan_
>
> I tried to locate 'trace' function but could not, it not defined in
> Queue/RED, nor in Queue nor in Connector nor in NsObject (neither in OTcl
> nor in C++). Could anyone pls. tell me what exactly the line
>
> $redq trace curq_
>
> is doing ( I tried stepping through both TCL debugger and gdb, but could
> not figure it out )
Defined for TclObject in Tcl.cc (in tclcl/).
It traces this variable and logs in the trace file everytime its value
changes.
- Ratul