RTC Toolkit  1.0.0
operationalLogicIf.hpp
Go to the documentation of this file.
1 
11 #ifndef RTCKT_TELSUB_OPERATIONALLOGICIF_HPP
12 #define RTCKT_TELSUB_OPERATIONALLOGICIF_HPP
13 #include <rtctk/config.hpp>
14 
15 #include <chrono>
16 #include <optional>
17 #include <string>
18 
19 #include <numapp/numapolicies.hpp>
20 
22 
23 namespace rtctk::telSub {
24 
32 struct ShmParams {
33  std::string topic_name;
34  size_t capacity;
35  std::optional<numapp::MemPolicy> mem_policy;
36 };
37 
51  std::chrono::milliseconds close_detach_delay = std::chrono::milliseconds(0);
52  std::chrono::milliseconds correlator_poll_timeout = std::chrono::milliseconds(100);
53  std::chrono::milliseconds monitor_report_interval = std::chrono::milliseconds(500);
54  std::optional<numapp::NumaPolicies> processing_thread_policies = std::nullopt;
55  std::optional<numapp::NumaPolicies> monitoring_thread_policies = std::nullopt;
56 };
57 
58 
65 public:
66  virtual ~OperationalLogicIf() {
67  }
68 
76  virtual void RunAsync() RTCTK_NOEXCEPT = 0;
77 
83  virtual void IdleAsync() RTCTK_NOEXCEPT = 0;
84 
90  virtual std::error_code GetLastError() const RTCTK_NOEXCEPT = 0;
91 
99  virtual uint64_t GetErrorCount() const RTCTK_NOEXCEPT = 0;
100 };
101 
102 } // namespace rtctk::telSub
103 #endif // #ifndef RTCKT_TELSUB_OPERATIONALLOGICIF_HPP
rtctk::telSub::ShmParams::mem_policy
std::optional< numapp::MemPolicy > mem_policy
Definition: operationalLogicIf.hpp:35
rtctk::telSub::OperationalParams::correlator_poll_timeout
std::chrono::milliseconds correlator_poll_timeout
Definition: operationalLogicIf.hpp:52
rtctk::telSub::OperationalLogicIf::GetLastError
virtual std::error_code GetLastError() const RTCTK_NOEXCEPT=0
Return last recorded error.
config.hpp
Project-wide configuration header.
rtctk::telSub::OperationalLogicIf::~OperationalLogicIf
virtual ~OperationalLogicIf()
Definition: operationalLogicIf.hpp:66
rtctk::telSub::OperationalLogicIf::RunAsync
virtual void RunAsync() RTCTK_NOEXCEPT=0
Start publishing.
rtctk::telSub::OperationalParams::monitor_report_interval
std::chrono::milliseconds monitor_report_interval
Definition: operationalLogicIf.hpp:53
rtctk::telSub::OperationalLogicIf
Interface to the operational logic implementation.
Definition: operationalLogicIf.hpp:64
rtctk::telSub::OperationalLogicIf::IdleAsync
virtual void IdleAsync() RTCTK_NOEXCEPT=0
Stop publishing.
rtctk::telSub::OperationalParams::monitoring_thread_policies
std::optional< numapp::NumaPolicies > monitoring_thread_policies
Definition: operationalLogicIf.hpp:55
rtctk::telSub::OperationalLogicIf::GetErrorCount
virtual uint64_t GetErrorCount() const RTCTK_NOEXCEPT=0
Get current error count.
rtctk::telSub::ShmParams
Shared memory configuration parameters.
Definition: operationalLogicIf.hpp:32
rtctk::telSub
Definition: main.cpp:6
rtctk::telSub::OperationalParams
Configuration parameters needed for operational logic.
Definition: operationalLogicIf.hpp:45
rtctk::telSub::ShmParams::capacity
size_t capacity
Definition: operationalLogicIf.hpp:34
rtctk::telSub::ShmParams::topic_name
std::string topic_name
Definition: operationalLogicIf.hpp:33
std
Definition: mudpiProcessingError.hpp:119
ddsSubscriberIf.hpp
Declares DdsSubscriberIf.
RTCTK_NOEXCEPT
#define RTCTK_NOEXCEPT
Definition: config.hpp:15
rtctk::telSub::OperationalParams::processing_thread_policies
std::optional< numapp::NumaPolicies > processing_thread_policies
Definition: operationalLogicIf.hpp:54
rtctk::telSub::OperationalParams::close_detach_delay
std::chrono::milliseconds close_detach_delay
Amount of time to delay detaching the SHM from the point it is signalled as closed.
Definition: operationalLogicIf.hpp:51