Template Class Latch
Defined in File latch.hpp
Inheritance Relationships
Base Type
public fkie_message_filters::combiner_policies::PolicyBase< IOs... >(Template Class PolicyBase)
Class Documentation
-
template<typename ...IOs>
class Latch : public fkie_message_filters::combiner_policies::PolicyBase<IOs...> Latch policy.
This is a policy for the Combiner class. It works similar to the Fifo policy, but it retains the latest data from each connected source and will reuse data if some inputs arrive at a slower rate than others. The policy can be configured to generate output if a particular source is updated or any source receives new data.
As the policy must be able to create copies of incoming data, it is not suitable for move-only input types.
Public Types
-
using EmitterCB = std::function<void(OutgoingTuple&)>
Callback for assembled outputs.
Public Functions
-
Latch() noexcept
Constructor.
By default, the policy will generate output whenever the first connected source receives data.
Protected Types
Protected Functions
-
template<std::size_t N>
void add(std::unique_lock<std::mutex>&, std::tuple_element_t<N, IncomingTuples>&&) Input function.
This function will be called by the Combiner class for incoming data.
-
void emit(OutgoingTuple &out)
Emit data.
This returns combined data back to the Combiner class.
Friends
- friend class fkie_message_filters::Combiner
-
using EmitterCB = std::function<void(OutgoingTuple&)>