<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I have written a strategy which needs to have states that are specific to the strategy, not to the namespace.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
(1)  <span style="margin: 0px">Lets say I have the following strategy:</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
</div>
<span style="color: rgb(50, 49, 48); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; background-color: rgb(255, 255, 255); display: inline !important">NFD_REGISTER_STRATEGY(<span style="font-family: Calibri, Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important">CustomStrategy</span>);</span>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">class CustomStrategy : Strategy {</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">void</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">afterReceiveInterest() {</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)"> cout << "v=" <<v << endl;  </span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)"> v ++;</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">}</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">private:</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)"> int v = 0;</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">}</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
I want the variable "v" to be Strategy specific.</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
(2) I set CustomStrategy for two prefixes, lets say "/a" and '/b". </div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
</div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<br>
</div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<span style="margin: 0px; font-size: 12pt; font-family: calibri, arial, helvetica, sans-serif; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0)">(3) I send two interests under "/a", lets say "/a/1" and "/a/2". The value of "v" should be 2.</span></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<span style="margin: 0px; font-size: 12pt; font-family: calibri, arial, helvetica, sans-serif; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0)">    v=0 and v=1 should be printed.</span></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<span style="margin: 0px; font-size: 12pt; font-family: calibri, arial, helvetica, sans-serif; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0)"><br>
</span></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<span style="margin: 0px; font-size: 12pt; font-family: calibri, arial, helvetica, sans-serif; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0)">(4) Now I send one interest under "/b" ("/b/1"). I was expecting it to print v=2. But it printed v=0.</span></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<span style="margin: 0px; font-size: 12pt; font-family: calibri, arial, helvetica, sans-serif; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0)"><br>
</span></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<font color="#000000" face="calibri, arial, helvetica, sans-serif">I guess the reason is , for two different namespace ("/a" and "/b"), two different instances of CustomStrategy is created. I have also tried adding this Strategy specific info in the Measurement
 Table, like it is done in <a href="https://github.com/named-data/NFD/blob/master/daemon/fw/asf-measurements.hpp" title="https://github.com/named-data/NFD/blob/master/daemon/fw/asf-measurements.hpp">
ASF strategy</a> But find out for different namespace, measurement entries are different. Can anyone give me suggestions what can I do here?</font></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<font color="#000000" face="calibri, arial, helvetica, sans-serif"><br>
</font></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<font color="#000000" face="calibri, arial, helvetica, sans-serif">Muktadir Chowdhury</font></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<font color="#000000" face="calibri, arial, helvetica, sans-serif">University of Memphis</font></div>
<br>
</div>
</body>
</html>