<div dir="ltr"><div>Hi,</div><div>Try to set the MTag value on a pointer on the data packet, and send that pointer instead of the original data packet (before putting it in the outgoing Data pipeline).</div><div>You can perform it like this: </div><div><div>before send data :<br></div><div>double M;<br></div><div>auto tag =make_shared<lp::MTag>(M);</div><div>shared_ptr<Data> data2=data; <br></div><div>data2->setTag(tag);</div><div>....continue by sending (*data2) instead of (data) in your code......</div><div>Hope that helps.</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 2 avr. 2020 à 22:06, henda hnaien via ndnSIM <<a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>hi all,<br>I have added a tag to a data packet but when the packet is received by the next hop, the value of tag change ( example the value passed from 1000 to  e+19).</div><div>before send data :<br></div><div>double M;<br></div><div>auto tag =make_shared<lp::MTag>(M);</div><div> data.setTag(tag);</div><div><br></div><div>after receive data : <br></div><div>auto tag = data.getTag<lp::MTag>();</div><div>if(tag != nullptr){<br>    double M = tag->get();<br>   }</div><div>  data.removeTag<lp::MTag>();</div><div><br></div><div>have you any idea about this problem. thank you for your help.</div></div>
_______________________________________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div>Bien cordialement.</div>Mr DJAMA Adel.<div>Ecole Nationale Superieure d'Informatique - Oued smar, Alger, Algérie.</div></div></div>