Base class providing simple monitor module support. More...
#include <senf/PPI/MonitorModule.hh>
Public Attributes | |
senf::ppi::connector::PassiveInput< PacketType > | input |
senf::ppi::connector::ActiveOutput< PacketType > | output |
Protected Member Functions | |
MonitorModule () | |
virtual void | v_handlePacket (PacketType const &p)=0 |
Called for each packet. More... | |
Protected Member Functions inherited from senf::ppi::module::Module | |
Module () | |
Route< connector::InputConnector, connector::OutputConnector > & | route (connector::InputConnector &input, connector::OutputConnector &output) |
Define flow information. More... | |
Route< connector::InputConnector, EventDescriptor > & | route (connector::InputConnector &input, EventDescriptor &output) |
Define flow information. More... | |
Route< EventDescriptor, connector::OutputConnector > & | route (EventDescriptor &input, connector::OutputConnector &output) |
Define flow information. More... | |
void | noroute (connector::Connector &connector) |
Define terminal connectors. More... | |
template<class Target > | |
void | registerEvent (EventDescriptor &descriptor, Target target) |
Register an external event. More... | |
ClockService::clock_type const & | time () const |
Time-stamp of the currently processing event. More... | |
ClockService::clock_type const & | now () const |
Current time of the currently processing event. More... | |
virtual void | v_init () |
Called after module setup. More... | |
console::DirectoryNode & | sysConsoleDir () const |
void | destroy () |
Additional Inherited Members | |
Public Member Functions inherited from senf::ppi::module::Module | |
virtual | ~Module () |
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 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 senf::ppi::module and implement v_handlePacket():
You may of course add events (or even further connectors besides \c input and \c output 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.
Definition at line 67 of file MonitorModule.hh.
|
protected |
|
protectedpure virtual |
Called for each packet.
senf::ppi::connector::PassiveInput<PacketType> senf::ppi::module::MonitorModule< PacketType >::input |
Definition at line 70 of file MonitorModule.hh.
senf::ppi::connector::ActiveOutput<PacketType> senf::ppi::module::MonitorModule< PacketType >::output |
Definition at line 71 of file MonitorModule.hh.