RTC Toolkit 5.0.0
Loading...
Searching...
No Matches
statePublisher.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_COMPONENTFRAMEWORK_STATEPUBLISHER_HPP
14#define RTCTK_COMPONENTFRAMEWORK_STATEPUBLISHER_HPP
15
16#include <mal/utility/Uri.hpp>
17
18#include <memory>
19
20namespace elt::mal::ps {
21template <typename TOPIC_TYPE>
23}
24
25namespace stdif {
26class State;
27}
28
30
37public:
38 StatePublisher(const elt::mal::Uri& uri, const std::string& name);
39
40 // no copy allowed
43
44 // move it instead
47
48 virtual ~StatePublisher() = default;
49
50 void PublishState(const std::string& state);
51
52private:
53 // cppcheck-suppress-begin unusedStructMember
54
55 std::unique_ptr<elt::mal::ps::Publisher<stdif::State>> m_publisher;
56 std::string m_name;
57
58 // cppcheck-suppress-end unusedStructMember
59};
60} // namespace rtctk::componentFramework
61
62#endif // RTCTK_COMPONENTFRAMEWORK_STATEPUBLISHER_HPP
Definition statePublisher.hpp:22
Class used to publish state-changed-topic using MAL.
Definition statePublisher.hpp:36
StatePublisher & operator=(StatePublisher &&other)=default
StatePublisher(StatePublisher &&other)=default
StatePublisher & operator=(const StatePublisher &other)=delete
StatePublisher(const StatePublisher &other)=delete
StatePublisher(const elt::mal::Uri &uri, const std::string &name)
Definition statePublisher.cpp:24
void PublishState(const std::string &state)
Definition statePublisher.cpp:41
Definition statePublisher.hpp:20
Definition commandReplier.cpp:22
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Definition statePublisher.hpp:25