[ndnSIM] Data has no wire encoding (not signed)

cjb0725 at mail.ustc.edu.cn cjb0725 at mail.ustc.edu.cn
Fri Dec 15 08:14:07 PST 2017


Hi Junxiao,


Thanks for your reply.


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(), 


if (!m_wire.hasWire()) {
      BOOST_THROW_EXCEPTION(Error("Cannot compute full name because Data has no wire encoding (not signed)"));
}


m_wire.hasWire() returns false. so exception will be throwed.


I add data->wireEncode() after where I call the set-functions so that m_wire would not be empty , and it works. :)


But I still got this problem , how to obtain CS 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 ndn::CsTracer's results when I'm using the old content store with the same topo, same params.


Yours,cjb




-----原始邮件-----
发件人:"Junxiao Shi" <shijunxiao at email.arizona.edu>
发送时间:2017-12-15 20:17:59 (星期五)
收件人: cjb0725 at mail.ustc.edu.cn
抄送: ndnsim at lists.cs.ucla.edu
主题: Re: [ndnSIM] Data has no wire encoding (not signed)


Hi cjb


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).
Look at the logic in Data::getFullName() and see what went wrong.


Yours, Junxiao


On Thu, Dec 14, 2017 at 04:44 <cjb0725 at mail.ustc.edu.cn> wrote:

Greetings all,
  I add two new fields into Data and modified the encode and decode function, tlv.hpp as well. if I use the old ContentStore 
   ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru","MaxSize","100");
it works well.But if I use the nfd::Cs
   ndnHelper.setCsSize(100);
   ndnHelper.setPolicy("nfd::cs::lru");
I got this error: 
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).
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 nfd::Cs?
any help would be great.


Thanks in advance!
_______________________________________________
ndnSIM mailing list
ndnSIM at lists.cs.ucla.edu
http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim


--
陈劼博
中国科学技术大学自动化系
cjb0725 at mail.ustc.edu.cn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20171216/7b6acbf3/attachment.html>


More information about the ndnSIM mailing list