First-In-First-Out policy. More...
#include <fifo.h>
Public Member Functions | |
Fifo (std::size_t max_queue_size=1) | |
Constructor. More... | |
Protected Member Functions | |
template<std::size_t N> | |
void | add (std::unique_lock< std::mutex > &, const std::tuple_element_t< N, IncomingTuples > &) |
Input function. More... | |
void | reset () noexcept override |
Reset internal state. More... | |
Private Types | |
using | IncomingQueues = std::tuple< boost::circular_buffer< helpers::io_tuple_t< IOs > >... > |
Private Member Functions | |
MaybeOutgoingTuples | assemble_output () noexcept |
bool | has_complete_tuple () noexcept |
Private Attributes | |
IncomingQueues | in_ |
Friends | |
template<template< typename... > class, class... > | |
class | fkie_message_filters::Combiner |
Additional Inherited Members |
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.
|
private |
|
explicit |
Constructor.
max_queue_size
maximum queue length for the FIFO queue, per input sourcestd::invalid_argument | if max_queue_size is zero |
Definition at line 70 of file fifo_impl.h.
|
protected |
Input function.
This function will be called by the Combiner class for incoming data.
Definition at line 83 of file fifo_impl.h.
|
privatenoexcept |
Definition at line 114 of file fifo_impl.h.
|
privatenoexcept |
Definition at line 100 of file fifo_impl.h.
|
overrideprotectedvirtualnoexcept |
Reset internal state.
This function is called by the Combiner if the filter is reset.
Implements fkie_message_filters::combiner_policies::PolicyBase< IOs... >.
Definition at line 128 of file fifo_impl.h.
|
friend |
|
private |