<div dir="ltr"><div>Dear Spyros,<br><br></div><div>Thank you very much for your guidance. <br></div><div>It works now.<br></div><div>I can attached the tag  to data packet. <br><br><br></div><div>With Best Regards,<br></div><div>Theint Theint Myo<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 12, 2016 at 9:23 AM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>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><br></div><div><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/a4915caa0c4121f2dd87fd3d7cc3b6eb91632f16/model/ndn-net-device-face.cpp#L87" target="_blank">https://github.com/named-data-ndnSIM/ndnSIM/blob/a4915caa0c4121f2dd87fd3d7cc3b6eb91632f16/model/ndn-net-device-face.cpp#L87</a></div><div><br></div><div>Hope that this helps,</div><div><br><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~mastorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div></div></div>
</div><div><div class="h5">
<br><div><blockquote type="cite"><div>On Jul 11, 2016, at 3:09 AM, theint july <<a href="mailto:theintjuly@gmail.com" target="_blank">theintjuly@gmail.com</a>> wrote:</div><br><div><div dir="ltr"><div><div><div>Hi <br><br></div>I am trying to add tag to the data packet like fw-hop-count tag.<br></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></div><div>Therefore I do it as follow.<br></div><div>I am currently using ndnSIM 2.0.<br><br></div><div><br>if (data!=0) <br>{<br> EXPTag exptag;<br>NS_LOG_INFO ("Infomation "<< exp<< " : send to data > "<< data->getName());<br>exptag.Set (exp);<br>data->GetPayload()->AddPacketTag (exptag);<br><br><br></div><div>The error is that data have no member name "GetPayload ( ) " .<br><br></div><div>And I also check the data.h file and I don't see GetPayload function.<br><br></div><div>Please kindly let me get your guidance how can I used  AddPacketTag in producer.cpp in ndnSIM 2.0. <br><br></div><div>With Best Regards.<br></div><div>Theint Theint Myo</div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>