[ndnSIM] Access to the queue inside OnData() in forwarding-strategy

Ayush Agarwal ayush0071 at gmail.com
Sat Feb 27 20:40:57 PST 2016


Thanks for your explanation. I was  a bit curious to know that the variable
m_outstanding which keeps track of the no. of pending interest on the face,
is it similar to the congestion window of a receiver in TCP.

On Sun, Feb 28, 2016 at 6:20 AM, Alex Afanasyev <aa at cs.ucla.edu> wrote:

> For Limits to be activated, you needs to use to forwarding strategy that
> uses them, e.g., ndn::fw::BestRoute::PerOutFaceLimits.
>
> And just in case.  Limits class doesn't use anything from the transmission
> queues.  It needs to be manually configured with the parameters that make
> sense for the simulation scenario.
>
> ---
> Alex
>
> On Feb 27, 2016, at 1:02 AM, Ayush Agarwal <ayush0071 at gmail.com> wrote:
>
> Hi Alex,
> I am trying to change the interest limit/interest sending rate on a face.
> For this I am calling the functions inside the Limits class associated to a
> particular face. But I am unable to find any change in my simulation
> results. Can you guide me where I am going wrong.
>
> *Thanks & Regards,*
>
> *Ayush Agarwal*
>
> *Reseach Scholar, Computer Science*
>
> *National Institute of Technology, KarnatakaSurathkal, India*
>
> On Fri, Feb 26, 2016 at 4:16 PM, Ayush Agarwal <ayush0071 at gmail.com>
> wrote:
>
>> Hi,
>> Thanks for your reply. Yes, I have solved the compilation errors. It was
>> due to the NULL pointer that was not handled properly.
>>
>> Thanks & Regards,
>> Ayush
>>
>> On Fri, Feb 26, 2016 at 2:26 PM, Alex Afanasyev <aa at cs.ucla.edu> wrote:
>>
>>>
>>> > On Feb 18, 2016, at 8:42 AM, Ayush Agarwal <ayush0071 at gmail.com>
>>> wrote:
>>> >
>>> > Hello everyone,
>>> >
>>> > I am using the following code to get hold of the queue object inside
>>> the forwarding strategy, OnData(....) function.
>>> >
>>> > Ptr<NetDeviceFace> netDeviceFace = DynamicCast<NetDeviceFace> (inFace);
>>> > if (netDeviceFace == NULL) {  }
>>> > Ptr<NetDevice> nd = netDeviceFace->GetNetDevice ();
>>> > if (nd == NULL) {  }
>>> > PointerValue txQueueAttribute;
>>> > nd->GetAttribute ("TxQueue", txQueueAttribute);
>>> > Ptr<ns3::Queue> txQueue = txQueueAttribute.Get<ns3::Queue> ();
>>> > if (txQueue == 0) {    }
>>> >
>>> > But I am getting a segmentation fault SIGSEV error while fetching the
>>> NetDevice object and the following errors for accessing queue.
>>> >
>>> > ../src/ndnSIM/model/fw/ndn-forwarding-strategy.cc:238:3: error:
>>> ‘PointerValue’ was not declared in this scope
>>> >     PointerValue txQueueAttribute;
>>> >    ^
>>> > ../src/ndnSIM/model/fw/ndn-forwarding-strategy.cc:239:32: error:
>>> ‘txQueueAttribute’ was not declared in this scope
>>> >    nd->GetAttribute ("TxQueue", txQueueAttribute);
>>> >                                 ^
>>> > ../src/ndnSIM/model/fw/ndn-forwarding-strategy.cc:243:50: error:
>>> expected primary-expression before ‘>’ token
>>> >    Ptr<Queue> txQueue = txQueueAttribute.Get<Queue> ();
>>> >                                                   ^
>>> > ../src/ndnSIM/model/fw/ndn-forwarding-strategy.cc:243:53: error:
>>> expected primary-expression before ‘)’ token
>>> >    Ptr<Queue> txQueue = txQueueAttribute.Get<Queue> ();
>>> >
>>> >
>>> > Can you please point me out where I am going wrong.
>>>
>>> Hi Ayush,
>>>
>>> Sorry for the delayed response.  I'm guessing that you have already
>>> solved the compilation problem?  Just in case, it is just a matter of
>>> adding proper includes (I think <ns3/pointer.h>, <ns3/queue.h>)
>>>
>>> ---
>>> Alex
>>>
>>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160228/560562ad/attachment.html>


More information about the ndnSIM mailing list