[ndnSIM] To use AddPacketTag in Producer.cpp
theintjuly at gmail.com
Wed Jul 13 00:11:01 PDT 2016
Thank you very much for your guidance.
It works now.
I can attached the tag to data packet.
With Best Regards,
Theint Theint Myo
On Tue, Jul 12, 2016 at 9:23 AM, Spyridon (Spyros) Mastorakis <
mastorakis at cs.ucla.edu> wrote:
> 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/
> Internet Research Laboratory
> Computer Science Department
> On Jul 11, 2016, at 3:09 AM, theint july <theintjuly at gmail.com> wrote:
> 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...
More information about the ndnSIM