[ndnSIM] Per-interface strategies in ndnSIM
Spyridon (Spyros) Mastorakis
spiros.mastorakis at gmail.com
Sat Dec 6 23:09:50 PST 2014
Hello Amin,
About the question #1:
Yes, using the particular forwarding strategy, the rate limits will be assigned per outgoing face.
About your question #2:
In general, you have to call periodically the UpdateCurrentLimit method of the LimitsRate class that accepts a double variable as an argument. This double variable will be the new limit value.
However, keep in mind that he existing implementation of the limits takes into account two double variables and multiply them (assuming that the first one is the delay and the second one is the rate).
If you want to have an equation with fundamentally different rationale than having two double variables and just multiple them to compute the limit, then you have to create your own limit class and inherit the Limit class of the ndn-limits file. You will also have to create more methods in order to customize the rate computation in the way that you want (e.g. if you want to have more than two or different parameters). Generally, you can take a look at the ndn-limits, ndn-limits-rate and ndn-limits-window files and see if they are ok for you.
Hope that this helps,
Spyros
> On Dec 6, 2014, at 12:28 PM, amin1431 <amin1431 at yahoo.com> wrote:
>
> Hi Spyros :-)
> Thank you for your response. I tried my best for better understanding of classes.
>
> I have two questions:
>
> 1- If we use the below Forwarding Strategy with the Interest limit, the rate will be assigned per-interface?
> ndnHelper.SetForwardingStrategy ("ns3::ndn::fw::Flooding::PerOutFaceLimits"
> "Limit", "ns3::ndn::Limits::Rate");
> ...
> ndnHelper.Install (nodes);
>
> 2- In the above code, we can assign the Interest Rate Limit. I want to assign a new formula to change periodically the Interest Rate Limit. The initial idea is in: http://ndnsim.net/fw.html#strategies-with-interest-limits <http://ndnsim.net/fw.html#strategies-with-interest-limits> . Where is it possible to write a new Interest Limit? Can we define it in the main function (in *.cc) as a global variable? Could you please give me an hint?
>
>
> I will be thankful if you or anyone can guide me in these questions.
>
>
> Regards,
> Amin
>
>
>
> -------- Original Message --------
> Subject: Re: [ndnSIM] Per-interface strategies in ndnSIM
> Date: Sat, 15 Nov 2014 10:58:54 -0800
> From: Spyridon (Spyros) Mastorakis <spiros.mastorakis at gmail.com>
> To: amin1431 <amin1431 at yahoo.com>
> CC: Ndnsim <ndnsim at lists.cs.ucla.edu>
>
>
> Hello Amin,
>
> I will answer your question, based on the best of my knowledge in ndnSIM. Alex can complement my answer if anything is misleading or incomplete.
>
> There is a template class PerOutFaceLimits that I think it would be helpful. You can write a specialization of this template to apply it to your forwarding strategy. Moreover, each forwarding strategy uses a convention about green, yellow and red faces. There is a number of forwarding strategies implemented, but you can also create your own custom forwarding strategy based on the already implemented strategies.
>
> Follow the first link to take a look at the PerOutFaceLimits template class and the second link for the forwarding strategies (with and without limits): http://ndnsim.net/doxygen/classns3_1_1ndn_1_1fw_1_1_per_out_face_limits.html#a3ea8ba5325d54412c5894e02fb519839 <http://ndnsim.net/doxygen/classns3_1_1ndn_1_1fw_1_1_per_out_face_limits.html#a3ea8ba5325d54412c5894e02fb519839>
> http://ndnsim.net/fw.html <http://ndnsim.net/fw.html>
>
> If you eventually use the limits, do not forget to enable them first at your simulation scenario (there are some examples at the second aforementioned link).
>
> Let me know if you need anything else.
> Kind regards,
> Spyros Mastorakis
>
>> On Nov 14, 2014, at 11:54 AM, amin1431 <amin1431 at yahoo.com <mailto:amin1431 at yahoo.com>> wrote:
>>
>> Hi Alex,
>>
>> Could you please tell me in which section of the ndnSIM classes/functions we can do some strategy per-interface?
>> Is there any assigned class for that? for instance, change the rate of InInterest or add a value into data packet per interface not for all incoming data packets.
>>
>>
>> Thanks a lot for your all support.
>>
>> /Amin
>>
>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu <mailto:ndnSIM at lists.cs.ucla.edu>
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
>
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20141206/1b62aaff/attachment.html>
More information about the ndnSIM
mailing list