Input module reading data from an arbitrary FileHandle. More...
#include <senf/PPI/SocketSource.hh>
Classes | |
struct | RxStats |
Public Types | |
typedef Reader::Handle | Handle |
Handle type requested by the reader. More... | |
Public Member Functions | |
ActiveSocketSource (unsigned max_burst=1) | |
ActiveSocketSource (Reader reader, unsigned max_burst=1) | |
ActiveSocketSource (Handle const &handle, unsigned max_burst=1) | |
ActiveSocketSource (Handle const &handle, Reader reader, unsigned max_burst=1) | |
Reader & | reader () |
Access Reader helper. More... | |
Handle | handle () |
Access handle. More... | |
void | handle (Handle const &handle) |
Set handle. More... | |
unsigned | maxBurst () const |
void | maxBurst (unsigned max_burst) |
void | flush () |
RxStats & | rxStats () |
Public Member Functions inherited from senf::ppi::module::Module | |
virtual | ~Module () |
Public Attributes | |
connector::ActiveOutput< typename Reader::PacketType > | output |
Output connector to which the data received is written. More... | |
Additional Inherited Members | |
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 () |
Input module reading data from an arbitrary FileHandle.
This input module will read data from a FileHandle object and parse the data according to the Reader. The default reader is senf::ppi::DgramReader <> which reads the data into a senf::DataPacket. To parse the data according to some other packet type, pass that packet type to senf::ppi::DgramReader:
declares a reader module reading senf::EthernetPacket's
A Reader must fulfill the following interface:
Whenever the FileHandle object is ready for reading, the Reader's operator()
is called to read a packet.
Definition at line 108 of file SocketSource.hh.
typedef Reader::Handle senf::ppi::module::ActiveSocketSource< Reader >::Handle |
Handle type requested by the reader.
Definition at line 111 of file SocketSource.hh.
senf::ppi::module::ActiveSocketSource< Reader >::ActiveSocketSource | ( | unsigned | max_burst = 1 | ) |
|
explicit |
|
explicit |
senf::ppi::module::ActiveSocketSource< Reader >::ActiveSocketSource | ( | Handle const & | handle, |
Reader | reader, | ||
unsigned | max_burst = 1 |
||
) |
void senf::ppi::module::ActiveSocketSource< Reader >::flush | ( | ) |
Handle senf::ppi::module::ActiveSocketSource< Reader >::handle | ( | ) |
Access handle.
void senf::ppi::module::ActiveSocketSource< Reader >::handle | ( | Handle const & | handle | ) |
Set handle.
Assigning an empty or in-valid() handle will disable the module until a new, valid handle is assigned.
unsigned senf::ppi::module::ActiveSocketSource< Reader >::maxBurst | ( | ) | const |
void senf::ppi::module::ActiveSocketSource< Reader >::maxBurst | ( | unsigned | max_burst | ) |
Reader& senf::ppi::module::ActiveSocketSource< Reader >::reader | ( | ) |
Access Reader helper.
|
inline |
Definition at line 152 of file SocketSource.hh.
connector::ActiveOutput<typename Reader::PacketType> senf::ppi::module::ActiveSocketSource< Reader >::output |
Output connector to which the data received is written.
Definition at line 116 of file SocketSource.hh.