[ndnSIM] How to change prefix name?

최원준 wonjunchoi001 at gmail.com
Tue Jan 13 23:28:36 PST 2015


Thanks for your comment. btw, I wonder what it means.(-1 index)

Wonjun, Choi

2015-01-14 15:57 GMT+09:00 Alex Afanasyev <alexander.afanasyev at ucla.edu>:

> While it is possible to do what you're asking, I would actually suggest a
> different solution.  You can get the number stored in the name component
> and print it in readable form, instead of just printing the name.
>
> For example,
>
> std::cout << x.get(-1).toSeqNum();
>
> ---
> Alex
>
> > On Jan 14, 2015, at 1:40 AM, 최원준 <wonjunchoi001 at gmail.com> wrote:
> >
> > Hello.
> >
> > I want to change prefix name like 1, 2, 3, ... instead of /%00Z ...
> > The code below displays the prefix name.
> > ---------------------------------------------------------------
> > for (int i = 0; i < 300; i++) {
> > ndn::Name x;
> > x.appendSeqNum(i);
> > std::cout << i << " = " << x << std::endl;
> > }
> > return 0;
> > ---------------------------------------------------------------
> > how can I set the prefix like /v1/1, /v1/2, ...?
> >
> > Wonjun, Choi
> > _______________________________________________
> > ndnSIM mailing list
> > ndnSIM at lists.cs.ucla.edu
> > http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150114/dbd1cdd8/attachment.html>


More information about the ndnSIM mailing list