RTC Toolkit 4.0.1
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
41 StatePublisher(const StatePublisher& other) = delete;
42 StatePublisher& operator=(const StatePublisher& other) = delete;
43
44 // move it instead
45 StatePublisher(StatePublisher&& other) = default;
47
48 virtual ~StatePublisher() = default;
49
50 void PublishState(const std::string& state);
51
52private:
53 std::unique_ptr<elt::mal::ps::Publisher<stdif::State>> m_publisher;
54 std::string m_name;
55};
56} // namespace rtctk::componentFramework
57
58#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
void PublishState(const std::string &state)
Definition: statePublisher.cpp:41
Definition: statePublisher.hpp:20
Definition: commandReplier.cpp:22
Definition: statePublisher.hpp:25