<div dir="ltr">Hi Vince,<div><br></div><div>For now, I have replaced the EventId in NLSR with that of used in ndnSIM. I am able to continue with this for now, and shall look into more generic solution as you mentioned later. Will keep a note of it. </div><div><br></div><div>After this, I could see the events getting scheduled in the debug logs. </div><div><br></div><div>/anil.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 26, 2015 at 8:30 AM, Vince Lehman (vslehman) <span dir="ltr"><<a href="mailto:vslehman@memphis.edu" target="_blank">vslehman@memphis.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">
Hi Anil,
<div><br>
</div>
<div>I don’t have any experience with ndnSim, but it looks like NFD uses a wrapper around the ndnSim scheduler. One option would be making a generic interface for the scheduler in NLSR that can be used in both the real NLSR implementation as well as
 the ndnSim version. The implementation file for the scheduler can then differ between the versions; the simulator version uses the ns3 scheduler and the real version uses the ndn-cxx scheduler.<br>
<div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;direction:ltr">
<br>
--</div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;direction:ltr">
Vince Lehman</div>
</div>
</div>
</div><div><div class="h5">
<br>
<div>
<blockquote type="cite">
<div>On May 25, 2015, at 1:05 AM, Anil Jangam <<a href="mailto:anilj.mailing@gmail.com" target="_blank">anilj.mailing@gmail.com</a>> wrote:</div>
<br>
<div>
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>I am facing an incompatibility between the EventId used by scheduler in ndnSIM and EventId used by scheduler in NLSR. </div>
<div><br>
</div>
<div>The background to this problem is as follows:</div>
<div>
<ul>
<li>I am porting NLSR to the ndnSIM and trying to replace the NLSR specific event scheduler with that of ndnSIM event scheduler. <br>
</li><li>ndnSIM provides a single scheduler interface so that all the event generated by the ndn application can be put into the event queue for processing.<br>
</li><li>Now, there is a difference between the EventId in simulator and the one used in NLSR<br>
</li></ul>
</div>
<div><span style="white-space:pre-wrap"></span>NLSR EventID implementation is: </div>
<div><br>
</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div><span style="white-space:pre-wrap"></span>namespace ndn {</div>
<div><span style="white-space:pre-wrap"></span>namespace util {</div>
<div><span style="white-space:pre-wrap"></span>namespace scheduler {</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>struct EventIdImpl;</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>typedef shared_ptr<EventIdImpl> EventId;</div>
<div><span style="white-space:pre-wrap"></span></div>
<div><span style="white-space:pre-wrap"></span>} // scheduler</div>
<div><span style="white-space:pre-wrap"></span>} // util</div>
<div><span style="white-space:pre-wrap"></span>} // ndn</div>
</blockquote>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>ndnSIM EventId implementation is:</div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div><span style="white-space:pre-wrap"></span>namespace ns3 {</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>class EventImpl;</div>
<div><br>
</div>
<div><span style="white-space:pre-wrap"></span>class EventId {</div>
<div><span style="white-space:pre-wrap"></span>}</div>
<div><span style="white-space:pre-wrap"></span>} // ns3</div>
</blockquote>
<div><br>
</div>
<div>Using the scheduler in ndnSIM to replace the scheduler in NLSR, perhaps may not be a correct approach. Or perhaps it is the right approach, and we might have to change NLSR code. I am not able to decide. </div>
<div><br>
</div>
<div>Right now, I am getting the following compile error: </div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div>nlsr/lsdb.cpp:80:9: error: could not convert ‘event’ from ‘ns3::EventId’ to ‘ndn::util::scheduler::EventId {aka std::shared_ptr<ndn::util::scheduler::EventIdImpl>}’</div>
</blockquote>
<div><br>
</div>
<div>Assuming the change is correct, and both the EventId implementations are different from other, appears to be large impact on the NLSR code. </div>
<div><br>
</div>
<div>Can you provide your comments on this and what is the correct approach?</div>
<div><br>
</div>
<div>/anil.</div>
<div><br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div></div></div>
</div>

</blockquote></div><br></div>