[ndnSIM] beforeExpirePendingInterest not invoked in subclass

Abu Saleh Md Tayeen abusalehmdtayeen at gmail.com
Wed Sep 11 12:00:41 PDT 2019


Hello everyone,
I am working on a custom strategy where I need to track expired pending
interests. I have found that the function *beforeExpirePendingInterest* in
the base *strategy* class has been removed in ndnSIM-2.7. I have added the
function back in the base *strategy* class and modified the *onInterestFinalize
*function in the *forwarder* class in the following way.

if (!pitEntry->isSatisfied) {
    beforeExpirePendingInterest(*pitEntry);
    /*~~~~~~~~~~MY MODIFICATION~~~~~~~~~~~~~*/
    this->dispatchToStrategy(*pitEntry,
      [&] (fw::Strategy& strategy) {
strategy.beforeExpirePendingInterest(pitEntry); });
}

I have recompiled all code in optimized mode and overridden the
*beforeExpirePendingInterest
*in my custom strategy subclass. Now, the problem is, this function is not
getting invoked in my strategy subclass when pending interest is expired.
What could be the issue? Did I miss anything to add either in the base
strategy or forwarder class? All my code are inside the scenario folder.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20190911/aa944cca/attachment.html>


More information about the ndnSIM mailing list