[ndnSIM] Wrong tag value

DJEMAA Adel a_djemaa at esi.dz
Mon Apr 6 08:16:04 PDT 2020


Hi,
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).
You can perform it like this:
before send data :
double M;
auto tag =make_shared<lp::MTag>(M);
shared_ptr<Data> data2=data;
data2->setTag(tag);
....continue by sending (*data2) instead of (data) in your code......
Hope that helps.


Le jeu. 2 avr. 2020 à 22:06, henda hnaien via ndnSIM <
ndnsim at lists.cs.ucla.edu> a écrit :

> hi all,
> 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).
> before send data :
> double M;
> auto tag =make_shared<lp::MTag>(M);
>  data.setTag(tag);
>
> after receive data :
> auto tag = data.getTag<lp::MTag>();
> if(tag != nullptr){
>     double M = tag->get();
>    }
>   data.removeTag<lp::MTag>();
>
> have you any idea about this problem. thank you for your help.
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>


-- 
Bien cordialement.
Mr DJAMA Adel.
Ecole Nationale Superieure d'Informatique - Oued smar, Alger, Algérie.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20200406/4f561f20/attachment.html>


More information about the ndnSIM mailing list