ifw-slm 0.1.2
 
Loading...
Searching...
No Matches
oldbInterface.hpp
Go to the documentation of this file.
1
9#ifndef IFWSLM_OLDB_INTERFACE_HPP
10#define IFWSLM_OLDB_INTERFACE_HPP
11
12#include <rad/cii/oldbAdapter.hpp>
13#include <rad/oldbInterface.hpp>
14#include <rad/config.hpp>
15
16#include <string>
17#include <vector>
18
19namespace ifw::slm {
20
21/*
22 * Application OLDB Attributes.
23 */
24
25/*
26 * Secondary Loop OLDB Attributes.
27 */
28const std::string KEY_SL_NUM_IN_USE = "config/SL_inUse";
29
37std::string GetLoopOldbKey(int loop_index, const std::string& param_name);
38
39class Config;
40
44class OldbInterface : public rad::OldbInterface {
45 public:
51 OldbInterface(const std::string& prefix = "");
52
56 virtual ~OldbInterface();
57
63 void SetNumSecondaryLoops(int num_loops);
64
70 void WriteSecondaryLoopConfig(const rad::Config& config);
71
77 void InitializeLoopRuntimeState(int loop_index);
78
88 template <typename T>
89 bool TrySetValue(const std::string& key, const T& value) {
90 return GetOldbAdapter().TrySet<T>(GetPrefix() + key, value);
91 }
92
93 OldbInterface(const OldbInterface&) = delete;
95
96};
97
98} // namespace ifw::slm
99
100#endif // IFWSLM_OLDB_INTERFACE_HPP
Definition config.hpp:48
OldbInterface(const OldbInterface &)=delete
void SetNumSecondaryLoops(int num_loops)
Definition oldbInterface.cpp:47
void WriteSecondaryLoopConfig(const rad::Config &config)
Definition oldbInterface.cpp:153
void InitializeLoopRuntimeState(int loop_index)
Definition oldbInterface.cpp:52
OldbInterface & operator=(const OldbInterface &)=delete
Disable copy constructor.
OldbInterface(const std::string &prefix="")
Definition oldbInterface.cpp:35
bool TrySetValue(const std::string &key, const T &value)
Definition oldbInterface.hpp:89
virtual ~OldbInterface()
Definition oldbInterface.cpp:43
Definition actionMgr.cpp:29
std::string GetLoopOldbKey(int loop_index, const std::string &param_name)
Definition oldbInterface.cpp:23
const std::string KEY_SL_NUM_IN_USE
Definition oldbInterface.hpp:28