[ndnSIM] beforeExpirePendingInterest not invoked in subclass

Muktadir R Chowdhury (mrchwdhr) mrchwdhr at memphis.edu
Wed Sep 11 12:03:11 PDT 2019

Have you turned on the corresponding log of your strategy?

From: ndnSIM <ndnsim-bounces at lists.cs.ucla.edu> on behalf of Abu Saleh Md Tayeen via ndnSIM <ndnsim at lists.cs.ucla.edu>
Sent: Thursday, September 12, 2019 1:00 AM
To: ndnsim at lists.cs.ucla.edu <ndnsim at lists.cs.ucla.edu>
Subject: [ndnSIM] beforeExpirePendingInterest not invoked in subclass

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) {
    /*~~~~~~~~~~MY MODIFICATION~~~~~~~~~~~~~*/
      [&] (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/afa984af/attachment.html>

More information about the ndnSIM mailing list