[ndnSIM] question for the function Lookup

Alex Afanasyev alexander.afanasyev at ucla.edu
Sat Feb 16 19:41:42 PST 2013


Hi Aaron,

How do you create your CA class?  Did you extend the helper (ndn::StackHelper) and use a new instance of ObjectFactory to create an instance of CA class by name?  And related question, did you assign a unique name in GetTypeId () function of your CA class?   Did you call AggregateObject method in Install method of ndn::StackHelper class?

I'm assuming that you're getting a segfault while calling Lookup.  If so, most likely your m_ca is simply not initialized.  And most likely, this could happen if you created an object, but didn't call AggregateObject method (this way GetObject<CA> () would return 0).

---
Alex

On Feb 16, 2013, at 6:54 PM, aaronishere <aaronishere at qq.com> wrote:

> Hi, Alex
> In pit/fib.h, the function Lookup() is a pure virtual funtion and the concrete one is defined in the fib-impl/pit-impl. I'm not sure how the Lookup in the fib/pit jumps to the one in the fib-impl/pit-impl?  I defined a pointer m_ca in the forwardingstrategy like m_pit,  but when executes Ptr<ca::Entry>m_ca->Lookup(), it doesn't jump to the function Lookup in the ca-impl.  Thanks a lot!
>  
> Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20130216/227d231e/attachment.html>


More information about the ndnSIM mailing list