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

[ns] Q.about get virtual queue length in Diffserv.



Hi all,
I am using Nortel's Diffserv module to do some experiments,I want to get
actual virtual queue size at anytime I want.I checked the source code and I
think variable qParam_[prec].qlen doing that thing. So I have done the
following things:

1. Add function redQueue::getVirtualLength()  into dsredq.cc:

    int redQueue::getVirtualLength(int prec) {

       return(qParam_[prec].qlen);
    }

2. Add following line into dsREDQueue::command( ) in dsred.cc:

     if (strcmp(argv[1], "getVirtualLength") ==0) {
                Tcl& tcl = Tcl::instance();

tcl.resultf("%f",redq_[atoi(argv[2])].getVirtualLength(atoi(argv[3])));
                 return(TCL_OK);
        }

I want to use TCL command : "$dsredq getVirtualLenth 0 0" to get queue
length of virtual queue 0 in physical queue 0 in anytime I want. But when I
run TCL script,  I got result 0 all through the simulation time. I don't
know why.
Could anybody help me?
Thanks!
Xiang