<div dir="ltr"><div>Hi Johnson<br><br></div><div>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.<br></div><div><br></div>Yours, Junxiao<br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 23, 2017 at 2:43 PM, Olumide Akinwande <span dir="ltr"><<a href="mailto:jolumideakinwande@yahoo.com" target="_blank">jolumideakinwande@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi ndnSim friends,<div id="m_4018756654072327495yMail_cursorElementTracker_1498253493213"><br></div><div id="m_4018756654072327495yMail_cursorElementTracker_1498253496259">I am trying to create a custom strategy that keeps state and I need some help.</div><div id="m_4018756654072327495yMail_cursorElementTracker_1498254089382"><br></div><div id="m_4018756654072327495yMail_cursorElementTracker_1498253648766">Going through the access-strategy in the ndnSim package, I'm a bit confused about how some of the data structures declared in the <span style="font-family:sans-serif" id="m_4018756654072327495yMail_cursorElementTracker_1498253674336">access-strategy.</span>hpp are initialized.</div><div id="m_4018756654072327495yMail_cursorElementTracker_1498253682074"><br></div><div id="m_4018756654072327495yMail_cursorElementTracker_1498253683092">For example an unordered_map is defined called "m_fit" that maps FaceId to FaceInfo (class defined in the .hpp file) but in the <span id="m_4018756654072327495yMail_cursorElementTracker_1498253906019" style="font-family:sans-serif">access-strategy.cpp file, only access actions are performed on "m_fit" (which is performed twice). </span></div><div id="m_4018756654072327495yMail_cursorElementTracker_1498253683092"><font id="m_4018756654072327495yMail_cursorElementTracker_1498254119046" face="sans-serif"><br></font></div><div id="m_4018756654072327495yMail_cursorElementTracker_1498253683092"><font id="m_4018756654072327495yMail_cursorElementTracker_1498254017510" face="sans-serif">I'm confused on how this map was initialised or its values set. <br></font><div id="m_4018756654072327495ymail_android_signature">I think understanding the process is important for my programming and I will be glad for any help.</div><div id="m_4018756654072327495yMail_cursorElementTracker_1498254177053"><br></div><div id="m_4018756654072327495yMail_cursorElementTracker_1498254177175">Thanks,</div><div id="m_4018756654072327495yMail_cursorElementTracker_1498254188213"><br></div><div id="m_4018756654072327495yMail_cursorElementTracker_1498254188388">Johnson<br></div></div></blockquote></div></div></div></div></div>