<div dir="ltr">Hi Junxiao,<br><div class="gmail_quote"><div dir="ltr"><div><br></div><div>Thank you so much for your explanation and pointers. </div><div>I just figured it out and so happy.</div><div><br></div><div>Best Regards,</div><div>Xiaoyan</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 3, 2017 at 5:24 AM, Junxiao Shi <span dir="ltr"><<a href="mailto:shijunxiao@email.arizona.edu" target="_blank">shijunxiao@email.arizona.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Xiaoyan<br><br></div><div>I don't know specific ndnSIM interfaces, but I'll answer from general ns-3 point of view.<br></div><br><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><p class="MsoNormal"><span style="font-family:Arial">I found "Ptr<ContentStore>
cs = m_nodePtr->GetObject<ContentSt<wbr>ore> ();" as an example <br></span></p></div></div></blockquote></span><div>This works because a node can have only one ContentStore.<br></div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><p class="MsoNormal"><span style="font-family:Arial"><span></span></span></p>

<p class="MsoNormal"><span style="font-family:Arial">and tried "Ptr<Producer>
producer = m_nodePtr->GetObject<Producer> ();". </span></p><p class="MsoNormal"><span style="font-family:Arial">But producer turned out to be null.</span></p><br></div></div></blockquote></span><div>This will not work because a node can potentially have multiple Producer instances, so that Producer should not be aggregated into the Node, but is added to some list.<br></div><div>Likewise, you can't use GetObject to obtain a network interface or an IP-based application. They are available through ns-3 attribute system and through object names.<br></div><div><br></div><div>Related reading: <a href="https://www.nsnam.org/docs/release/3.26/manual/html/index.html" target="_blank">ns-3 Manual</a>, "object model", "configuration and attributes", and "object names" sections.<br></div><div><br></div><div>Yours, Junxiao<br></div><div><br></div></div></div></div>
</blockquote></div><br></div>
</div></div></div><br></div>