RTC Toolkit 6.0.0
Loading...
Searching...
No Matches
statusPublisher.hpp
Go to the documentation of this file.
1
11
12#ifndef RTCTK_RTCSUPERVISOR_STATUSPUBLISHER_HPP
13#define RTCTK_RTCSUPERVISOR_STATUSPUBLISHER_HPP
14
15#include <mal/utility/Uri.hpp>
16
17#include <memory>
18
19namespace elt::mal::ps {
20template <typename TOPIC_TYPE>
21class Publisher;
22}
23
24namespace stdif {
25class Status;
26}
27
28namespace rtctk::rtcSupervisor {
29
36public:
37 StatusPublisher(const elt::mal::Uri& uri, const std::string& name);
38
39 // no copy allowed
40 StatusPublisher(const StatusPublisher& other) = delete;
41 StatusPublisher& operator=(const StatusPublisher& other) = delete;
42
43 // move it instead
44 StatusPublisher(StatusPublisher&& other) = default;
46
47 virtual ~StatusPublisher() = default;
48
49 void PublishStatus(const std::string& status);
50
51private:
52 // cppcheck-suppress-begin unusedStructMember
53
54 std::unique_ptr<elt::mal::ps::Publisher<stdif::Status>> m_publisher;
55 std::string m_name;
56
57 // cppcheck-suppress-end unusedStructMember
58};
59} // namespace rtctk::rtcSupervisor
60
61#endif // RTCTK_RTCSUPERVISOR_STATUSPUBLISHER_HPP
Definition statePublisher.hpp:21
StatusPublisher(const elt::mal::Uri &uri, const std::string &name)
Definition statusPublisher.cpp:26
StatusPublisher(const StatusPublisher &other)=delete
void PublishStatus(const std::string &status)
Definition statusPublisher.cpp:43
StatusPublisher(StatusPublisher &&other)=default
StatusPublisher & operator=(const StatusPublisher &other)=delete
StatusPublisher & operator=(StatusPublisher &&other)=default
Definition statePublisher.hpp:19
Definition alertAggregator.cpp:18
Definition statePublisher.hpp:24