RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
runtimeRepoIf.hpp
Go to the documentation of this file.
1
13#ifndef RTCTK_COMPONENTFRAMEWORK_RUNTIMEREPOIF_HPP
14#define RTCTK_COMPONENTFRAMEWORK_RUNTIMEREPOIF_HPP
15
17
18#include <mutex>
19
21
28public:
36 using AdapterIdType = elt::mal::Uri;
37
38 virtual ~RuntimeRepoIf() = default;
39
63 static std::unique_ptr<RuntimeRepoIf> CreateAdapter(const elt::mal::Uri& uri);
64
74 [[deprecated]] std::string GetDefaultServerAlias() const;
75
91 [[deprecated]] void SetDefaultServerAlias(const std::string& server_alias);
92
111 [[deprecated]] virtual void CreateDataPoint(const DataPointPath& path,
112 const std::type_info& type,
113 const std::string& server_alias);
114
115 using RepositoryIf::CreateDataPoint;
116
136 template <typename T>
137 [[deprecated]] void CreateDataPoint(const DataPointPath& path,
138 const T default_value,
139 const std::string& server_alias);
140
151 [[deprecated]] virtual std::string GetServerAlias(const DataPointPath& path) const;
152
153private:
161 mutable std::mutex m_mutex;
162
164 std::string m_server_alias;
165};
166
167#pragma GCC diagnostic push
168#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
169
170template <typename T>
172 const T default_value,
173 const std::string& server_alias) {
174 CreateDataPoint(path, typeid(T), server_alias);
176}
177
178#pragma GCC diagnostic pop
179
180} // namespace rtctk::componentFramework
181
182#endif // RTCTK_COMPONENTFRAMEWORK_RUNTIMEREPOIF_HPP
This class provides a wrapper for a data point path.
Definition dataPointPath.hpp:74
void SetDataPoint(const DataPointPath &path, const T &value)
Sets a datapoint in the repository.
Definition repositoryIf.ipp:1720
Abstract interface providing I/O and additional subscription facilities for a repository.
Definition repositorySubscriberIf.hpp:27
Base interface for all Runtime Configuration Repository adapters.
Definition runtimeRepoIf.hpp:27
elt::mal::Uri AdapterIdType
The type used to distinguish between different adapters implementing RuntimeRepoIf.
Definition runtimeRepoIf.hpp:36
virtual void CreateDataPoint(const DataPointPath &path, const std::type_info &type, const std::string &server_alias)
Creates a new datapoint in the repository with a specified type on a particular external Redis server...
Definition runtimeRepoIf.cpp:37
#define RTCTK_API
Helper to indicate that a class or function must be exported in the public symbol table.
Definition config.hpp:33
Definition commandReplier.cpp:22
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Header file for RepositorySubscriberIf and related base classes.