<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Isuru,<div><br></div><div>If you want to get hold of the node on which the strategy running, then you can do the following in any of the ndn::ForwardingStrategy methods:</div><div><br></div><div>Ptr<Node> node = this->GetObject<Node>();</div><div><br></div><div>After that you can node->GetId() to get node id.</div><div><br></div><div>---</div><div>Alex</div><div><br><div><div>On Nov 19, 2013, at 6:46 AM, <a href="mailto:i.liyanage@surrey.ac.uk">i.liyanage@surrey.ac.uk</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" fpstyle="1" aria-label="Message body" tabindex="0" style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; margin: 0px;">Hi Alex,<div><br></div><div>Is it possible to get the node number, within the <font color="#666699">model/fw/<a href="http://ndn-forwarding-strategy.cc/">ndn-forwarding-strategy.cc</a><span class="Apple-converted-space"> </span></font>code.</div><div><br></div><div>many thanks,</div><div>Isuru.<br><div style="color: rgb(40, 40, 40);"><hr tabindex="-1" style="display: inline-block; width: 712px;"><div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>Alexander Afanasyev <<a href="mailto:cawka1@gmail.com">cawka1@gmail.com</a>> on behalf of Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu">alexander.afanasyev@ucla.edu</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>17 November 2013 20:19<br><b>To:</b><span class="Apple-converted-space"> </span>Liyanage IU Mr (PG/R - Electronic Eng)<br><b>Cc:</b><span class="Apple-converted-space"> </span>ndnsim<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [ndnSIM] Content Store data manipulation</font><div> </div></div><div><div>Hi Isuru,</div><div><br></div><div>The ContentStore::Add method is called (and which results in calling of the selected ContentStoreImpl<Policy>::Add method) from ndn::ForwardingStrategy (model/fw/<a href="http://ndn-forwarding-strategy.cc/" title="http://ndn-forwarding-strategy.cc
Ctrl+Click to follow link">ndn-forwarding-strategy.cc</a>line 239 and 255).</div><div><br></div><div>Further, ContentStoreImpl<Policy>::Add calls insert method on the underlying policy-based controller, which results in calling policy-specific 'insert' method.  For example, if selected policy is Lru, then `insert' method defined in utils/trie/lru-policy.h line 77-87.</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Nov 17, 2013, at 10:57 AM, <<a href="mailto:i.liyanage@surrey.ac.uk">i.liyanage@surrey.ac.uk</a>> <<a href="mailto:i.liyanage@surrey.ac.uk">i.liyanage@surrey.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" tabindex="0" id="" style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; margin: 0px;">Hi Alex,<div><br></div><div>I looked at the both implementations and still not sure how to handle the entries in CS.</div><div><br></div><div>for an example when data is received by a node what method inserts the data to CS??</div><div>Assuming the method <font color="#666699">ContentStoreImpl<Policy>::Add (Ptr<const Data> data)</font><span class="Apple-converted-space"> </span>is executed,</div><div>from where does this method is called</div><div><br></div><div>many thanks,</div><div>Isuru<br><div style="color: rgb(40, 40, 40);"><hr tabindex="-1" style="display: inline-block; width: 705px;"><div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>Alexander Afanasyev <<a href="mailto:cawka1@gmail.com">cawka1@gmail.com</a>> on behalf of Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu">alexander.afanasyev@ucla.edu</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>14 November 2013 22:21<br><b>To:</b><span class="Apple-converted-space"> </span>Liyanage IU Mr (PG/R - Electronic Eng)<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:ndnsim@lists.cs.ucla.edu">ndnsim@lists.cs.ucla.edu</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [ndnSIM] Content Store data manipulation</font><div> </div></div><div><div>Hi Isuru,</div><div><br></div><div>utils/ folder contain general-use policies and model/cs/ folder contain policy that can be used only with ContentStore.  I would recommend to start with general-use and just peek at ContentStore-specific policy to see how to access information from cached entry.</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Nov 14, 2013, at 9:36 AM, <<a href="mailto:i.liyanage@surrey.ac.uk">i.liyanage@surrey.ac.uk</a>> <<a href="mailto:i.liyanage@surrey.ac.uk">i.liyanage@surrey.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" tabindex="0" style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; margin: 0px;">Hi Alex,<div><br></div><div>To write a policy which file should I refer to. I noticed the ContentStore implementation in */model/ cs folder and policy file in */utils/ trie folder.</div><div>Could you suggest me good way to start to create a new policy.</div><div><br></div><div>Many thanks,</div><div>Isuru</div><div><br><div style="color: rgb(40, 40, 40);"><hr tabindex="-1" style="display: inline-block; width: 705px;"><div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>Alexander Afanasyev <<a href="mailto:cawka1@gmail.com">cawka1@gmail.com</a>> on behalf of Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu">alexander.afanasyev@ucla.edu</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>14 November 2013 16:07<br><b>To:</b><span class="Apple-converted-space"> </span>Liyanage IU Mr (PG/R - Electronic Eng)<br><b>Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:ndnsim@lists.cs.ucla.edu">ndnsim@lists.cs.ucla.edu</a><br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [ndnSIM] Content Store data manipulation</font><div> </div></div><div>Hi Isuru,<div><br></div><div>Since ContentStore is property of the forwarding daemon, there is no application interface to directly manage (add/remove) entries.  You can have full control over the cache content if you write a so-called policy, but this will not be application.</div><div><br></div><div>---</div><div>Alex</div><div><br><div><div>On Nov 14, 2013, at 3:25 AM,<span class="Apple-converted-space"> </span><a href="mailto:i.liyanage@surrey.ac.uk">i.liyanage@surrey.ac.uk</a><span class="Apple-converted-space"> </span>wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" tabindex="0" style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; margin: 0px;">Hi,<div><br></div><div>Is it possible to add/remove Content Store entries using a application on a node.</div><div>If it is what methods should I use.</div><div><br></div><div>many thanks,</div><div>Isuru</div></div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div></blockquote></div><br></div></div></div></div></div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div></blockquote></div><br></div></div></div></div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div></blockquote></div><br></div></div></div></div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div></blockquote></div><br></div></body></html>