X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=PPI%2FMonitorModule.hh;h=74e7600e0cc1f4a3d3a393fc4940fbf417827b78;hb=a1fdb7bb122f0b05be809a922d4b7ef5e125fa67;hp=d9ca8ae3b426e1abe32735bc113ff7e6a1a14269;hpb=bf762ee0cef226cad371646bfdec8b286866d84c;p=senf.git diff --git a/PPI/MonitorModule.hh b/PPI/MonitorModule.hh index d9ca8ae..74e7600 100644 --- a/PPI/MonitorModule.hh +++ b/PPI/MonitorModule.hh @@ -37,16 +37,17 @@ namespace senf { namespace ppi { namespace module { - /** \brief Base class providing simple monitor module support + /** \brief Base class providing simple monitor %module support - A monitor module is a module which needs information about traversing packets but does not - really act on the packets. Because of this, it is \e optional to connect the output: If the - output is not connected, the packets will be silently dropped. + A monitor %module is a \ref senf::ppi::module::Module "module" which needs information + about traversing packets but does not really act on the packets. Because of this, it is + \e optional to connect the output: If the output is not connected, the packets will be + silently dropped. This allows to add monitor modules either into an existing chain or add them using an ActiveDuplicator. - To write a monitor module, derive from senf::ppi::module::MonitorModule instead of + To write a monitor %module, derive from senf::ppi::module::MonitorModule instead of senf::ppi::module and implement v_handlePacket(): \code @@ -55,7 +56,7 @@ namespace module { { SENF_PPI_MODULE(CountPackets); public: - SomeMonitor() : counter_ (0u) {} + CountPackets() : counter_ (0u) {} private: virtual void v_handlePacket(Packet const & p) @@ -66,7 +67,7 @@ namespace module { \endcode You may of course add events (or even further connectors besides \c input and \c output - provided by MonitorModule) to the module. + provided by MonitorModule) to the %module. \tparam PacketType type of packet expected on input and sent on output. This is also the type of the v_handlePacket() argument.