FKIE Message Filters
Improved filters for processing ROS messages
|
Manually operated data source. More...
#include <fkie_message_filters/user_source.h>
Public Types | |
using | Output = IO< Outputs... > |
Grouped output types. More... | |
Public Member Functions | |
Connection | connect_to_sink (Sink< Outputs... > &dst) noexcept |
Connect this source to a sink. More... | |
virtual void | disconnect () noexcept override |
Disconnect from all connected sinks. More... | |
void | disconnect_from_all_sinks () noexcept |
Disconnect from all connected sinks. More... | |
void | operator() (const Outputs &... out) |
Manually inject data and pass it to the connected sinks. More... | |
virtual void | reset () noexcept |
Reset filter state. More... | |
Static Public Attributes | |
static constexpr std::size_t | NUM_OUTPUTS |
Number of output arguments. | |
Protected Member Functions | |
void | send (const Outputs &... out) |
Pass data to all connected sinks. More... | |
Manually operated data source.
This data source behaves like a function object and can be called to pass data to its sinks. It is mostly useful to connect a filter pipeline to foreign data sources. Even though its technically possible to use a UserSource object as callback for a ROS subscriber, the specialized Subscriber sources have additional functionality and are easier to set up.
|
inherited |
Grouped output types.
This type can be used to define sinks with matching types.
|
noexceptinherited |
Connect this source to a sink.
Can be called multiple times to connect multiple sinks; in that case, the sinks receive data in the same order as they have been connected. This function does basically the same thing as Sink::connect_to_source(), only from the opposite point of view.
dst
the sink that is to be connected
|
overridevirtualnoexceptinherited |
Disconnect from all connected sinks.
The source implementation calls disconnect_from_all_sinks().
Implements fkie_message_filters::FilterBase.
|
noexceptinherited |
Disconnect from all connected sinks.
Severs the connection to all sinks, turning the send() method into a no-op.
void fkie_message_filters::UserSource< Outputs >::operator() | ( | const Outputs &... | out | ) |
Manually inject data and pass it to the connected sinks.
out
data
|
inlinevirtualnoexceptinherited |
Reset filter state.
For stateful filters, this method resets the internal state as if the filter had just been created. Existing connections to sources and sinks are unaffected.
The default implementation does nothing.
Reimplemented in fkie_message_filters::Buffer< Inputs >, fkie_message_filters::Buffer< Inputs... >, fkie_message_filters::TfFilter< Inputs >, fkie_message_filters::TfFilter< Inputs... >, fkie_message_filters::Combiner< PolicyTmpl, IOs >, fkie_message_filters::Sequencer< Inputs >, and fkie_message_filters::Sequencer< Inputs... >.
|
protectedinherited |
Pass data to all connected sinks.
out
data