[ndnSIM] Creating Custom Strategy that keeps state.

Junxiao Shi shijunxiao at email.arizona.edu
Fri Jun 23 14:49:58 PDT 2017


Hi Johnson

Strategy should not keep states on its own instance. All states must be
stored as StrategyInfo in a PIT or Measurements entry. Violating this rule
triggers undefined behavior. See NFD developer guide "strategy storage"
section for more information.

Yours, Junxiao

On Fri, Jun 23, 2017 at 2:43 PM, Olumide Akinwande <
jolumideakinwande at yahoo.com> wrote:

> Hi ndnSim friends,
>
> I am trying to create a custom strategy that keeps state and I need some
> help.
>
> Going through the access-strategy in the ndnSim package, I'm a bit
> confused about how some of the data structures declared in the
> access-strategy.hpp are initialized.
>
> For example an unordered_map is defined called "m_fit" that maps FaceId to
> FaceInfo (class defined in the .hpp file) but in the access-strategy.cpp
> file, only access actions are performed on "m_fit" (which is performed
> twice).
>
> I'm confused on how this map was initialised or its values set.
> I think understanding the process is important for my programming and I
> will be glad for any help.
>
> Thanks,
>
> Johnson
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170623/654c971a/attachment.html>


More information about the ndnSIM mailing list