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

Re: [ns] help-How to set trace object between node and connector



> There is delay in connector (a scheduling scheme by myself). So if trace-all,
> the enque and deque event recorded is only for the DropTail queue.
> However, I want to record the enque and deque event of the connector.
> I try to create-trace object between n0 and myconnector.  Like following:
> # Create trace for $qup.
> set enqT [$ns create-trace Enque $tf $n0 $qup]
> set deqT [$ns create-trace Deque $tf $qup $ulnk]
> $enqT target [$ulnk set fromNode_]
> $deqT target [$qup target]
> 
> Is it feasible?
> By the way, how to let the trace object work in TCL scripts? 
> $ns trace-all seems to use old trace object still.

You have to attach the trace objects into the queue. perhaps you don't
want to write your own code for the plumbing because you can use
Simulator::trace-queue{} (for ns trace, or namtrace-queue{} for nam
trace). Do a grep of trace-queue in tcl/test for examples; there are
plenty.

- haobo