senf::ppi::connector::GenericPassiveInput Class Reference

Combination of PassiveConnector and InputConnector. More...

#include <senf/PPI/Connectors.hh>

Inherits senf::ppi::connector::PassiveConnector, senf::ppi::connector::InputConnector, and senf::safe_bool< GenericPassiveInput >.

Inherited by senf::ppi::connector::PassiveInput< EthernetPacket >, senf::ppi::connector::PassiveInput< Packet >, senf::ppi::connector::PassiveInput< RadiotapPacket >, senf::ppi::connector::PassiveInput< senf::EthernetPacket >, senf::ppi::connector::PassiveInput< senf::RadiotapPacket >, senf::ppi::connector::PassiveInput< typename Writer::PacketType >, and senf::ppi::connector::PassiveInput< PacketType >.

Public Member Functions

GenericActiveOutputpeer () const
 
bool boolean_test () const
 true, if ! empty() More...
 
template<class ThrottlingDisc >
void throttlingDisc (ThrottlingDisc const &disc)
 Change the throttling discipline. More...
 
void throttlingDisc (ThrottlingDiscipline::None_t)
 Disable throttling discipline. More...
 
- Public Member Functions inherited from senf::ppi::connector::PassiveConnector
 ~PassiveConnector ()
 
template<class Handler >
void onRequest (Handler handler)
 Register I/O event handler. More...
 
bool throttled () const
 Get accumulative throttling state. More...
 
bool nativeThrottled () const
 Get native throttling state. More...
 
void throttle ()
 Set native throttling. More...
 
void unthrottle ()
 Revoke native throttling. More...
 
ActiveConnectorpeer () const
 
- Public Member Functions inherited from senf::ppi::connector::Connector
Connectorpeer () const
 Get peer connected to this connector. More...
 
module::Modulemodule () const
 Get this connectors containing module. More...
 
bool connected () const
 true, if connector connected, false otherwise More...
 
void disconnect ()
 Disconnect connector from peer. More...
 
console::DirectoryNodeconsoleDir () const
 
void tracingState (TraceState state)
 
TraceState tracingState () const
 
- Public Member Functions inherited from senf::ppi::connector::InputConnector
Packet const & operator() ()
 Get a packet. More...
 
Packet const & read ()
 Alias for operator()() More...
 
OutputConnectorpeer () const
 
size_type queueSize () const
 Return number of elements in the queue. More...
 
bool empty () const
 Return queueSize() == 0. More...
 
- Public Member Functions inherited from senf::comparable_safe_bool< class >
 operator bool_type () const
 
bool operator! () const
 

Protected Member Functions

 GenericPassiveInput ()
 
virtual void v_disconnected ()
 
virtual void v_connected ()
 
- Protected Member Functions inherited from senf::ppi::connector::PassiveConnector
 PassiveConnector ()
 
void emit ()
 
- Protected Member Functions inherited from senf::ppi::connector::Connector
 Connector ()
 
virtual ~Connector ()
 
void connect (Connector &target)
 
void trace (Packet const &p, char const *label)
 
void throttleTrace (char const *label, char const *type)
 
void unregisterConnector ()
 
- Protected Member Functions inherited from senf::ppi::connector::InputConnector
 InputConnector ()
 
- Protected Member Functions inherited from senf::comparable_safe_bool< class >
 ~comparable_safe_bool ()
 
- Protected Member Functions inherited from senf::safe_bool_base
void this_type_does_not_support_comparisons () const
 
 safe_bool_base ()
 
 safe_bool_base (const safe_bool_base &)
 
safe_bool_baseoperator= (const safe_bool_base &)
 
 ~safe_bool_base ()
 

Additional Inherited Members

- Public Types inherited from senf::ppi::connector::Connector
enum  TraceState { NO_TRACING, TRACE_IDS, TRACE_CONTENTS }
 
- Public Types inherited from senf::ppi::connector::InputConnector
typedef Queue::const_iterator queue_iterator
 Iterator type of the embedded queue. More...
 
typedef Queue::size_type size_type
 Unsigned type for counting queue elements. More...
 
- Static Public Member Functions inherited from senf::ppi::connector::Connector
static void staticTracingState (TraceState state)
 
static void tracingFilter (std::string const &traceFilter)
 
- Protected Types inherited from senf::safe_bool_base
typedef void(safe_bool_base::* bool_type) () const
 

Detailed Description

Combination of PassiveConnector and InputConnector.

The GenericPassiveInput automatically controls the connectors throttling state using a queueing discipline. The standard queueing discipline is ThresholdThrottling, which throttles the connection whenever the queue length reaches the high threshold and unthrottles the connection when the queue reaches the low threshold. The default queueing discipline is ThresholdThrottling(1,0) which will throttle the input whenever the queue is non-empty.

Definition at line 478 of file Connectors.hh.

Constructor & Destructor Documentation

◆ GenericPassiveInput()

senf::ppi::connector::GenericPassiveInput::GenericPassiveInput ( )
protected

Member Function Documentation

◆ boolean_test()

bool senf::ppi::connector::GenericPassiveInput::boolean_test ( ) const

true, if ! empty()

◆ peer()

GenericActiveOutput& senf::ppi::connector::GenericPassiveInput::peer ( ) const

◆ throttlingDisc() [1/2]

template<class ThrottlingDisc >
void senf::ppi::connector::GenericPassiveInput::throttlingDisc ( ThrottlingDisc const &  disc)

Change the throttling discipline.

The throttling discipline is a class which provides the ThrottlingDiscipline interface.

Parameters
[in]discNew throttling discipline

◆ throttlingDisc() [2/2]

void senf::ppi::connector::GenericPassiveInput::throttlingDisc ( ThrottlingDiscipline::None_t  )

Disable throttling discipline.

Definition at line 516 of file Connectors.cc.

◆ v_connected()

void senf::ppi::connector::GenericPassiveInput::v_connected ( )
protectedvirtual

Reimplemented from senf::ppi::connector::PassiveConnector.

Definition at line 493 of file Connectors.cc.

◆ v_disconnected()

void senf::ppi::connector::GenericPassiveInput::v_disconnected ( )
protectedvirtual

Reimplemented from senf::ppi::connector::PassiveConnector.

Definition at line 486 of file Connectors.cc.


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