senf::ppi::ThresholdThrottling Class Reference

Simple throttling discipline with high and low threshold. More...

#include <senf/PPI/Throttling.hh>

Inheritance diagram for senf::ppi::ThresholdThrottling:

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 }
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ThresholdThrottling()

senf::ppi::ThresholdThrottling::ThresholdThrottling ( unsigned  high,
unsigned  low 
)

Member Function Documentation

◆ update()

void senf::ppi::ThresholdThrottling::update ( connector::GenericPassiveInput input,
Event  event 
)
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.

Parameters
[in]inputConnector holding the queue
[in]eventType of event triggering the update

Implements senf::ppi::ThrottlingDiscipline.

Definition at line 28 of file Throttling.cc.


The documentation for this class was generated from the following files: