[ndnSIM] Communication between Strategy subclass and Policy subclasses

John Baugh jpbaugh at umich.edu
Sat Jan 14 19:42:02 PST 2017


Greetings ndnSIM friends,

I need a way to communicate between the Strategy and Policy subclasses.  I
am creating a custom Strategy, and a custom Policy subclass.  I need
information about the interests coming in, which will affect decisions that
the Policy makes.  So, it stands to reason that I will need some sort of
communication between the two.

To do this, my idea is to obtain a reference/pointer to each, and then to
have a custom method in one (or both) of the classes to setStrategy or
setPolicy so that I can maintain an internal reference (using aggregation.)


So, for the Policy, I can call getPolicy on the Content Store.

But what about the Strategy object?  Is there a way to obtain this?

Either way it seems I'd need a reference to both.

Thanks,

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170114/15f6cceb/attachment.html>


More information about the ndnSIM mailing list