<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I would suggest that you start with the basics of object oriented programming in C++ before using ndnSIM:</div><div class=""><br class=""></div><div class=""><a href="https://www.tutorialspoint.com/cplusplus/cpp_object_oriented.htm" class="">https://www.tutorialspoint.com/cplusplus/cpp_object_oriented.htm</a></div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div><div class=""><br class=""></div></div></div></div><div><blockquote type="cite" class=""><div class="">On Apr 15, 2017, at 12:08 AM, 黑客 <<a href="mailto:1602883373@qq.com" class="">1602883373@qq.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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; float: none; display: inline !important;" class="">FwcontentCopyTag  is<span class="Apple-converted-space"> </span></span><span id="result_box" class="short_text" lang="en" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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;"><span class="">Constructor<span class="Apple-converted-space"> </span></span></span><span id="result_box" class="short_text" lang="en" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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;"><span class="">tag  of me  ,but i can not add it to the data.<br class=""></span></span><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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;" class=""><br class=""></div><div style="font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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; font-family: 'Arial Narrow'; padding: 2px 0px;" class="">------------------ 原始邮件 ------------------</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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; background-color: rgb(239, 239, 239); padding: 8px;" class=""><div class=""><b class="">发件人:</b><span class="Apple-converted-space"> </span>"Spyridon (Spyros) Mastorakis"<<a href="mailto:mastorakis@cs.ucla.edu" class="">mastorakis@cs.ucla.edu</a>>;<span class="Apple-converted-space"> </span></div><div class=""><b class="">发送时间:</b><span class="Apple-converted-space"> </span>2017年4月15日(星期六) 上午10:55</div><div class=""><b class="">收件人:</b><span class="Apple-converted-space"> </span>"黑客"<<a href="mailto:1602883373@qq.com" class="">1602883373@qq.com</a>>;<span class="Apple-converted-space"> </span></div><div class=""><b class="">抄送:</b><span class="Apple-converted-space"> </span>"ndnsim"<<a href="mailto:ndnsim@lists.cs.ucla.edu" class="">ndnsim@lists.cs.ucla.edu</a>>;<span class="Apple-converted-space"> </span></div><div class=""><b class="">主题:</b><span class="Apple-converted-space"> </span>Re: [ndnSIM] How to add a tag to the data?</div></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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;" class=""><br class=""></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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; float: none; display: inline !important;" class="">Hi,</span><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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;">I think I responded to your question yesterday too:</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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 class=""><br class=""></div><div class="">Please take a look here:</div><div class=""><br class=""></div><div class=""><a href="http://www.lists.cs.ucla.edu/pipermail/ndnsim/2016-December/003250.html" class="" target="_blank">http://www.lists.cs.ucla.edu/pipermail/ndnsim/2016-December/003250.html</a></div><div class=""><br class=""></div><div class="">Thanks,</div></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: 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 class=""><div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website:<span class="Apple-converted-space"> </span></span><a href="http://cs.ucla.edu/%7Emastorakis/" class="" target="_blank">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div><div class=""><br class=""></div></div></div></div><div class=""><blockquote type="cite" class=""><div class="">On Apr 14, 2017, at 6:15 PM, 黑客 <<a href="mailto:1602883373@qq.com" class="" target="_blank">1602883373@qq.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">I want to add a tag to the data before the producer sent data,for examole:<br class=""><br class=""><br class="">void<br class="">Producer::OnInterest(shared_ptr<const Interest> interest)<br class="">{<br class="">  App::OnInterest(interest); // tracing inside<br class="">  NS_LOG_FUNCTION(this << interest);<br class="">  if (!m_active)<br class="">    return;<br class="">  Name dataName(interest->getName());<br class="">  auto data = make_shared<Data>();<br class="">  data->setName(dataName);<br class="">  data->setFreshnessPeriod(::ndn::time::milliseconds(m_freshness.GetMilliSeconds()));<br class="">  data->setContent(make_shared< ::ndn::Buffer>(m_virtualPayloadSize));<br class="">  Signature signature;<br class="">    if (m_keyLocator.size() > 0) {<br class="">    signatureInfo.setKeyLocator(m_keyLocator);<br class="">  }<br class="">  signature.setInfo(signatureInfo);<br class="">  signature.setValue(::ndn::makeNonNegativeIntegerBlock(::ndn::tlv::SignatureValue, m_signature));<br class="">  data->setSignature(signature);<br class="">  NS_LOG_INFO("node(" << GetNode()->GetId() << ") responding with Data: " << data->getName());<br class="">  data->wireEncode();<br class=""> <span class="Apple-converted-space"> </span><span class="" style="color: rgb(255, 0, 0);">// FwcontentCopyTag contentCopyTag;<br class=""> // data->GetPayload()->AddPacketTag(contentCopyTag);</span><br class="">  m_transmittedDatas(data, this, m_face);<br class="">  m_appLink->onReceiveData(*data);<br class="">   <span class="Apple-converted-space"> </span><br class=""><br class="">the red sentence is the question of me  ?  I want use that to add a tag ,but it is Useless;<br class="">so, I want to consult a way to achieve my ideal. thankyou!<br class=""></div></blockquote></div><br class=""></div><br class="Apple-interchange-newline"></div></blockquote></div><br class=""></div></body></html>