RTC Toolkit  2.0.0
commandReplier.hpp
Go to the documentation of this file.
1 
12 #ifndef RTCTK_COMPONENTFRAMEWORK_COMMANDREPLIER_HPP
13 #define RTCTK_COMPONENTFRAMEWORK_COMMANDREPLIER_HPP
14 
15 #include <mal/rr/RrEntity.hpp>
16 #include <mal/rr/Server.hpp>
17 #include <mal/utility/Uri.hpp>
18 #include <memory>
19 #include <thread>
20 
21 namespace rtctk::componentFramework {
22 
27 public:
28  CommandReplier(const ::elt::mal::Uri& uri);
29  virtual ~CommandReplier();
30 
31  template <typename T>
32  void
33  RegisterService(std::string const& name, std::shared_ptr<elt::mal::rr::RrEntity>& service) {
34  m_rr_server->registerService<T, false>(name, service);
35  }
36 
37 private:
38  std::unique_ptr<elt::mal::rr::Server> m_rr_server;
39  std::thread m_rr_thread;
40 };
41 } // namespace rtctk::componentFramework
42 
43 #endif
wscript.name
name
Definition: wscript:15
rtctk::componentFramework
Definition: commandReplier.cpp:20
rtctk::componentFramework::CommandReplier::~CommandReplier
virtual ~CommandReplier()
Definition: commandReplier.cpp:29
rtctk::componentFramework::CommandReplier::CommandReplier
CommandReplier(const ::elt::mal::Uri &uri)
Definition: commandReplier.cpp:21
rtctk::componentFramework::CommandReplier
Class that handles reception of commands using MAL.
Definition: commandReplier.hpp:26
rtctk::componentFramework::CommandReplier::RegisterService
void RegisterService(std::string const &name, std::shared_ptr< elt::mal::rr::RrEntity > &service)
Definition: commandReplier.hpp:33