<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></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="">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:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/a4915caa0c4121f2dd87fd3d7cc3b6eb91632f16/model/ndn-net-device-face.cpp#L87" class="">https://github.com/named-data-ndnSIM/ndnSIM/blob/a4915caa0c4121f2dd87fd3d7cc3b6eb91632f16/model/ndn-net-device-face.cpp#L87</a></div><div class=""><br class=""></div><div class="">Hope that this helps,</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></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Jul 11, 2016, at 3:09 AM, theint july <<a href="mailto:theintjuly@gmail.com" class="">theintjuly@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class="">Hi <br class=""><br class=""></div>I am trying to add tag to the data packet like fw-hop-count tag.<br class=""></div>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.<br class=""></div><div class="">Therefore I do it as follow.<br class=""></div><div class="">I am currently using ndnSIM 2.0.<br class=""><br class=""></div><div class=""><br class="">if (data!=0) <br class="">{<br class=""> EXPTag exptag;<br class="">NS_LOG_INFO ("Infomation "<< exp<< " : send to data > "<< data->getName());<br class="">exptag.Set (exp);<br class="">data->GetPayload()->AddPacketTag (exptag);<br class=""><br class=""><br class=""></div><div class="">The error is that data have no member name "GetPayload ( ) " .<br class=""><br class=""></div><div class="">And I also check the data.h file and I don't see GetPayload function.<br class=""><br class=""></div><div class="">Please kindly let me get your guidance how can I used  AddPacketTag in producer.cpp in ndnSIM 2.0. <br class=""><br class=""></div><div class="">With Best Regards.<br class=""></div><div class="">Theint Theint Myo</div></div></div></blockquote></div><br class=""></div></body></html>