<div dir="ltr"><div><div>Hello.<br><br></div>Finally I've understood what's wrong. Sorry for giving incomplete answer yesterday.<br></div><div>In conclusion, you need to change -1.0 of this line:<br>
producerHelper.<span class="gmail-pl-c1">SetAttribute</span>(<span class="gmail-pl-s"><span class="gmail-pl-pds">"</span>Freshness<span class="gmail-pl-pds">"</span></span>, <span class="gmail-pl-c1">TimeValue</span>(<span class="gmail-pl-c1">Seconds</span>(-<span class="gmail-pl-c1">1.0</span>))); <span class="gmail-pl-c"><span class="gmail-pl-c">//</span> unlimited freshness</span>

<br></div><div>into 0:<br>
producerHelper.<span class="gmail-pl-c1">SetAttribute</span>(<span class="gmail-pl-s"><span class="gmail-pl-pds">"</span>Freshness<span class="gmail-pl-pds">"</span></span>, <span class="gmail-pl-c1">TimeValue</span>(<span class="gmail-pl-c1">Seconds</span>(0<span class="gmail-pl-c1"></span>))); <span class="gmail-pl-c"><span class="gmail-pl-c">//</span> unlimited freshness<br>or delete this line which means the same thing.</span> <br></div><div><br>
Actually there are two mistakes in the examples. <br>The first one is the consumer app 
<span class="gmail-pl-s"><span class="gmail-pl-pds"></span>OneInterestRequester<span class="gmail-pl-pds"></span></span>

but not DumbRequester, which is used only in ndnSIM1.0.<br></div><div>Please do not insert 
<span style="white-space:pre-wrap">NS_OBJECT_ENSURE_<wbr>REGISTERED(Du</span><span style="white-space:pre-wrap">mbRequester);</span> 

into main cpp file. It will record the log of main file but not the consumer.<br></div><div>The second one is the freshness time should be greater than zero. 0 (default value) stands for unlimited freshness period in ndn-cxx. -1 is senceless.<br></div><div><br></div><div>If you fix the time and run it with:<br>NS_LOG=OneInterestRequester ./waf --run=ndn-simple-with-content-freshness<br></div><div><div><br></div><div>You are expected to get:<br>+1.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] Sending Interest packet for /no-freshness<br>+1.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] >> I: /no-freshness<br>+1.057727998s 0 OneInterestRequester:OnData(): [DEBUG] << D: /no-freshness<br>+2.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] Sending Interest packet for /with-freshness<br>+2.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] >> I: /with-freshness<br>+2.057855998s 0 OneInterestRequester:OnData(): [DEBUG] << D: /with-freshness<br>+10.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] Sending Interest packet for /no-freshness<br>+10.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] >> I: /no-freshness<br>+10.028863999s 0 OneInterestRequester:OnData(): [DEBUG] << D: /no-freshness<br>+12.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] Sending Interest packet for /with-freshness<br>+12.000000000s 0 OneInterestRequester:SendInterest(): [DEBUG] >> I: /with-freshness<br>+12.057855998s 0 OneInterestRequester:OnData(): [DEBUG] << D: /with-freshness<br><br></div><div>The response time of the 2nd "no-freshness" should be about half of other three interests, indicating the cache hits.<br>In my computer they are about 0.029s and 0.058s.<br><br></div><div>Xinyu Ma.<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-04-24 12:38 GMT+09:00 amulya amy <span dir="ltr"><<a href="mailto:ammu.amulya12@gmail.com" target="_blank">ammu.amulya12@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Yes, I will check.... Do i use t use just this <span style="white-space:pre-wrap">NS_OBJECT_ENSURE_<wbr>REGISTERED(Du</span><span style="white-space:pre-wrap">mbRequester);??</span></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 24, 2018, 9:03 AM John Baugh <<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Could you put it there and see if it does anything?<div dir="auto"><br></div><div dir="auto">Thanks</div><div dir="auto"><br></div><div dir="auto">JPB</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Apr 23, 2018, 11:31 PM amulya amy <<a href="mailto:ammu.amulya12@gmail.com" rel="noreferrer" target="_blank">ammu.amulya12@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">No, I don't. </div><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 24, 2018, 12:39 AM John Baugh <<a href="mailto:jpbaugh@umich.edu" rel="noreferrer noreferrer" target="_blank">jpbaugh@umich.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>In your main file, do you have:<br><br>
<pre><span class="m_-3682260743815592617m_-5713423490554199973m_-7946109400393658435m_-6420707425175625006gmail-n">NS_OBJECT_ENSURE_REGISTERED</span><span class="m_-3682260743815592617m_-5713423490554199973m_-7946109400393658435m_-6420707425175625006gmail-p">(</span>Du<wbr>mbRequester<span class="m_-3682260743815592617m_-5713423490554199973m_-7946109400393658435m_-6420707425175625006gmail-p">);</span></pre>

<br><br></div>at the top before the main function?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 23, 2018 at 10:36 AM, amulya amy <span dir="ltr"><<a href="mailto:ammu.amulya12@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">ammu.amulya12@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Sir, i did try using this but got same error... Please help</div><div class="m_-3682260743815592617m_-5713423490554199973m_-7946109400393658435m_-6420707425175625006HOEnZb"><div class="m_-3682260743815592617m_-5713423490554199973m_-7946109400393658435m_-6420707425175625006h5"><br><div class="gmail_quote"><div dir="ltr">On Mon, Apr 23, 2018, 7:07 PM Xinyu Ma <<a href="mailto:bitmxy@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">bitmxy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello, Amulya<div><br></div><div>The instruction is out of dated. You should use OneInterestRequester:</div><div><br></div><div> NS_LOG=OneInterestRequester:<wbr>ndn.cd.Freshness.Lru ./waf --run=ndn-simple-with-content-<wbr>freshness</div><div><br></div><div>Xinyu Ma.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-04-23 18:43 GMT+09:00 amulya amy <span dir="ltr"><<a href="mailto:ammu.amulya12@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">ammu.amulya12@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello Folks... <br></div>I am new to ndnsim and whenever i run <pre>NS_LOG=DumbRequester:ndn.cs.<wbr>Freshness.Lru ./waf
--run=ndn-simple-with-content-<wbr>freshness<br><br>I encounter a  problem<br><br> msg="Invalid or unregistered component name "DumbRequester" in env variable NS_LOG, see above for a list of valid components", file=../src/core/model/log.cc, line=567<br>terminate called without an active exception<br>Command ['/home/iiitd/ndnSIM/ns-3/<wbr>build/src/ndnSIM/examples/ns3-<wbr>dev-ndn-simple-with-content-<wbr>freshness-debug'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").<br>.
</pre>How to resolve it? please help<br></div>
<br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" rel="noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer noreferrer noreferrer noreferrer noreferrer noreferrer" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndnsim</a><br>
<br></blockquote></div><br></div>
</blockquote></div>
</div></div><br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" rel="noreferrer noreferrer noreferrer" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndnsim</a><br>
<br></blockquote></div><br></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</div></div></blockquote></div><br></div>