RTC Toolkit 5.1.0
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#include <system_error>
20
23#include <vector>
24
25namespace rtctk::telSub {
26
28 std::string_view topic;
31 bool operator==(const CorrelationFailedError& b) const {
32 return b.topic == topic and b.expected_sample_id == expected_sample_id and
33 b.actual_sample_id == actual_sample_id;
34 }
35};
36
37using CorrelationError = std::variant<CorrelationFailedError, DdsWaitSetError>;
38
51
61public:
62 virtual ~CorrelatorIf() {};
63
68 virtual std::optional<std::uint32_t> GetLastSampleId() const RTCTK_NOEXCEPT = 0;
69
93
106
108};
109
110} // namespace rtctk::telSub
111
112#endif // RTCTK_TELSUB_CORRELATORIF_HPP
Declares AgnosticDataSamples.
Interface for correlator implemementations that takes new data samples from DDS and performs correlat...
Definition correlatorIf.hpp:60
virtual std::optional< std::uint32_t > GetLastSampleId() const RTCTK_NOEXCEPT=0
virtual void CheckDdsConnections()=0
virtual std::optional< CorrelationError > Poll(std::chrono::milliseconds timeout, const DataSamplesView *&view) RTCTK_NOEXCEPT=0
Perform correlation on existing or newly taken data samples.
virtual void Reset() RTCTK_NOEXCEPT=0
Resets internal state.
virtual ~CorrelatorIf()
Definition correlatorIf.hpp:62
Project-wide configuration header.
#define RTCTK_NOEXCEPT
Definition config.hpp:63
Declares ShmPublisher.
Declares the DdsWaitSet implementation.
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Definition main.cpp:24
std::variant< CorrelationFailedError, DdsWaitSetError > CorrelationError
Definition correlatorIf.hpp:37
Definition correlatorIf.hpp:27
bool operator==(const CorrelationFailedError &b) const
Definition correlatorIf.hpp:31
uint32_t actual_sample_id
Definition correlatorIf.hpp:30
std::string_view topic
Definition correlatorIf.hpp:28
uint32_t expected_sample_id
Definition correlatorIf.hpp:29
Placeholder for correlator parameters.
Definition correlatorIf.hpp:45
uint32_t m_expected_sample_id_increment
if no parameter is given through config, sample id increment is set to 1.
Definition correlatorIf.hpp:49
A set of correlated agnostic non-owning data samples references.
Definition dataSampleView.hpp:52