RTC Toolkit 6.0.0-pre2
Loading...
Searching...
No Matches
correlatorIf.hpp
Go to the documentation of this file.
1
12#ifndef RTCTK_TELSUB_CORRELATORIF_HPP
13#define RTCTK_TELSUB_CORRELATORIF_HPP
15#include <rtctk/config.hpp>
16
17#include <chrono>
18#include <optional>
19
22
23namespace rtctk::telSub {
24
26 std::string_view topic;
33};
34
35using CorrelationError = std::variant<CorrelationFailedError, DdsWaitSetError>;
36
49
59public:
60 virtual ~CorrelatorIf() = default;
61
66 virtual std::optional<std::uint32_t> GetLastSampleId() const noexcept = 0;
67
89 virtual std::optional<CorrelationError>
90 Poll(std::chrono::milliseconds timeout, const DataSamplesView*& view) noexcept = 0;
91
103 virtual void Reset() noexcept = 0;
104
105 virtual void CheckDdsConnections() = 0;
106};
107
108} // namespace rtctk::telSub
109
110#endif // RTCTK_TELSUB_CORRELATORIF_HPP
Declares AgnosticDataSamples.
Interface for correlator implemementations that takes new data samples from DDS and performs correlat...
Definition correlatorIf.hpp:58
virtual void CheckDdsConnections()=0
virtual void Reset() noexcept=0
Resets internal state.
virtual std::optional< std::uint32_t > GetLastSampleId() const noexcept=0
virtual std::optional< CorrelationError > Poll(std::chrono::milliseconds timeout, const DataSamplesView *&view) noexcept=0
Perform correlation on existing or newly taken data samples.
virtual ~CorrelatorIf()=default
Project-wide configuration header.
Declares ShmPublisher.
Declares the DdsWaitSet implementation.
Definition main.cpp:24
std::variant< CorrelationFailedError, DdsWaitSetError > CorrelationError
Definition correlatorIf.hpp:35
Definition ddsSub.hpp:156
Definition correlatorIf.hpp:25
bool operator==(const CorrelationFailedError &b) const
Definition correlatorIf.hpp:29
uint32_t actual_sample_id
Definition correlatorIf.hpp:28
std::string_view topic
Definition correlatorIf.hpp:26
uint32_t expected_sample_id
Definition correlatorIf.hpp:27
Placeholder for correlator parameters.
Definition correlatorIf.hpp:43
uint32_t m_expected_sample_id_increment
if no parameter is given through config, sample id increment is set to 1.
Definition correlatorIf.hpp:47
A set of correlated agnostic non-owning data samples references.
Definition dataSampleView.hpp:52