<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Hi there,</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Continuing this issue, I wanted to access ndn application member functions. How can I resolve the application name? I mean I have tried with Downcasting to ns3::ndn::Producer, but compiler gave me:</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default"><font face="tahoma, sans-serif">‘Producer’ is not a member of ‘ns3::ndn’</font><br></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif">Thanks,</font></div><div class="gmail_default"><font face="tahoma, sans-serif">Sabet</font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_extra">
<br><div class="gmail_quote">On Mon, Aug 15, 2016 at 1:23 AM, Alex Afanasyev <span dir="ltr"><<a href="mailto:aa@cs.ucla.edu" target="_blank">aa@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Aug 14, 2016, at 12:14 PM, Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu" target="_blank">shijunxiao@email.arizona.edu</a>> wrote:</div><br class="m_-4582605489705111104Apple-interchange-newline"><div><p dir="ltr">Hi Sabet</p><p dir="ltr">This usually occurs when you are trying to send a packet when processing a packet. You need a io.post in real application or ns3::Simulator::ScheduleNow in simulated application *somewhere*.</p><p dir="ltr">Yours, Junxiao</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Aug 13, 2016 10:37 PM, "Muhammad Hosain Abdollahi Sabet" <<a href="mailto:mhasabet@gmail.com" target="_blank">mhasabet@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:tahoma,sans-serif">Hi,<br><br></div><div style="font-family:tahoma,sans-serif">I have a custom application <i>"CustomApp". </i>I have put SendInterest() in public so I can call it from scenario, for testing purposes. With this snap:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">  ndn::AppHelper app1("CustomApp");<br>  ApplicationContainer appCont = app1.Install(ConsNode);<br><br>  Ptr<CustomApp> app1ptr = DynamicCast<CustomApp>(appCont<wbr>.Get(0));<br>  app1ptr->SendInterest();<br></blockquote></div></div></blockquote></div></div></div></blockquote><div><br></div></span><div>As Junxiao already pointed out, you cannot do this.  One of the reasons is that this code in main() function merely sets up the simulation.  The installed applications is "logically" installed on the node, and it doesn't necessarily has to start at the beginning of the simulation (it is just an accident that in your simulation it does, as you used the default start/stop times).</div><div><br></div><div>I would recommend checking the example applications, e.g., <a href="http://ndnsim.net/2.1/applications.html#customer-example" target="_blank">http://ndnsim.net/2.1/<wbr>applications.html#customer-<wbr>example</a>. You need two things,</div><div>- initiate application tasks only after StartApplication is called</div><div>- schedule send interest operation, not invoke it directly</div><div><br></div><div>--</div><div>Alex</div><span class=""><br><blockquote type="cite"><div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:tahoma,sans-serif"><div><br></div><div>I'm getting:<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Command ['.../ns-3/build/scratch/simpl<wbr>e-custom-app'] terminated with signal SIGSEGV. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").<br></blockquote><div><br></div><div>which buy following gdb(insight) I end up :<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">BOOST_ASSERT_MSG(!m_isExecutin<wbr>g, "cannot emit signal from a handler");</blockquote><div><br> It is from:<br><a href="https://github.com/named-data-ndnSIM/ndn-cxx/blob/master/src/util/signal-signal.hpp:224" target="_blank">https://github.com/named-data-<wbr>ndnSIM/ndn-cxx/blob/master/src<wbr>/util/signal-signal.hpp:224</a><br></div><div>Branch: ndn-cxx.0.3.4-ndnSIM<br><br></div><div>I have tested app1ptr with some sample doing-nothing-but-LOG member function and it worked.<br><br></div><div>I appreciate it if you could help me on what is wrong.<br><br></div><div>Thanks,<br></div><div>Sabet<br></div></div> <br></div></div><div><div data-smartmail="gmail_signature"><div dir="ltr"><br></div></div></div>
</div>
<br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/m<wbr>ailman/listinfo/ndnsim</a><br>
<br></blockquote></div></div>
______________________________<wbr>_________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndnsim</a><br></div></blockquote></span></div><br></div></blockquote></div><br></div></div>