[ndnSIM] regarding block.hpp

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Mon Feb 8 16:50:04 PST 2016

Hi Carl,

since this seems to be a documentation issue of ndn-cxx, but related to ndnSIM at the same time, I would like this email to be on the nfd-dev mailing list as well.

The general guidance that I could give you is (as you correctly pointed out) that in NDN we follow the TLV format (that is, Type - Length - Value).

To that end, you will have to create your own methods (or extend the existing ones) to encode and decode something to/from wire format. 

If you could be more specific on the things that you would like to achieve, I could provide more help.

In general, the Block class of ndn-cxx, provides encoders and decoders for many different types of data in order to abstract the low layer details from the developer.

As far as the documentation issue is concerned, thank you for bringing this up. We will try to address it in the near future.

Thank you,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department

> On Feb 8, 2016, at 3:10 PM, Carl Zu <carlzu8 at gmail.com> wrote:
> I think lack of documentation is a problem...
> I wanted to write some bytes in the interest message in ndnSIM. In ns3, thanks to their documentation, one can easily understand that in order to write some bytes, he should serialize a header. 
> For doing the same thing in ndnSIM, I have had the impression that I should use "block". Moreover, It looks as though an interest message is a set of TLVs (based on the explanation in the NDN project website). So probably if I like to write eight bytes as four pieces of two-byte data, I should write four TLVs. But indeed, there are many constructors in block.hpp, and it's just about looking at one code after another to understand each of them due to lack of documentation...
> Can someone please give some guidance ???. 
> thanks and rgds.
> C

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20160208/776a1b30/attachment.html>

More information about the ndnSIM mailing list