[ndnSIM] 回复: Re: question for the function Lookup

aaronishere aaronishere at qq.com
Sat Feb 16 20:52:38 PST 2013


Hi, Alex
You are right, I didn't extend the helper (ndn::StackHelper) and use a new instance of ObjectFactory to create an instance of CA class by name. Thanks a lot!!!




aaronishere

发件人: Alex Afanasyev
发送时间: 2013-02-17 11:41
收件人: aaronishere
抄送: ndnsim
主题: Re: [ndnSIM] question for the function Lookup
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/20130217/b26d49fe/attachment.html>


More information about the ndnSIM mailing list