Hi Junxiao,<div><br></div><div>Thanks for your reply.</div><div><br></div><div>I notice that everytime I call a set-function in Data, like setName(),   resetWire() will be called, and m_wire will be reset. When it comes to getFullName(), </div><div><br></div><div><div>if (!m_wire.hasWire()) {</div><div>      BOOST_THROW_EXCEPTION(Error("Cannot compute full name because Data has no wire encoding (not signed)"));</div><div>}</div><div><br></div><div>m_wire.hasWire() returns false. so exception will be throwed.</div><div><br></div><div>I add data->wireEncode() after where I call the set-functions so that m_wire would not be empty , and it works. :)</div><div><br></div><div>But I still got this problem , how to obtain CS <span style="white-space: pre-wrap;">metrics when I'm using nfd::cs. For now I use 2 counters in Forwarder::onContentHit and onContentMiss, but I find the results are quite different from </span><span style="white-space: pre-wrap;">ndn::CsTracer's results when I'm using the old content store with the same topo, same params.</span></div><div><span style="white-space: pre-wrap;"><br></span></div><div><span style="white-space: pre-wrap;">Yours,</span><span style="white-space: pre-wrap;">cjb</span></div><div><br></div><div><br></div><blockquote name="replyContent" class="ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:#b6b6b6 2px solid;margin-right:0">-----原始邮件-----<br>
<b>发件人:</b><span id="rc_from">"Junxiao Shi" <shijunxiao@email.arizona.edu></span><br>
<b>发送时间:</b><span id="rc_senttime">2017-12-15 20:17:59 (星期五)</span><br>
<b>收件人:</b> cjb0725@mail.ustc.edu.cn<br>
<b>抄送:</b> ndnsim@lists.cs.ucla.edu<br>
<b>主题:</b> Re: [ndnSIM] Data has no wire encoding (not signed)<br><br><div><div dir="auto">Hi cjb</div><div dir="auto"><br></div><div dir="auto">NFD ContentStore expects Data::getFullName() to return a valid name with implicit digest. If your changes cannot maintain this property, it will have undefined behavior (such as crashing).</div><div dir="auto">Look at the logic in Data::getFullName() and see what went wrong.</div><div dir="auto"><br></div><div dir="auto">Yours, Junxiao</div><br><div class="gmail_quote"><div>On Thu, Dec 14, 2017 at 04:44 <<a href="mailto:cjb0725@mail.ustc.edu.cn" target="_blank">cjb0725@mail.ustc.edu.cn</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><pre style="white-space:pre-wrap;line-height:normal">Greetings all,</pre><pre style="white-space:pre-wrap;line-height:normal">  I add two new fields into Data and modified the encode and decode function, tlv.hpp as well. if I use the old ContentStore </pre><pre style="white-space:pre-wrap;line-height:normal">   ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru","MaxSize","100");</pre><pre style="white-space:pre-wrap;line-height:normal">it works well.But if I use the nfd::Cs</pre><pre style="white-space:pre-wrap;line-height:normal">   ndnHelper.setCsSize(100);
   ndnHelper.setPolicy("nfd::cs::lru");</pre><pre style="white-space:pre-wrap;line-height:normal">I got this error: </pre><pre style="white-space:pre-wrap;line-height:normal">libc++abi.dylib: terminating with uncaught exception of type boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<ndn::Data::Error> >: Cannot compute full name because Data has no wire encoding (not signed).</pre><pre style="white-space:pre-wrap;line-height:normal">And I have another question, we can use ndn::CsTracer to obtain metrics about hits/misses, but this only works with the old ContentStore , how to obtain these metrics when I use <span style="font-family:宋体,arial,Verdana,sans-serif">nfd::Cs?</span></pre>any help would be great.<span></span><div><br></div><div>Thanks in advance!</div>_______________________________________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
</blockquote></div></div>
</blockquote><br><span>--<br>陈劼博<div>中国科学技术大学自动化系</div><div><a href="mailto:cjb0725@mail.ustc.edu.cn" target="_blank">cjb0725@mail.ustc.edu.cn</a></div></span></div>