[ndnSIM] To use AddPacketTag in Producer.cpp

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Mon Jul 11 17:23:14 PDT 2016


you will have to create a class similar to the one in the fw-hop-count-tag.hpp file. The hop count tag is attached to every packet by the Send method of the NetDeviceFace class:


Hope that this helps,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department

> On Jul 11, 2016, at 3:09 AM, theint july <theintjuly at gmail.com> wrote:
> Hi 
> I am trying to add tag to the data packet like fw-hop-count tag.
> So I modified EXPTag.hpp and .cpp like fw-hop-count-tag .hpp and cpp. And I wnat to ADD this when the producer provide the data.
> Therefore I do it as follow.
> I am currently using ndnSIM 2.0.
> if (data!=0) 
> {
>  EXPTag exptag;
> NS_LOG_INFO ("Infomation "<< exp<< " : send to data > "<< data->getName());
> exptag.Set (exp);
> data->GetPayload()->AddPacketTag (exptag);
> The error is that data have no member name "GetPayload ( ) " .
> And I also check the data.h file and I don't see GetPayload function.
> Please kindly let me get your guidance how can I used  AddPacketTag in producer.cpp in ndnSIM 2.0. 
> With Best Regards.
> Theint Theint Myo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160711/8a9ae76a/attachment.html>

More information about the ndnSIM mailing list