Template Class Fifo
Defined in File fifo.hpp
Inheritance Relationships
Base Type
public fkie_message_filters::combiner_policies::PolicyBase< IOs... >(Template Class PolicyBase)
Class Documentation
-
template<typename ...IOs>
class Fifo : public fkie_message_filters::combiner_policies::PolicyBase<IOs...> First-In-First-Out policy.
This is a policy for the Combiner class. It will assemble data from the connected sources in a FIFO manner. As soon as at least one input from each source has been received, a combined output is created and passed to the sink. There is no attempt to reorder inputs in any way.
The FIFO policy is sufficient if all corresponding inputs arrive always in order and with the same frequency. The policy has no requirements with regard to the data types it processes.
Public Types
-
using EmitterCB = std::function<void(OutgoingTuple&)>
Callback for assembled outputs.
Public Functions
-
explicit Fifo(std::size_t max_queue_size = 1)
Constructor.
max_queue_sizemaximum queue length for the FIFO queue, per input source
- Throws:
std::invalid_argument – if max_queue_size is zero
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&)>