<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Yifeng,</div><div><br></div><div>Yes. The default limit (as specified in model/fw/per-out-face-limits.h) is ns3::ndn::Limits::Window (utils/ndn-limits-window.h|cc).</div><div><br></div><div>And another yes, as I tried to emphasize in doxygen documentation (<a href="http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_limits_window.html#a6b7b961168019a655db8c3b5664e51b6">http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_limits_window.html#a6b7b961168019a655db8c3b5664e51b6</a>), interpretation of values used by (Get|Set)CurrentLimit is implementation-specific.  In window case, the value is the window.</div><div><br></div><div>Sincerely,</div><div>Alex</div><div><br></div><div>ps</div><div>Would you mind keeping mailing list in CC?  Thanks.</div><div><br></div><div><div>On Feb 26, 2013, at 10:35 AM, Yifeng Li <<a href="mailto:yifengl@email.arizona.edu">yifengl@email.arizona.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello Alex,<br><br>Thanks for your help. Just to clarify some things on limits, the default is windows, which is the implementation in ndn-limits-window.cc under utils? So if I do something like: Ptr<Limits> faceLimits = inFace->GetObject<Limits> ();<br>
faceLimtis->GetCurrentLimit();<br><br>it would be a window size rather than a rate right?<br><br>Thanks for your help,<br>Yifeng<br><br><br><br><div class="gmail_quote">
On Wed, Feb 20, 2013 at 10:40 AM, Alex Afanasyev <span dir="ltr"><<a href="mailto:alexander.afanasyev@ucla.edu" target="_blank">alexander.afanasyev@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"><div>Hi Yifeng,</div><div><br></div><div>PerOutFaceLimits is a templated class and you can define (almost) any Parent class that PerOutFaceLimits is extending.  Examples of these are in model/fw/per-out-face-limits.cc file: </div>

<div><br></div><div><div>template class PerOutFaceLimits<BestRoute>;</div><div>typedef PerOutFaceLimits<BestRoute> PerOutFaceLimitsBestRoute;</div><div>NS_OBJECT_ENSURE_REGISTERED (PerOutFaceLimitsBestRoute);</div>

</div><div><br></div><div><br></div><div>If you want to extend the limits class, you have several options.  You can do it in a templated way:</div><div><br></div><div>template<class Parent></div><div>class Extension : public PerOutFaceLimits<Parent></div>

<div>...</div><div><br></div><div>or you if you know what is the base strategy you want to use with limiting, you can just specialize your extension:</div><div><br></div><div>class Extension : public PerOutFaceLimits<BestRoute></div>

<div>...</div><div><br></div><div><br></div><div>If the parent class that you're using is inherited from Nacks class (most of the strategies do: <a href="http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_forwarding_strategy.html" target="_blank">http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_forwarding_strategy.html</a>), then you can directly override any method defined in Nacks class in your extension.   That is, in one extension class you can combine modifications for limits and nacks.</div>

<div><br></div><div>---</div><div>Alex</div><br><div><div>On Feb 20, 2013, at 6:19 AM, Yifeng Li <<a href="mailto:yifengl@email.arizona.edu" target="_blank">yifengl@email.arizona.edu</a>> wrote:</div><br><blockquote type="cite">

Hello Alex,<br><br>I noticed per-out-face-limits extend Parent, where is Parent defined? I also, if I extend per out face limits, do I also have to extend Nacks as well? There seems to be inheritance conflicts if I extend both.<br>


<br>Thanks for your help,<br>Yifeng<br></blockquote></div><br></div></blockquote></div><br>
</blockquote></div><br></body></html>