[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: PROBLEM with queu-monitor and NAM
Hi Vincenzo,
I can point out one more problem with your script. When ave is set, it is
set to the value of the Integrator object at that particular time. Since
you do that command before the simulation starts, that object equals 0. If
you instead access the Integrator object at stoptime, it will hold a
non-zero value (assuming that the queue grew in the meantime).
Jeremy Ethridge,
Computing Technology Lab,
Nortel Networks.
> -----Original Message-----
> From: Vincenzo Mazzota [SMTP:[email protected]]
> Sent: Wednesday, August 18, 1999 6:25 AM
> To: ns-2, Mailing List; Yu, Haobo
> Subject: PROBLEM with queu-monitor and NAM
>
> Hi to everybody,
>
. . .
> ;# monitorando los datos de la cola cada medio segundo
>
> set cola_monitor [$ns monitor-queue $switcher $pozo $fifo]
> $cola_monitor set-pkts-integrator [new Integrator]
> set ave [expr [[$cola_monitor get-pkts-integrator] set sum_
> ]*$avgpktSize/$stoptime/$bw*1000]
> $ns duplex-link-op $switcher $pozo queuePos 0.5
>
. . .
> $ns at $stoptime [puts $fifo "$stoptime $ave"]
>