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