Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
Valve.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MODEL_CONTROLS_VALVE_HPP_
2#define IV_SRC_MODEL_CONTROLS_VALVE_HPP_
3
4#include "core/types.hpp"
8
9namespace iv::model::control
10{
11
12class Valve
13{
14public:
15 Valve();
16 ~Valve() = default;
17
18 bool load(const iv::file::xml::node &nodeValve);
19 bool save(iv::file::xml::node &nodeValve) const;
20
21 [[nodiscard]] std::shared_ptr<iv::model::control::valve::AllValveChannels> getAllChannels() const;
22
29
30 std::shared_ptr<iv::model::control::valve::AllValveChannels> m_allValveChannels;
31private:
32 struct Keys
33 {
34 static constexpr std::string_view valveSystem {"ValveSystem"};
35 static constexpr std::string_view valveOrder {"ValveOrder"};
36 static constexpr std::string_view valveType {"ValveType"};
37 static constexpr std::string_view lomId {"LomId"};
38 };
40 {
41 static constexpr std::string string {};
45 static constexpr iv::types::unitId lomId {0};
46 };
47};
48
49}// namespace iv::model::control
50
51#endif//IV_SRC_MODEL_CONTROLS_VALVE_HPP_
Definition xmlFile.hpp:15
Definition Valve.hpp:13
bool save(iv::file::xml::node &nodeValve) const
Definition Valve.cpp:29
Valve()
Definition Valve.cpp:8
iv::types::control::valve::valveId m_valveId
Definition Valve.hpp:23
std::shared_ptr< iv::model::control::valve::AllValveChannels > m_allValveChannels
Definition Valve.hpp:30
std::shared_ptr< iv::model::control::valve::AllValveChannels > getAllChannels() const
Definition Valve.cpp:40
iv::types::unitId m_lomId
Definition Valve.hpp:28
iv::model::control::valve::eValveType m_valveType
Definition Valve.hpp:27
bool load(const iv::file::xml::node &nodeValve)
Definition Valve.cpp:13
iv::types::control::valve::valveOrder m_valveOrder
Definition Valve.hpp:26
iv::model::control::valve::eValveSystem m_valveSystem
Definition Valve.hpp:25
eValveType
Definition enums.hpp:71
eValveSystem
Definition enums.hpp:21
Definition ControlManager.cpp:4
uint16_t valveOrder
Definition types.hpp:107
std::string valveId
Definition types.hpp:106
uint16_t unitId
Definition types.hpp:77
static constexpr iv::types::control::valve::valveOrder valveOrder
Definition Valve.hpp:43
static constexpr auto valveSystem
Definition Valve.hpp:42
static constexpr iv::types::unitId lomId
Definition Valve.hpp:45
static constexpr auto valveType
Definition Valve.hpp:44
Definition Valve.hpp:33
static constexpr std::string_view lomId
Definition Valve.hpp:37
static constexpr std::string_view valveType
Definition Valve.hpp:36
static constexpr std::string_view valveOrder
Definition Valve.hpp:35
static constexpr std::string_view valveSystem
Definition Valve.hpp:34