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