RTC Toolkit 5.0.0
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
43
44 // move it instead
47
48 virtual ~StatusPublisher() = default;
49
50 void PublishStatus(const std::string& status);
51
52private:
53 // cppcheck-suppress-begin unusedStructMember
54
55 std::unique_ptr<elt::mal::ps::Publisher<stdif::Status>> m_publisher;
56 std::string m_name;
57
58 // cppcheck-suppress-end unusedStructMember
59};
60} // namespace rtctk::rtcSupervisor
61
62#endif // RTCTK_RTCSUPERVISOR_STATUSPUBLISHER_HPP
Class used to publish status-changed-topic using MAL.
Definition statusPublisher.hpp:36
StatusPublisher(const elt::mal::Uri &uri, const std::string &name)
Definition statusPublisher.cpp:27
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
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Definition rtcSupervisor.cpp:24
Definition statePublisher.hpp:25