RTC Toolkit 4.0.1
Loading...
Searching...
No Matches
fileServiceRegistryAdapter.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERYFILEADAPTER_HPP
14#define RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERYFILEADAPTER_HPP
15
16#include <memory>
17#include <string>
18
19#include <mal/Cii.hpp>
20
24
26
36public:
37 inline static const std::string SUPPORTED_URI_SCHEME = "file";
38
39 FileServiceRegistryAdapter(const elt::mal::Uri& endpoint);
40 std::vector<std::string> ListComponents() override;
41 ServiceEndpoint Get(const std::string& comp_name,
42 const std::string& service_name,
43 const bool health_check) override;
47
48private:
49 static const std::string RUNTIME_REPO_ENDPOINT;
50 static const std::string PERSISTENT_REPO_ENDPOINT;
51 static const std::string OLDB_ENDPOINT;
52 DataPointPath CalcDatapointUri(const std::string& comp_name, const std::string& service_name);
53 std::unique_ptr<FileRepository> m_service_registry;
54 elt::mal::Uri sde;
55};
56
57} // namespace rtctk::componentFramework
58
59#endif // RTCTK_COMPONENTFRAMEWORK_SERVICEDISCOVERYFILEADAPTER_HPP
This class provides a wrapper for a data point path.
Definition: dataPointPath.hpp:73
Class that implements a very basic service discovery mechanism using a file.
Definition: fileServiceRegistryAdapter.hpp:35
std::vector< std::string > ListComponents() override
Get known components.
Definition: fileServiceRegistryAdapter.cpp:72
ServiceEndpoint GetOldbEndpoint() override
Get the Oldb Endpoint from the service registry.
Definition: fileServiceRegistryAdapter.cpp:83
ServiceEndpoint Get(const std::string &comp_name, const std::string &service_name, const bool health_check) override
Get endpoint of specific service of a specific component.
Definition: fileServiceRegistryAdapter.cpp:39
static const std::string SUPPORTED_URI_SCHEME
Definition: fileServiceRegistryAdapter.hpp:37
ServiceEndpoint GetPersistentRepoEndpoint() override
Get the Persistent Repository Endpoint from the service registry.
Definition: fileServiceRegistryAdapter.cpp:92
ServiceEndpoint GetRuntimeRepoEndpoint() override
Get the Runtime Repository Endpoint from the service registry.
Definition: fileServiceRegistryAdapter.cpp:87
Class that implements a service registry to be used by the service discovery.
Definition: serviceRegistryIf.hpp:31
elt::mal::Uri ServiceEndpoint
Definition: serviceRegistryIf.hpp:43
Header file for DataPointPath.
Declaration of FileRepository that provides a simple file based repository.
Definition: commandReplier.cpp:22
Class that implements the service registry interface.