[ndnSIM] Adding new packet fields

nabil khemache khemache.nabil at gmail.com
Sat May 16 22:32:06 PDT 2020


Hi everyone,

I just add Tags (common types) in my packets and it worked very well,
thanks to the advices i did found here in the archives.

But when i tired to set specific type of Tags, which is in my case the
position of the sending node (Vector3D), i had to create a new class to
implement the Encode and Decode functions.

I'm not very familiar with the concept, i just understood that the encode
method had to compute the  size of the field, and the Decode is to convert
from a const unit8_t value read from the Block to the field type we want.
Am i right?

You can find here all the files that i modified, and new one called
Position.hpp and Position.cpp

https://github.com/nevil-khemache/ndnSIM-CustomField

i had this error when trying to setTag in the Interest packet :

terminate called after throwing an instance of
'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<ndn::Block::Error>
>'
  what():  TLV-LENGTH doesn't match buffer size

I don't really know what i am missing or misunderstanding, i think i might
encode or decode my field in a wrong way.

Your help is, as always, very important to me.

thanks in advance et best regards

Nabil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20200516/3a1d6bdc/attachment.html>


More information about the ndnSIM mailing list