[ndnSIM] How to change prefix name?

Alex Afanasyev alexander.afanasyev at ucla.edu
Tue Jan 13 22:57:15 PST 2015


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




More information about the ndnSIM mailing list