senf::ppi::connector::ActiveConnector Class Reference

Active connector base-class. More...

#include <senf/PPI/Connectors.hh>

Inheritance diagram for senf::ppi::connector::ActiveConnector:

Public Member Functions

 ~ActiveConnector ()
 
template<class Handler >
void onThrottle (Handler handler)
 Register throttle notification handler. More...
 
void onThrottle ()
 Clear throttle notification handler. More...
 
template<class Handler >
void onUnthrottle (Handler handler)
 Register unthrottle notification handler. More...
 
void onUnthrottle ()
 Clear unthrottle notification handler. More...
 
bool throttled () const
 true, if peer() is throttled More...
 
PassiveConnectorpeer () 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
 

Protected Member Functions

 ActiveConnector ()
 
virtual void v_disconnected ()
 
virtual void v_connected ()
 
- 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 ()
 

Additional Inherited Members

- Public Types inherited from senf::ppi::connector::Connector
enum  TraceState { NO_TRACING, TRACE_IDS, TRACE_CONTENTS }
 
- Static Public Member Functions inherited from senf::ppi::connector::Connector
static void staticTracingState (TraceState state)
 
static void tracingFilter (std::string const &traceFilter)
 

Detailed Description

Active connector base-class.

An active connector is a connector which emits I/O requests. Active connectors receive throttling notifications. Depending on the type of connector (input or output) the respective throttling is called forward or backward throttling.

Active connectors do not handle any throttling state, they just receive the notifications. These notifications should then either be processed by the module or be forwarded to other connectors.

Definition at line 309 of file Connectors.hh.

Constructor & Destructor Documentation

◆ ~ActiveConnector()

senf::ppi::connector::ActiveConnector::~ActiveConnector ( )

Definition at line 338 of file Connectors.cc.

◆ ActiveConnector()

senf::ppi::connector::ActiveConnector::ActiveConnector ( )
protected

Member Function Documentation

◆ onThrottle() [1/2]

template<class Handler >
void senf::ppi::connector::ActiveConnector::onThrottle ( Handler  handler)

Register throttle notification handler.

The handler register here will be called, whenever a throttle notification comes in. The handler argument is either an arbitrary callable object or it is a pointer-to-member to a member of the class which holds this input. In the second case, the pointer will automatically be bound to the containing instance.

Parameters
[in]handlerHandler to call on throttle notifications.

◆ onThrottle() [2/2]

void senf::ppi::connector::ActiveConnector::onThrottle ( )

Clear throttle notification handler.

◆ onUnthrottle() [1/2]

template<class Handler >
void senf::ppi::connector::ActiveConnector::onUnthrottle ( Handler  handler)

Register unthrottle notification handler.

The handler register here will be called, whenever an unthrottle notification comes in. The handler argument is either an arbitrary callable object or it is a pointer-to-member to a member of the class which holds this input. In the second case, the pointer will automatically be bound to the containing instance.

Parameters
[in]handlerHandler to call on unthrottle notifications.

◆ onUnthrottle() [2/2]

void senf::ppi::connector::ActiveConnector::onUnthrottle ( )

Clear unthrottle notification handler.

◆ peer()

PassiveConnector& senf::ppi::connector::ActiveConnector::peer ( ) const

◆ throttled()

bool senf::ppi::connector::ActiveConnector::throttled ( ) const

true, if peer() is throttled

◆ v_connected()

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

◆ v_disconnected()

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

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