Go to the documentation of this file.
21 #ifndef INCLUDE_FKIE_MESSAGE_FILTERS_COMBINER_POLICIES_FIFO_H_
22 #define INCLUDE_FKIE_MESSAGE_FILTERS_COMBINER_POLICIES_FIFO_H_
25 #include <boost/circular_buffer.hpp>
30 namespace combiner_policies
42 template<
typename... IOs>
43 class Fifo :
public PolicyBase<IOs...>
56 explicit Fifo(std::size_t max_queue_size = 1);
62 template<std::
size_t N>
63 void add(std::unique_lock<std::mutex>&,
const std::tuple_element_t<N, IncomingTuples>&);
64 void reset() noexcept override;
76 #include "fifo_impl.h"
std::tuple< helpers::io_tuple_t< IOs >... > IncomingTuples
Tuple type of incoming data tuples.
void reset() noexcept override
Reset internal state.
bool has_complete_tuple() noexcept
std::function< void(const OutgoingTuple &)> EmitterCB
Callback for assembled outputs.
void add(std::unique_lock< std::mutex > &, const std::tuple_element_t< N, IncomingTuples > &)
Input function.
Combine multiple sources into a single one.
MaybeOutgoingTuples assemble_output() noexcept
Fifo(std::size_t max_queue_size=1)
Constructor.
helpers::io_tuple_t< helpers::io_concat_t< IOs... > > OutgoingTuple
Combined tuple type for data output.
std::tuple< boost::optional< helpers::io_tuple_t< IOs > >... > MaybeOutgoingTuples
Tuple of outgoing tuple candidates.
typename io_tuple< IO >::type io_tuple_t
std::tuple< boost::circular_buffer< helpers::io_tuple_t< IOs > >... > IncomingQueues