RTC Toolkit 4.0.1
Loading...
Searching...
No Matches
runtimeRepoAdapter.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_COMPONENTFRAMEWORK_RUNTIMEREPOADAPTER_HPP
14#define RTCTK_COMPONENTFRAMEWORK_RUNTIMEREPOADAPTER_HPP
15
18
20
27public:
28 inline static const std::string SUPPORTED_URI_SCHEME = "cii.oldb";
29
32
35
38
41
44
51 explicit RuntimeRepoAdapter(const elt::mal::Uri& baseuri);
52
60 explicit RuntimeRepoAdapter(const elt::mal::Uri& baseuri,
61 const std::shared_ptr<elt::oldb::CiiOldb>& oldb);
62 virtual ~RuntimeRepoAdapter() = default;
63
65
82 void CreateDataPoint(const DataPointPath& path, const std::type_info& type) override;
83
84 void CreateDataPoint(const DataPointPath& path,
85 const std::type_info& type,
86 const std::string& server_alias) override;
87
88 std::string GetServerAlias(const DataPointPath& path) const override;
89
102 static void InitMetadata();
103
104private:
109 static const std::map<std::type_index, std::string> S_METADATA_INSTANCE_MAP;
110
115 static const std::map<std::string, const std::type_info&> S_TYPE_INFO_MAP;
116};
117
118} // namespace rtctk::componentFramework
119
120#endif // RTCTK_COMPONENTFRAMEWORK_RUNTIMEREPOADAPTER_HPP
This class provides a wrapper for a data point path.
Definition: dataPointPath.hpp:73
Provides access to the OLDB to read and write datapoints.
Definition: oldbAdapter.hpp:38
Implementation of the Runtime Configuration Repository backed by the OLDB.
Definition: runtimeRepoAdapter.hpp:26
static void InitMetadata()
Initialises the type metadata in the CII configuration service for the Runtime Configuration Reposito...
Definition: runtimeRepoAdapter.cpp:89
RuntimeRepoAdapter(RuntimeRepoAdapter &&)=default
Objects of this class can be moved.
RuntimeRepoAdapter & operator=(RuntimeRepoAdapter &&)=default
Objects of this class can be moved with the move assignment operator.
RuntimeRepoAdapter()=delete
Do not allow construction with no arguments.
RuntimeRepoAdapter & operator=(const RuntimeRepoAdapter &)=delete
This class cannot be copy assigned.
RuntimeRepoAdapter(const RuntimeRepoAdapter &)=delete
This class cannot be copy constructed.
std::string GetServerAlias(const DataPointPath &path) const override
Fetches the server alias for a specific datapoint.
Definition: runtimeRepoAdapter.cpp:78
static const std::string SUPPORTED_URI_SCHEME
Definition: runtimeRepoAdapter.hpp:28
void CreateDataPoint(const DataPointPath &path, const std::type_info &type) override
Creates a new datapoint in the currently set external Redis server.
Definition: runtimeRepoAdapter.cpp:53
Base interface for all Runtime Configuration Repository adapters.
Definition: runtimeRepoIf.hpp:28
virtual void CreateDataPoint(const DataPointPath &path, const std::type_info &type, const std::string &server_alias)=0
Creates a new datapoint in the repository with a specified type on a particular external Redis server...
Definition: commandReplier.cpp:22
Header file needed to instantiate a OldbAdapter.
Header file for RuntimeRepoIf, which defines the API for RuntimeRepoAdapters.