Simple throttling discipline with high and low threshold. More...
#include <senf/PPI/Throttling.hh>
Public Member Functions | |
ThresholdThrottling (unsigned high, unsigned low) | |
virtual void | update (connector::GenericPassiveInput &input, Event event) |
Calculate new throttling state. More... | |
Public Member Functions inherited from senf::ppi::ThrottlingDiscipline | |
virtual | ~ThrottlingDiscipline () |
Additional Inherited Members | |
Public Types inherited from senf::ppi::ThrottlingDiscipline | |
enum | Event { ENQUEUE, DEQUEUE } |
enum | None_t { NONE } |
Simple throttling discipline with high and low threshold.
The ThresholdThrottling ThrottlingDiscipline is a simple throttling discipline which throttles the input as soon the number of packets in the queue reaches the high threshold. The input will be unthrottled when the number of packets drops to the low threshold.
The default throttling discipline is ThresholdThrottling(1,0).
Definition at line 73 of file Throttling.hh.
senf::ppi::ThresholdThrottling::ThresholdThrottling | ( | unsigned | high, |
unsigned | low | ||
) |
|
virtual |
Calculate new throttling state.
Whenever the queue is manipulated, this member is called to calculate the new throttling state. The member must call input's throttle()
or unthrottle()
member to set the new throttling state.
[in] | input | Connector holding the queue |
[in] | event | Type of event triggering the update |
Implements senf::ppi::ThrottlingDiscipline.
Definition at line 28 of file Throttling.cc.