Active connector base-class. More...
#include <senf/PPI/Connectors.hh>
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... | |
PassiveConnector & | peer () const |
Public Member Functions inherited from senf::ppi::connector::Connector | |
Connector & | peer () const |
Get peer connected to this connector. More... | |
module::Module & | module () 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::DirectoryNode & | consoleDir () 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) |
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.
senf::ppi::connector::ActiveConnector::~ActiveConnector | ( | ) |
Definition at line 338 of file Connectors.cc.
|
protected |
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.
[in] | handler | Handler to call on throttle notifications. |
void senf::ppi::connector::ActiveConnector::onThrottle | ( | ) |
Clear throttle notification 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.
[in] | handler | Handler to call on unthrottle notifications. |
void senf::ppi::connector::ActiveConnector::onUnthrottle | ( | ) |
Clear unthrottle notification handler.
PassiveConnector& senf::ppi::connector::ActiveConnector::peer | ( | ) | const |
bool senf::ppi::connector::ActiveConnector::throttled | ( | ) | const |
true
, if peer() is throttled
|
protectedvirtual |
Reimplemented from senf::ppi::connector::Connector.
Reimplemented in senf::ppi::connector::GenericActiveOutput, and senf::ppi::connector::GenericActiveInput.
Definition at line 350 of file Connectors.cc.
|
protectedvirtual |
Reimplemented from senf::ppi::connector::Connector.
Reimplemented in senf::ppi::connector::GenericActiveOutput, and senf::ppi::connector::GenericActiveInput.
Definition at line 344 of file Connectors.cc.