<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">it depends on when exactly you use this method. The aggregation of the CS and L3 protocol object to a node object occurs here:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/helper/ndn-stack-helper.cpp#L201-L211" class="">https://github.com/named-data-ndnSIM/ndnSIM/blob/master/helper/ndn-stack-helper.cpp#L201-L211</a></div><div class=""><br class=""></div><div class="">You should be able to get the L3 Protocol object from a node object after this aggregation has occurred.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div><div class=""><br class=""></div></div></div></div><div><blockquote type="cite" class=""><div class="">On Dec 25, 2017, at 4:07 AM, Chengb Cao <<a href="mailto:chengbcao@gmail.com" class="">chengbcao@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Thank you, everyone, I have solved the problem using the following method:<div class=""><br class=""></div>Ptr<ndn::ContentStore> cs=router->GetObject<ndn::ContentStore>;  //(1)<br class="">cs->Print(file);<br class="">Simulator::Schedule(...);<div class=""><br class=""><div class="">I got the correct entry, but, when I used the method in "<a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/examples/ndn-triangle-calculate-routes.cpp" class="">https://github.com/named-data-ndnSIM/ndnSIM/blob/master/examples/ndn-triangle-calculate-routes.cpp</a>", line 79-81,</div><div class="">auto ndn = routet->GetObject<ndn::L3Protocol>();<br class="">    for (const auto& entry : ndn->getForwarder()->getCs()) {  //(2)<div class="">      .......</div></div><div class=""><br class=""></div><div class="">the entry size is always 0, i am confused what's the difference between (1) and (2) to get the CS pointer ?</div></div><div class=""><br class=""></div><div class="">Thanks</div></div>
</div></blockquote></div><br class=""></div></body></html>