[ndnSIM] Appropriate time to print CS contents?

John Baugh jpbaugh at umich.edu
Fri Dec 9 20:11:18 PST 2016


Thanks for the reply.  However I think the problems seems to be that there
is apparently nothing in the CS when I go to print it.

It never enters my loops - so it will never print out the information
regardless of the printing technique.

My code for custom policy does detect content being inserted (e.g.,
doAfterInsert is called) and the limit on both Cs and my custom Policy are
set to 10.  So I assume it's being added.  So why is it empty by the time I
print it out?



On Dec 9, 2016 11:07 PM, "Spyridon (Spyros) Mastorakis" <
mastorakis at cs.ucla.edu> wrote:

> 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/
> 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/b3d241cc/attachment.html>

More information about the ndnSIM mailing list