RTC Toolkit  0.1.0-alpha
serviceDiscovery.hpp
Go to the documentation of this file.
1 
9 #ifndef RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERY_HPP
10 #define RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERY_HPP
11 
12 #include <string>
13 #include <memory>
14 
15 #include <mal/Cii.hpp>
17 
18 namespace rtctk::componentFramework {
19 
20 class FileRepository;
21 
26  public:
35 
42  explicit ServiceDiscovery(const elt::mal::Uri& endpoint, const std::string& comp_name="");
44 
54  ::elt::mal::Uri Get(const std::string& service_name);
55 
66  ::elt::mal::Uri Get(const std::string& service_name, const std::string& comp_name);
67 
68  private:
69  DataPointPath CalcDatapointUri(const std::string& comp_name, const std::string& service_name);
70 
71  const std::string& m_component_name;
72  std::unique_ptr<FileRepository> m_service_registry;
73 };
74 
75 } // closing namespace
76 
77 #endif
rtctk::componentFramework::ServiceDiscovery::ServiceDiscovery
ServiceDiscovery(const elt::mal::Uri &endpoint, const std::string &comp_name="")
Definition: serviceDiscovery.cpp:21
rtctk::componentFramework
Definition: rtcComponent.hpp:17
rtctk::componentFramework::ServiceDiscovery::RUNTIME_REPO_ENDPOINT
static const DataPointPath RUNTIME_REPO_ENDPOINT
Definition: serviceDiscovery.hpp:32
rtctk::componentFramework::ServiceDiscovery::PERSIST_REPO_ENDPOINT
static const DataPointPath PERSIST_REPO_ENDPOINT
Definition: serviceDiscovery.hpp:33
rtctk::componentFramework::ServiceDiscovery
Definition: serviceDiscovery.hpp:25
rtctk::componentFramework::ServiceDiscovery::~ServiceDiscovery
~ServiceDiscovery()
rtctk::componentFramework::ServiceDiscovery::Get
::elt::mal::Uri Get(const std::string &service_name)
rtctk::componentFramework::ServiceDiscovery::Get
::elt::mal::Uri Get(const std::string &service_name, const std::string &comp_name)
rtctk::componentFramework::ServiceDiscovery::REQ_REP_ENDPOINT
static const DataPointPath REQ_REP_ENDPOINT
Definition: serviceDiscovery.hpp:30
dataPointPath.hpp
Header file for RepositoryIf and related base classes.
rtctk::componentFramework::DataPointPath
Definition: dataPointPath.hpp:30
rtctk::componentFramework::ServiceDiscovery::PUB_SUB_ENDPOINT
static const DataPointPath PUB_SUB_ENDPOINT
Definition: serviceDiscovery.hpp:31
rtctk::componentFramework::ServiceDiscovery::OLDB_ENDPOINT
static const DataPointPath OLDB_ENDPOINT
Definition: serviceDiscovery.hpp:34