[ndnSIM] Content Object IDs

John Baugh jpbaugh at umich.edu
Mon Dec 4 06:49:59 PST 2017


Junxiao,

Very useful information as usual.  Thanks a lot for this. :)

A quick question though - if interpreting them as strings is not supposed
to be done, why is there a toUri method that returns a string?  That's what
I've been using.

Thanks!

John

On Dec 4, 2017 9:30 AM, "Junxiao Shi" <shijunxiao at email.arizona.edu> wrote:

> Hi John
>
> I'm working on some custom caching scenarios and need a large cache
>> space.  When I was using smaller spaces, with say, 100 or so cache objects
>> available to request, I didn't seem to have any troubles.
>>
>> Now I'm encountering some strange behaviors and am curious about
>> something.  I was previously under the assumption that the Content IDs used
>> hexadecimal values.  Now I'm not entirely sure.  I increased the
>> NumberOfContents to 1 million, and I'm getting values that don't fall into
>> any sort of hexadecimal format.  I'm seeing the characters "h" and "N" and
>> "H" show up frequently.  These are of course out of range.
>>
> They are encoded according to naming convention <https://named-data.net/
> publications/techreports/ndn-tr-22-ndn-memo-naming-conventions/> , and
> then displayed as NDN URI <https://named-data.net/doc/
> NDN-TLV/current/name.html#ndn-uri-scheme> .
> Do not try to interpret them as strings.
>
>
>> I had also been doing some parsing and conversions so now I'm getting a
>> lot of situations where my stoi calls are receiving bad input.
>>
> You may parse the version/segment/sequence numbers with ndn-cxx's
> name::Component::from* methods. <https://github.com/named-
> data/ndn-cxx/blob/b6828918cd5ba3d7be144bb24e9d30
> 82dc1d2b69/src/name-component.hpp#L359-L432>
>
> Yours, Junxiao
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20171204/d0003347/attachment.html>


More information about the ndnSIM mailing list