hlcc 2.0.0-beta2+pre1
Loading...
Searching...
No Matches
ciiOldbMux.hpp
Go to the documentation of this file.
1#ifndef HLCC_OLDBMUX_CIIOLDBMUX_HPP_
2#define HLCC_OLDBMUX_CIIOLDBMUX_HPP_
3
4#include <ciiOldb.hpp>
5#include <ciiOldbFactory.hpp>
6#include <ciiOldbDataPoint.hpp>
8
9#include <memory> // shared_ptr
10#include <cstddef>
11#include <vector>
12#include <mal/utility/Uri.hpp>
13
14#include <ciiLogManager.hpp>
15
16namespace hlcc::oldbmux {
17
18
25
26public:
27
28template<typename T>
29std::shared_ptr<CiiOldbDataPointMux<T>> GetDataPoint(const ::elt::mal::Uri& uri_main_dp) const;
30
31protected:
32 log4cplus::Logger logger = elt::log::CiiLogManager::GetLogger();
33
34};
35
36
37template<typename T>
38std::shared_ptr<CiiOldbDataPointMux<T>> CiiOldbMux::GetDataPoint(const ::elt::mal::Uri& uri_main_dp) const {
39
40 auto oldb = ::elt::oldb::CiiOldbFactory::GetInstance();
41
42 std::shared_ptr<::elt::oldb::CiiOldbDataPoint<T>> main_dp =
43 oldb->GetDataPoint<T>(uri_main_dp);
44
45 // create on heap (but it's not called "heap" in c++)
46 CiiOldbDataPointMux<T> *dp_mux = new CiiOldbDataPointMux<T> { main_dp };
47
48 //logger.log(log4cplus::INFO_LOG_LEVEL, "created dp mux");
49 return std::shared_ptr<CiiOldbDataPointMux<T>>(dp_mux);
50}
51
52}
53
54#endif
CiiOldbDataPointMux is a wrapper for multiple CiiOldbDataPoints, to allow writing changes (to value,...
Definition: ciiOldbDataPointMux.hpp:36
Definition: ciiOldbMux.hpp:24
std::shared_ptr< CiiOldbDataPointMux< T > > GetDataPoint(const ::elt::mal::Uri &uri_main_dp) const
Definition: ciiOldbMux.hpp:38
log4cplus::Logger logger
Definition: ciiOldbMux.hpp:32
Definition: ciiOldbDataPointAsync.hpp:30