RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
correlatorIf.hpp
Go to the documentation of this file.
1
11#ifndef RTCTK_TELSUB_CORRELATORIF_HPP
12#define RTCTK_TELSUB_CORRELATORIF_HPP
13#include <rtctk/config.hpp>
15
16#include <chrono>
17#include <optional>
18
21
22namespace rtctk::telSub {
23
25 std::string_view topic;
32};
33
34using CorrelationError = std::variant<CorrelationFailedError, DdsWaitSetError>;
35
48
58public:
59 virtual ~CorrelatorIf() = default;
60
65 virtual std::optional<std::uint32_t> GetLastSampleId() const noexcept = 0;
66
88 virtual std::optional<CorrelationError>
89 Poll(std::chrono::milliseconds timeout, const DataSamplesView*& view) noexcept = 0;
90
102 virtual void Reset() noexcept = 0;
103
104 virtual void CheckDdsConnections() = 0;
105};
106
107} // namespace rtctk::telSub
108
109#endif // RTCTK_TELSUB_CORRELATORIF_HPP
Declares AgnosticDataSamples.
Interface for correlator implemementations that takes new data samples from DDS and performs correlat...
Definition correlatorIf.hpp:57
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:23
std::variant< CorrelationFailedError, DdsWaitSetError > CorrelationError
Definition correlatorIf.hpp:34
Definition ddsSub.hpp:155
Definition correlatorIf.hpp:24
bool operator==(const CorrelationFailedError &b) const
Definition correlatorIf.hpp:28
uint32_t actual_sample_id
Definition correlatorIf.hpp:27
std::string_view topic
Definition correlatorIf.hpp:25
uint32_t expected_sample_id
Definition correlatorIf.hpp:26
Placeholder for correlator parameters.
Definition correlatorIf.hpp:42
uint32_t m_expected_sample_id_increment
if no parameter is given through config, sample id increment is set to 1.
Definition correlatorIf.hpp:46
A set of correlated agnostic non-owning data samples references.
Definition dataSampleView.hpp:51