Go to the documentation of this file.
11 #ifndef RTCTK_TELSUB_CORRELATOR_HPP
12 #define RTCTK_TELSUB_CORRELATOR_HPP
30 using Alloc = std::pmr::polymorphic_allocator<std::byte>;
36 std::unique_ptr<DdsSubscriberIf> dds_subscriber,
37 Alloc const& alloc = {});
46 virtual std::error_code
Poll(std::chrono::milliseconds timeout,
50 return m_last_correlated_sample;
54 using ClockType =
std::chrono::steady_clock;
55 using TimePoint = ClockType::time_point;
60 std::error_code TakeUntil(TimePoint until) noexcept;
66 std::error_code CorrelateFirst(TimePoint until,
DataSamplesView const*& samples) noexcept;
78 std::error_code CorrelateSubsequent(TimePoint until,
DataSamplesView const*& samples) noexcept;
88 std::optional<
unsigned long> m_last_correlated_sample;
89 TimePoint m_poll_until_time;
91 std::pmr::vector<
size_t> m_indices;
96 #endif // #define RTCTK_TELSUB_CORRELATOR_HPP
void Reset() RTCTK_NOEXCEPT override
Resets internal state.
Definition: correlator.cpp:142
Interface for correlator implemementations that takes new data samples from DDS and performs correlat...
Definition: correlatorIf.hpp:38
Base class abstracting DDS communication code.
Definition: ddsSubscriberIf.hpp:50
Implements a correlator.
Definition: correlator.hpp:28
std::optional< unsigned long > GetLastSampleId() const RTCTK_NOEXCEPT override
Definition: correlator.hpp:49
virtual std::error_code Poll(std::chrono::milliseconds timeout, DataSamplesView const *&samples) RTCTK_NOEXCEPT override
The strategy is to correlate on existing data, if possible before taking more samples.
Definition: correlator.cpp:151
Placeholder for correlator parameters.
Definition: correlatorIf.hpp:29
Correlator(CorrelatorParams const ¶ms, std::unique_ptr< DdsSubscriberIf > dds_subscriber, Alloc const &alloc={})
Definition: correlator.cpp:128
A set of correlated agnostic non-owning data samples references.
Definition: dataSampleView.hpp:46
Definition: mudpiProcessingError.hpp:119
Declares DdsSubscriberIf.
#define RTCTK_NOEXCEPT
Definition: config.hpp:15
std::pmr::polymorphic_allocator< std::byte > Alloc
Definition: correlator.hpp:30
Container of DDS samples and associated sample information.
Definition: agnosticDataSamples.hpp:71