<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;"><div>Hi Isuru,</div><div><br></div><div>Are you running simulation in the visualizer?  Try to run without it and in debug mode (in case you have compiled with ./waf configure -d optimized, re-compile with ./waf configure -d debug or just ./waf configure).</div><div><br></div><div>The variable declaration seems right.  The problem that I could think of is that you're trying to use it in application's constructor, when neither Node() nor strategy objects are not yet set.</div><div><br></div><div>Btw. What the effect you're trying to achieve?  Normally (in "real world") applications cannot directly communicate with the forwarding daemon.  Or is it something that is simulation-specific?</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Dec 16, 2013, at 11:43 AM, <<a href="mailto:i.liyanage@surrey.ac.uk">i.liyanage@surrey.ac.uk</a>> <<a href="mailto:i.liyanage@surrey.ac.uk">i.liyanage@surrey.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" fpstyle="1" aria-label="Message body" tabindex="0" style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; margin: 0px;"><div style="margin-top: 0px; margin-bottom: 0px;">Hi Alex,</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">It terminates without anything once I click the simulate button. </div><div style="margin-top: 0px; margin-bottom: 0px;">I will try with the debugger as well.</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">Could you suggest me a way to declare this kind of variable which could be accessed in both forwadingStrategy class and in an application.</div><div style="margin-top: 0px; margin-bottom: 0px;"><br></div><div style="margin-top: 0px; margin-bottom: 0px;">Many Thanks,</div><div style="margin-top: 0px; margin-bottom: 0px;">Isuru</div><div style="color: rgb(40, 40, 40);"><hr tabindex="-1" style="display: inline-block; width: 747px;"><div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt;"><b>From:</b><span class="Apple-converted-space"> </span>Alexander Afanasyev <<a href="mailto:cawka1@gmail.com">cawka1@gmail.com</a>> on behalf of Alex Afanasyev <<a href="mailto:alexander.afanasyev@ucla.edu">alexander.afanasyev@ucla.edu</a>><br><b>Sent:</b><span class="Apple-converted-space"> </span>16 December 2013 19:26<br><b>To:</b><span class="Apple-converted-space"> </span>Liyanage IU Mr (PG/R - Electronic Eng)<br><b>Cc:</b><span class="Apple-converted-space"> </span>ndnsim<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [ndnSIM] declaring a variable in ndn-forwarding-strategy</font><div> </div></div><div><div>Is it just terminates without any output or terminates with an error?</div><div><br></div><div>If it is an error, then try to run in a debugger, so you can see what exactly is causing the error.  For example,</div><div><br></div><div>./waf --run <scenario> --command-template 'gdb --args %s'</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Dec 15, 2013, at 10:17 AM, <<a href="mailto:i.liyanage@surrey.ac.uk">i.liyanage@surrey.ac.uk</a>> <<a href="mailto:i.liyanage@surrey.ac.uk">i.liyanage@surrey.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" tabindex="0" style="font-family: Menlo-Regular; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"><div name="divtagdefaultwrapper" id="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; margin: 0px;">Hi,<div><br></div><div>In ndn-forwading-strategy.h, I declared variable.</div><div><font color="#808080">std::set<Name>  m_allowCS;</font></div><div><br></div><div>and tried to access in one of the applications by following code</div><div><div><font color="#808080">Ptr<ForwardingStrategy> forwardingstat = GetNode()->GetObject<ForwardingStrategy>();</font></div><div><font color="#808080">Ptr<Name> inName = Create<ndn::Name> ("/prefix");</font></div><div><font color="#808080">forwardingstat->m_allowCS.insert(*inName);</font></div></div><div><br></div><div>This compiles fine.</div><div>but once I run this, simulator exit without any output. Could you point out what's wrong.</div><div><br></div><div>Many Thanks,</div><div>Isuru</div></div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div></blockquote></div><br></div></div></div>_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a></div></blockquote></div><br></body></html>