Generating Tokens Periodically ============================== The :ned:`TimeBasedTokenGenerator` generates tokens periodically into a token-based server, with a configurable generation interval. In this step, packets are generated by a passive packet source (:ned:`PassivePacketSource`). A :ned:`TokenBasedServer` pops packets from the connected packet source when it has enough tokens, and pushes them onto a passive packet sink (:ned:`PassivePacketSink`). Tokens are generated at random intervals by a :ned:`TimeBasedTokenGenerator`. .. figure:: media/TimeBasedTokenGenerator.png :width: 80% :align: center .. literalinclude:: ../QueueingTutorial.ned :start-at: network TimeBasedTokenGeneratorTutorialStep :end-before: //---- :language: ned .. literalinclude:: ../omnetpp.ini :start-at: Config TimeBasedTokenGenerator :end-at: tokenConsumptionPerPacket :language: ini