[ndnSIM] Appropriate time to print CS contents?

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Fri Dec 9 20:07:08 PST 2016

Hi John,

I would suggest you either use the NS3 logging statements (e.g., NS_LOG_FUNCTION, NS_LOG_INFO) or the cerr to print out the contents of the CS.

Hope that this helps,

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

> On Dec 9, 2016, at 7:51 PM, John Baugh <jpbaugh at umich.edu> wrote:
> ndnSIM friends,
> At what point is it appropriate to print the contents of the CS?
> I've tried putting some code to print its contents using iterators (e.g., 
> for(auto it = theCS.begin(); it != theCS.end(); ++it)
> {
>     cout<<it->getName()<<endl;
> }
> But this doesn't appear to do anything.  I'm currently putting the code after Simulation::Run() and before Simulation::Destroy();
> Is there somewhere else I should be putting it?  I assumed it would print out all the remaining entries by the time the simulation was done running.  I was apparently wrong.
> Note:  I'm not doing anything special in my custom Policy (e.g., I'm not tracking a secondary table of contents yet.)  - but does this even have anything to do with it?  I assume that items are put in the content store regardless.
> Ideas?
> Thanks,
> John

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

More information about the ndnSIM mailing list