Exact time policy. More...
#include <exact_time.h>
Public Member Functions | |
ExactTime () | |
Constructor. More... | |
ExactTime & | set_max_age (const ros::Duration &max_age) noexcept |
Set maximum age of any data in the queue. More... | |
ExactTime & | set_max_queue_size (std::size_t queue_size, const boost::optional< ros::Duration > &max_age=boost::none) noexcept |
Set maximum queue size. 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< std::map< ros::Time, helpers::io_tuple_t< IOs > >... > |
Private Member Functions | |
MaybeOutgoingTuples | try_assemble_output (const ros::Time &time, bool &complete) noexcept |
Private Attributes | |
boost::optional< ros::Duration > | max_age_ |
std::size_t | max_queue_size_ |
IncomingQueues | queues_ |
Friends | |
template<template< typename... > class, class... > | |
class | fkie_message_filters::Combiner |
Additional Inherited Members |
Exact time policy.
This is a policy for the Combiner class. It will associate data from the connected sources when their ROS header timestamp match exactly. If an input source is not unary, only the first argument of each input will be examined to determine the timestamp. It must have an accessible ROS header, which is determined using the ros::message_traits
template.
The policy will discard unmatched data which exceeds configurable age limit or overflows the maximum queue size. The resulting timestamps will be strictly increasing if at least one of the inputs receives messages in correct temporal order. Whenever matched data is emitted, all queued inputs with older timestamps will be discarded.
The filter will not output any data at all if the time lag between two inputs is larger than the maximum permissible age, or if the time lag requires more messages to be buffered than the maximum queue size permits. By default, the filter will buffer arbitrary many messages for at most one second.
Definition at line 50 of file exact_time.h.
|
private |
Definition at line 92 of file exact_time.h.
fkie_message_filters::combiner_policies::ExactTime< IOs >::ExactTime | ( | ) |
Constructor.
Definition at line 36 of file exact_time_impl.h.
|
protected |
Input function.
This function will be called by the Combiner class for incoming data.
Definition at line 59 of file exact_time_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 125 of file exact_time_impl.h.
|
noexcept |
Set maximum age of any data in the queue.
This is equivalent to
max_age
maximum ageDefinition at line 42 of file exact_time_impl.h.
|
noexcept |
Set maximum queue size.
queue_size
maximum queue size per slot (zero means unlimited) max_age
the maximum age of any data in the queueDefinition at line 50 of file exact_time_impl.h.
|
privatenoexcept |
Definition at line 99 of file exact_time_impl.h.
|
friend |
Definition at line 53 of file exact_time.h.
|
private |
Definition at line 95 of file exact_time.h.
|
private |
Definition at line 96 of file exact_time.h.
|
private |
Definition at line 94 of file exact_time.h.