[ndnSIM] Custom Strategy for Interest data collection - not working?

John Baugh jpbaugh at umich.edu
Thu Jan 5 17:34:17 PST 2017

Alex and others,

I have updated the code:

I even included the PolicyToFile class that does successfully print content
store related things to the file.

But even after adding GlobalRoutingHelper functions, I cannot get this to
work.  I'll assume it's not a problem related to me subclassing
MulticastStrategy rather than Strategy, is it?

But, I'm doing everything that is in the example on ndnSIM's website.  I
used the RandomLoadBalancer as my example.  It still isn't working.

I'm not even at the point where I'm doing much with the actual
interests...  I just want to print out information when an interest is
received, and when the object is created initially (i.e., when the ctor is

Any help would be greatly appreciated, as always.  If anyone could run the
code and see if you can figure out what's going on, I'd be very appeciative
(make a umd subdirectory for the Policy class .hpp and .cpp, or change
around the includes - doesn't matter, of course)



On Thu, Jan 5, 2017 at 2:47 AM, Alex Afanasyev <aa at cs.ucla.edu> wrote:

> I think you forgot to configure FIBs, e.g., using GlobalRoutingHelper.
> ---
> Alex
> On Jan 4, 2017, at 11:42 PM, John Baugh <jpbaugh at umich.edu> wrote:
> ndnSIM friends,
> I am continuing a previous attempt at creating a Custom Strategy, for the
> primary purpose of recording information on Interests as they arrive at a
> router.
> The three involved files, linked in my Google Drive are:
> 1. *The scenario file:*   (jpb-strategy1-test.cpp)
>      https://drive.google.com/open?id=0By9ufeKqmJYYWXNpbEFYSEI2VWc
> 2. *The PopularityStrategy.hpp file* with my custom strategy specification
>      https://drive.google.com/open?id=0By9ufeKqmJYYQm5BQVRSQzNjSnc
> 3.  *The PopularityStrategy.cpp file* with the implementation of the
> custom strategy class
>       https://drive.google.com/open?id=0By9ufeKqmJYYcTFXc1ZUcnpfQTA
> Notes:
> - I have the scenario file in the *scenarios* directory (I'm using the
> template from GitHub)
> - I have the PopularityStrategy.[hpp,cpp] files in the *extensions *
> directory
> - I subclassed MulticastStrategy to create the PopularityStrategy
> - I did call NFD_REGISTER_STRATEGY at the top of the
> PopularityStrategy.cpp file
> Everything compiles just fine, but I get *no printout from the
> PopularityStrategy *class.  I have cout<< inside both the constructor and
> the afterReceiveInterest function.
> It's as if it's not being used at all.
> I am very much at a loss, and would greatly appreciate assistance on
> this.  It's close.  I can feel it.  :)
> Thanks,
> John
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170105/d3b6bb4f/attachment.html>

More information about the ndnSIM mailing list