senf::ppi::ThrottlingDiscipline Class Referenceabstract

Throttling discipline base class. More...

#include <senf/PPI/Throttling.hh>

Inheritance diagram for senf::ppi::ThrottlingDiscipline:

Public Types

enum  Event { ENQUEUE, DEQUEUE }
 
enum  None_t { NONE }
 

Public Member Functions

virtual ~ThrottlingDiscipline ()
 
virtual void update (connector::GenericPassiveInput &input, Event event)=0
 Calculate new throttling state. More...
 

Detailed Description

Throttling discipline base class.

ThrottlingDiscipline derived classes define the generation of throttling notifications. The ThrottlingDiscipline is called whenever the packets are entered or removed from the queue. The throttling discipline then determines the new throttling state of the queue.

Note
The ThrottlingDiscipline will never drop packets explicitly. This is left to the operating system by sending throttling events. The PPI will never loose a packet internally (if not a module explicitly does so), however it may disable reception of new incoming packets which will then probably be dropped by the operating system.
Attention
Notifications may be forwarded to the ThrottlingDiscipline implementation out-of-order: A dequeue event may be notified before the corresponding enqueue event (this happens to optimize away transient throttling state changes which would otherwise occur if a packet is entered into the queue and then removed from it in the same processing step).

Definition at line 46 of file Throttling.hh.

Member Enumeration Documentation

◆ Event

Enumerator
ENQUEUE 
DEQUEUE 

Definition at line 51 of file Throttling.hh.

◆ None_t

Enumerator
NONE 

Definition at line 52 of file Throttling.hh.

Constructor & Destructor Documentation

◆ ~ThrottlingDiscipline()

virtual senf::ppi::ThrottlingDiscipline::~ThrottlingDiscipline ( )
virtual

Member Function Documentation

◆ update()

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

Implemented in senf::ppi::ThresholdThrottling.


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