Output module writing data to a FileHandle using the provided Writer. If using the default ConnectedDgramWriter the filehandle must be writable, connected and able to handle complete datagrams. More...
#include <senf/PPI/SocketSink.hh>
Public Types | |
typedef Writer::Handle | Handle |
Handle type requested by writer. More... | |
Public Member Functions | |
ActiveSocketSink () | |
Create non-connected writer. More... | |
ActiveSocketSink (Writer const &writer) | |
Create non-connected writer. More... | |
ActiveSocketSink (Handle const &handle) | |
Create new writer for the given handle. More... | |
ActiveSocketSink (Handle const &handle, Writer const &writer) | |
Create new writer for the given handle. More... | |
Writer & | writer () |
Access the Writer. More... | |
Handle | handle () |
Access handle. More... | |
void | handle (Handle const &handle) |
Set handle. More... | |
Public Member Functions inherited from senf::ppi::module::Module | |
virtual | ~Module () |
Public Attributes | |
connector::ActiveInput< typename Writer::PacketType > | input |
Input connector from which data is received. 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 () |
Output module writing data to a FileHandle using the provided Writer. If using the default ConnectedDgramWriter the filehandle must be writable, connected and able to handle complete datagrams.
This output module will write data to a FileHandle object using a given Writer. This output module is active. This requires the file handle to be able to signal its readiness to accept more data via the Scheduler.
The default Writer is senf::ppi::ConnectedDgramWriter which will write out the complete packet to the file handle.
A Writer must fulfill the following interface:
Whenever a packet is received for sending, the Writer's operator()
is called.
Definition at line 222 of file SocketSink.hh.
typedef Writer::Handle senf::ppi::module::ActiveSocketSink< Writer >::Handle |
Handle type requested by writer.
Definition at line 224 of file SocketSink.hh.
senf::ppi::module::ActiveSocketSink< Writer >::ActiveSocketSink | ( | ) |
Create non-connected writer.
The writer will be disabled until a socket is set
|
explicit |
Create non-connected writer.
The writer will be disabled until a socket is set
[in] | writer | Writer helper writing packet date to the socket |
|
explicit |
Create new writer for the given handle.
Data will be written to handle using Writer.
[in] | handle | Handle to write data to |
senf::ppi::module::ActiveSocketSink< Writer >::ActiveSocketSink | ( | Handle const & | handle, |
Writer const & | writer | ||
) |
Create new writer for the given handle.
Data will be written to handle using Writer.
[in] | handle | Handle to write data to |
[in] | writer | Writer helper writing packet date to the socket |
Handle senf::ppi::module::ActiveSocketSink< Writer >::handle | ( | ) |
Access handle.
void senf::ppi::module::ActiveSocketSink< Writer >::handle | ( | Handle const & | handle | ) |
Set handle.
Assigning an empty or in-valid() handle will disable the module until a new. valid handle is assigned.
Writer& senf::ppi::module::ActiveSocketSink< Writer >::writer | ( | ) |
Access the Writer.
connector::ActiveInput<typename Writer::PacketType> senf::ppi::module::ActiveSocketSink< Writer >::input |
Input connector from which data is received.
Definition at line 229 of file SocketSink.hh.