Passive connector base-class. More...
#include <senf/PPI/Connectors.hh>
Public Member Functions | |
~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... | |
ActiveConnector & | 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 | |
PassiveConnector () | |
void | emit () |
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) |
Passive connector base-class.
A passive connector is a connector which is activated externally whenever an I/O request occurs. Passive connectors are the origin of throttling notifications. Depending on the type of connector (output or input) the respective throttling is called forward or backward throttling.
Passive connectors always handle two throttling states:
The accumulative throttling state is generated by combining all sub-states.
Definition at line 231 of file Connectors.hh.
senf::ppi::connector::PassiveConnector::~PassiveConnector | ( | ) |
Definition at line 272 of file Connectors.cc.
|
protected |
Definition at line 265 of file Connectors.cc.
|
protected |
bool senf::ppi::connector::PassiveConnector::nativeThrottled | ( | ) | const |
Get native throttling state.
void senf::ppi::connector::PassiveConnector::onRequest | ( | Handler | handler | ) |
Register I/O event handler.
The registered handler will be called, whenever packets arrive or should be generated by the module depending on the connector type (input or output). 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, whenever an I/O operation is to be performed. |
ActiveConnector& senf::ppi::connector::PassiveConnector::peer | ( | ) | const |
void senf::ppi::connector::PassiveConnector::throttle | ( | ) |
Set native throttling.
bool senf::ppi::connector::PassiveConnector::throttled | ( | ) | const |
Get accumulative throttling state.
void senf::ppi::connector::PassiveConnector::unthrottle | ( | ) |
Revoke native throttling.
|
protectedvirtual |
Reimplemented from senf::ppi::connector::Connector.
Reimplemented in senf::ppi::connector::GenericPassiveOutput, and senf::ppi::connector::GenericPassiveInput.
Definition at line 284 of file Connectors.cc.
|
protectedvirtual |
Reimplemented from senf::ppi::connector::Connector.
Reimplemented in senf::ppi::connector::GenericPassiveOutput, and senf::ppi::connector::GenericPassiveInput.
Definition at line 278 of file Connectors.cc.