Hi,
Yes, I know this variable "blocked_" but I don't know why the queue may be
blocked itself... So it is not already important.
Concerning to the access to the queue length, there is 2 solutions :
1. I use the pointer to the node I interested. the problem is to identify
the node, link and queue that you need.
But this is good solution for me because I have a hop-by-hop connection and
I change the source and destination addresses in each node. So, I can
identify the node, link and queue thanks to the packets in this queue.

something like this (in the DropTail.cc file for example) :

Node* mynode;
mynode->queue_length = q_->length;

and so in my .cc file I get the queue length :

Node* mynode;
int length = mynode->queue_length;

So, the node it is mediator because I need to access in the Agent Class but
there is no direct link with Queue object. So, something like : Queue <->
Node <-> Agent

The second solution:
2. x->target_->length() in your code. Where x may be the trace object enqT_
which is placed in the input to the link and its target_ is the queue which
is placed just after him.
I have not yet used this way, but I think use it in future.

If you will find the solution, please let me know.
Natalya


JyothiR wrote:
> 
> Hi,
> 
> There would be a variable called 'blocked_' in the queue class. If it is
> set to 1, it gets blocked. I don't know how it can reset itself though.
> 
> What kind of network are you working on? I am trying to find the current
> queue size to use in my routing protocol, can you tell me the code you are
> trying to get the queue size? my problem is described in detail here:
> http://old.nabble.com/-ns--Calculating-Queue-Length-at-a-wireless-node-td32659587.html
> 
> Would be great if you can give me any kind of suggestions.
> 
> Thanks!
> 
> 
> Natalya wrote:
>> 
>> Hi,
>> 
>> I use the resched function to implement my shaping mechanism(on the
>> agents level) which is based on a current queue size. But there is one
>> moment when the queue on the link is blocked... It does not execute the
>> deque function. Why it might happen? Why the object queue might be
>> blocked?
>> 
>> thanks in advance
>> 
> 
> 


-----
Natalya
Laboratory of computer sciences, Paris 6 (LIP6)
-- 
View this message in context: 
http://old.nabble.com/Queue-block-problem-tp32470075p32659669.html
Sent from the ns-users mailing list archive at Nabble.com.

Reply via email to