[ndnSIM] How to add a tag to the data?
Spyridon (Spyros) Mastorakis
mastorakis at cs.ucla.edu
Sun Apr 16 16:11:17 PDT 2017
Hi,
I would suggest that you start with the basics of object oriented programming in C++ before using ndnSIM:
https://www.tutorialspoint.com/cplusplus/cpp_object_oriented.htm <https://www.tutorialspoint.com/cplusplus/cpp_object_oriented.htm>
Thanks,
Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA
> On Apr 15, 2017, at 12:08 AM, 黑客 <1602883373 at qq.com> wrote:
>
> FwcontentCopyTag is Constructor tag of me ,but i can not add it to the data.
>
>
> ------------------ 原始邮件 ------------------
> 发件人: "Spyridon (Spyros) Mastorakis"<mastorakis at cs.ucla.edu>;
> 发送时间: 2017年4月15日(星期六) 上午10:55
> 收件人: "黑客"<1602883373 at qq.com>;
> 抄送: "ndnsim"<ndnsim at lists.cs.ucla.edu>;
> 主题: Re: [ndnSIM] How to add a tag to the data?
>
> Hi,
>
> I think I responded to your question yesterday too:
>
> Please take a look here:
>
> http://www.lists.cs.ucla.edu/pipermail/ndnsim/2016-December/003250.html <http://www.lists.cs.ucla.edu/pipermail/ndnsim/2016-December/003250.html>
>
> Thanks,
>
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/%7Emastorakis/>
> Internet Research Laboratory
> Computer Science Department
> UCLA
>
>> On Apr 14, 2017, at 6:15 PM, 黑客 <1602883373 at qq.com <mailto:1602883373 at qq.com>> wrote:
>>
>> I want to add a tag to the data before the producer sent data,for examole:
>>
>>
>> void
>> Producer::OnInterest(shared_ptr<const Interest> interest)
>> {
>> App::OnInterest(interest); // tracing inside
>> NS_LOG_FUNCTION(this << interest);
>> if (!m_active)
>> return;
>> Name dataName(interest->getName());
>> auto data = make_shared<Data>();
>> data->setName(dataName);
>> data->setFreshnessPeriod(::ndn::time::milliseconds(m_freshness.GetMilliSeconds()));
>> data->setContent(make_shared< ::ndn::Buffer>(m_virtualPayloadSize));
>> Signature signature;
>> if (m_keyLocator.size() > 0) {
>> signatureInfo.setKeyLocator(m_keyLocator);
>> }
>> signature.setInfo(signatureInfo);
>> signature.setValue(::ndn::makeNonNegativeIntegerBlock(::ndn::tlv::SignatureValue, m_signature));
>> data->setSignature(signature);
>> NS_LOG_INFO("node(" << GetNode()->GetId() << ") responding with Data: " << data->getName());
>> data->wireEncode();
>> // FwcontentCopyTag contentCopyTag;
>> // data->GetPayload()->AddPacketTag(contentCopyTag);
>> m_transmittedDatas(data, this, m_face);
>> m_appLink->onReceiveData(*data);
>>
>>
>> the red sentence is the question of me ? I want use that to add a tag ,but it is Useless;
>> so, I want to consult a way to achieve my ideal. thankyou!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170416/da255cd2/attachment.html>
More information about the ndnSIM
mailing list