RTC Toolkit  2.0.0
fileServiceRegistryAdapter.hpp
Go to the documentation of this file.
1 
12 #ifndef RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERYFILEADAPTER_HPP
13 #define RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERYFILEADAPTER_HPP
14 
15 #include <memory>
16 #include <string>
17 
18 #include <mal/Cii.hpp>
19 
23 
24 namespace rtctk::componentFramework {
25 
30  public:
31  FileServiceRegistryAdapter(const elt::mal::Uri& endpoint);
32  std::vector<std::string> ListComponents() override;
33  ServiceEndpoint Get(const std::string& comp_name, const std::string& service_name) override;
34  ServiceEndpoint GetOldbEndpoint () override;
37 
38  private:
39  static const std::string RUNTIME_REPO_ENDPOINT;
40  static const std::string PERSISTENT_REPO_ENDPOINT;
41  static const std::string OLDB_ENDPOINT;
42  DataPointPath CalcDatapointUri(const std::string& comp_name, const std::string& service_name);
43  std::unique_ptr<FileRepository> m_service_registry;
44 };
45 
46 } // namespace rtctk::componentFramework
47 
48 #endif // RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERYFILEADAPTER_HPP
rtctk::componentFramework
Definition: commandReplier.cpp:20
rtctk::componentFramework::FileServiceRegistryAdapter::GetRuntimeRepoEndpoint
ServiceEndpoint GetRuntimeRepoEndpoint() override
Get the Runtime Repository Endpoint from the service registry.
Definition: fileServiceRegistryAdapter.cpp:84
rtctk::componentFramework::ServiceRegistryIf::ServiceEndpoint
elt::mal::Uri ServiceEndpoint
Definition: serviceRegistryIf.hpp:30
serviceRegistryIf.hpp
Class that implements a very basic service discover mechanism.
rtctk::componentFramework::ServiceRegistryIf
Class that implements a service registry to be used by the service discovery.
Definition: serviceRegistryIf.hpp:27
rtctk::componentFramework::FileServiceRegistryAdapter::FileServiceRegistryAdapter
FileServiceRegistryAdapter(const elt::mal::Uri &endpoint)
Definition: fileServiceRegistryAdapter.cpp:32
rtctk::componentFramework::FileServiceRegistryAdapter::GetOldbEndpoint
ServiceEndpoint GetOldbEndpoint() override
Get the Oldb Endpoint from the service registry.
Definition: fileServiceRegistryAdapter.cpp:80
fileRepository.hpp
Declaration of FileRepository that provides a simple file based repository.
rtctk::componentFramework::FileServiceRegistryAdapter
Class that implements a very basic service discovery mechanism.
Definition: fileServiceRegistryAdapter.hpp:29
dataPointPath.hpp
Header file for DataPointPath.
rtctk::componentFramework::FileServiceRegistryAdapter::Get
ServiceEndpoint Get(const std::string &comp_name, const std::string &service_name) override
Get endpoint of specific service of a specific component.
Definition: fileServiceRegistryAdapter.cpp:37
rtctk::componentFramework::DataPointPath
This class provides a wrapper for a data point path.
Definition: dataPointPath.hpp:65
rtctk::componentFramework::FileServiceRegistryAdapter::ListComponents
std::vector< std::string > ListComponents() override
Get known components.
Definition: fileServiceRegistryAdapter.cpp:69
rtctk::componentFramework::FileServiceRegistryAdapter::GetPersistentRepoEndpoint
ServiceEndpoint GetPersistentRepoEndpoint() override
Get the Persistent Repository Endpoint from the service registry.
Definition: fileServiceRegistryAdapter.cpp:88