[ndnSIM] how can i use NDNLP tag to set a double type tage

Junxiao Shi shijunxiao at email.arizona.edu
Thu Jan 12 11:11:53 PST 2017


Hi dyao & Spyros

Declaring a *tag* with double type should work.
However, declaring an *LpHeader* with double type needs additional work.

LpPacket only knows how to decode
<https://github.com/named-data/ndn-cxx/blob/09bcab5bb80f655fd75271440c6cce03147fcb45/src/lp/detail/field-decl.hpp#L49-L57>
and
encode
<https://github.com/named-data/ndn-cxx/blob/09bcab5bb80f655fd75271440c6cce03147fcb45/src/lp/detail/field-decl.hpp#L84-L92>
uint64_t,
in addition to WireDecodable+WireEncodable and Buffer iterator range.
You'll need to specialize DecodeHelper and EncodeHelper for double type,
which involves defining the wire format for double type.

Yours, Junxiao

On Sun, Jan 8, 2017 at 6:34 PM, Spyridon (Spyros) Mastorakis <
mastorakis at cs.ucla.edu> wrote:

> You tried to declare your tag like I did here, but instead of uint64_t to
> use a double type and it did not work?
>
> https://github.com/named-data-ndnSIM/ndn-cxx/commit/
> e53204419c51356dab70e0e5450ff5dcf587827a
>
> Spyridon (Spyros) Mastorakis
> Personal Website: http://cs.ucla.edu/~mastorakis/
> Internet Research Laboratory
> Computer Science Department
> UCLA
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170112/9d7ba547/attachment-0001.html>


More information about the ndnSIM mailing list