X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FSetup.hh;h=ae9c743722ec32f8a5f3907cb1f16b82649c9e6b;hb=9bfe0b87be0926193b5baf13865cf045f0de0b0d;hp=cadee67d21e508b71ef665a11e874890dc8ba7cf;hpb=69535909437d04c0df8f95bfb242db4f36fda12d;p=senf.git diff --git a/PPI/Setup.hh b/PPI/Setup.hh index cadee67..ae9c743 100644 --- a/PPI/Setup.hh +++ b/PPI/Setup.hh @@ -59,12 +59,48 @@ namespace ppi { #else - template - void connect(Source & source, Target & target); + /** \brief Connect modules + + senf::ppi::connect() establishes a connection between two modules or, to be more precise, + between two connectors. It will connect any input to any output connector as long as one is + active and the other passive. + + If a module has an output connector called \c output, the module may be directly specified + as \a source argument. In the same way, if a module has an input connector called \c input, + the module may be given directly as \a target argument. This simplifies the most common case + of a module with one input and one output connector. + + \see \ref ppi_connections + */ + void connect(connector::ActiveInput & source, connector::PassiveOutput & target); + + /** \brief Connect modules + \see connect() */ + void connect(connector::PassiveInput & source, connector::ActiveOutput & target); #endif + + /** \brief Start the network + Calling senf::ppi::run() will start processing the network. The main event loop is managed + by the Scheduler. Before starting the Scheduler main loop, all Module init() members are + called. + + senf::ppi::run() will return when no more work is to be done, that is when no events are + enabled (Since the events are enabled and disabled by the throttle notifications which + depend among other things on the packet queues, this is the same as checking for packets in + any queue). It is Ok to call senf::ppi::run() multiple times during the program lifetime. + + \see \ref ppi_run + */ void run(); + + /** \brief Manually initialize the network + + For debugging purposes, it is sometimes simpler to not use senf::ppi::run() but instead + drive the network via explicit calls using the debug modules. However, it is still necessary + to initialize the network. This operation is performed by senf::ppi::init(). + */ void init(); }}