RTC Toolkit 5.0.0
Loading...
Searching...
No Matches
shmPublisherIf.hpp
Go to the documentation of this file.
1
12#ifndef RTCTK_TELSUB_SHMPUBLISHERIF_HPP
13#define RTCTK_TELSUB_SHMPUBLISHERIF_HPP
14#include <numapp/mempolicy.hpp>
15#include <rtctk/config.hpp>
16
18#include <system_error>
19#include <variant>
20
21namespace rtctk::telSub {
22
32public:
33 struct BlenderError {
34 std::error_code code;
35 bool operator==(const BlenderError& r) const {
36 return r.code == code;
37 };
38 };
39 struct ShmError {
40 std::error_code code;
41 bool operator==(const ShmError& r) const {
42 return r.code == code;
43 };
44 };
45 using PublisherError = std::variant<std::monostate, BlenderError, ShmError>;
46 virtual ~ShmPublisherIf() {};
54
60 virtual void CloseQueue() RTCTK_NOEXCEPT = 0;
61};
62
63} // namespace rtctk::telSub
64
65#endif // RTCTK_TELSUB_SHMPUBLISHERIF_HPP
Simple interface to class that owns the shared memory queue.
Definition shmPublisherIf.hpp:31
virtual ~ShmPublisherIf()
Definition shmPublisherIf.hpp:46
virtual void CloseQueue() RTCTK_NOEXCEPT=0
Close shared memory queue.
virtual PublisherError Publish(const DataSamplesView &samples) RTCTK_NOEXCEPT=0
Publish correlated data samples to shared memory.
std::variant< std::monostate, BlenderError, ShmError > PublisherError
Definition shmPublisherIf.hpp:45
Project-wide configuration header.
#define RTCTK_NOEXCEPT
Definition config.hpp:63
Declares ShmPublisher.
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Definition main.cpp:24
A set of correlated agnostic non-owning data samples references.
Definition dataSampleView.hpp:52
Definition shmPublisherIf.hpp:33
std::error_code code
Definition shmPublisherIf.hpp:34
bool operator==(const BlenderError &r) const
Definition shmPublisherIf.hpp:35
Definition shmPublisherIf.hpp:39
std::error_code code
Definition shmPublisherIf.hpp:40
bool operator==(const ShmError &r) const
Definition shmPublisherIf.hpp:41