Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
Channel.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MIMICS_CHANNEL_HPP_
2#define IV_SRC_MIMICS_CHANNEL_HPP_
3
5
6#include <functional>
7
8namespace iv::mimics
9{
10
12{
13public:
14 Channel();
15 Channel(const Channel &other) = default;
16 ~Channel() = default;
17
18 bool load(const iv::file::xml::node &nodeChannel);
19 bool save(iv::file::xml::node &nodeChannel) const;
20
21 [[nodiscard]] std::vector<std::weak_ptr<iv::channels::AbstractChannel>> getChannels() const;
22 void mapChannels(const std::function<void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction);
23
24 std::shared_ptr<iv::channels::AbstractChannel> getChannelActive() const;
25
29
30 //TODO: [IV_MODEL] AƱadidos para compilar, estudiar que hacer con ellos
31 void getLevelsAnalogValue(double *LEL, double *HEL);
32 [[nodiscard]] std::string getTagChannelMimic() const;
33
34private:
35 struct Keys
36 {
37 static constexpr std::string_view withBackup {"WithBackup"};
38 };
40 {
41 static constexpr bool withBackup {false};
42 };
43 struct Sections
44 {
45 static constexpr std::string_view main {"Main"};
46 static constexpr std::string_view backup {"Backup"};
47 };
48};
49
50}// namespace iv::mimics
51
52#endif//IV_SRC_MIMICS_CHANNEL_HPP_
Definition xmlFile.hpp:15
Definition ChannelInterface.hpp:16
Definition Channel.hpp:12
std::string getTagChannelMimic() const
Definition Channel.cpp:87
void getLevelsAnalogValue(double *LEL, double *HEL)
Definition Channel.cpp:82
std::shared_ptr< iv::channels::AbstractChannel > getChannelActive() const
Definition Channel.cpp:68
std::vector< std::weak_ptr< iv::channels::AbstractChannel > > getChannels() const
Definition Channel.cpp:40
Channel(const Channel &other)=default
Channel()
Definition Channel.cpp:8
bool load(const iv::file::xml::node &nodeChannel)
Definition Channel.cpp:12
bool m_withBackup
Definition Channel.hpp:26
bool save(iv::file::xml::node &nodeChannel) const
Definition Channel.cpp:26
void mapChannels(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction)
Definition Channel.cpp:56
iv::mimics::ChannelInterface m_main
Definition Channel.hpp:27
iv::mimics::ChannelInterface m_backup
Definition Channel.hpp:28
Definition GeneratorPmsBuilders.cpp:9
Definition Channel.hpp:40
static constexpr bool withBackup
Definition Channel.hpp:41
Definition Channel.hpp:36
static constexpr std::string_view withBackup
Definition Channel.hpp:37
Definition Channel.hpp:44
static constexpr std::string_view backup
Definition Channel.hpp:46
static constexpr std::string_view main
Definition Channel.hpp:45