[ndnSIM] How can I periodically update the number of token buckets?

Spyridon (Spyros) Mastorakis mastorakis at cs.ucla.edu
Mon Jul 16 08:59:24 PDT 2018


Hi,

you can create a method, which you will call once at the beginning of your simulation (or schedule an event to be executed later in the simulation). Then, in the main body of your method, you should schedule another event to be executed after a time interval equal to the period that you would like to use.

Please take a look at the Simulator::Schedule method for further details:

https://www.nsnam.org/doxygen/classns3_1_1_simulator.html#a81c1ade622b5266d81908b2a99a330d2

Thanks,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA

> On Jul 14, 2018, at 10:55 PM, Ming <mingdeyou at 126.com> wrote:
> 
> Hello everyone,
> Recently, I am writing an algorithm about token buckets. But I have some problems. I want to be able to periodically update the number of tokens in per node. I don't know how to insert the periodically function  into the program.
> 
> Can anyone help me solve this problem?Thanks in advance!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180716/616a29ec/attachment.html>


More information about the ndnSIM mailing list