Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
Digital_1_0.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MIMICS_RETRO_ELEMENTS_DIGITAL_1_0_HPP_
2#define IV_SRC_MIMICS_RETRO_ELEMENTS_DIGITAL_1_0_HPP_
3
4#include "mimics/enums.hpp"
8
9namespace iv::mimics::retro
10{
11
13{
14public:
16 ~Digital_1_0() override = default;
17
18 bool load(const iv::file::xml::node &nodeControlMimic) override;
19 bool save(iv::file::xml::node &nodeControlMimic) const override;
20 [[nodiscard]] iv::mimics::retro::stringMimicElementType getElementType() const override;
21
22 [[nodiscard]] std::shared_ptr<AbstractRetroMimicElement> toNextVersion() const override;
23 [[nodiscard]] std::shared_ptr<iv::mimics::AbstractMimicElement> toMimicElement() const override;
24
25 // iv::mimics::AbstractMimicElement
28
31
34 std::shared_ptr<OnlineVariables> m_onlineVariables;
35
36 std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>> m_addedAlarms;
37
38 // iv::mimics::Digital
45
46 // Visualization
53
54 struct Keys
55 {
56 // Abstract Mimic Element
57 static constexpr std::string_view mimicElementType {"Type"};
58 static constexpr std::string_view width {"Width"};
59 static constexpr std::string_view height {"Height"};
60 static constexpr std::string_view addedChannelId {"AddedChannelId"};
61
62 // Digital
63 static constexpr std::string_view withFeedbackOpen {"WithFeedbackOpen"};
64 static constexpr std::string_view activationMode {"ActivationMode"};
65 static constexpr std::string_view activationValue {"ActivationValue"};
66 static constexpr std::string_view isSemiautomatic {"IsSemiautomatic"};
67
68 // Digital Indicator
69 static constexpr std::string_view textHeight {"TextHeight"};
70 static constexpr std::string_view ledType {"LedType"};
71 static constexpr std::string_view activeLedColor {"OpenLedColor"};
72 static constexpr std::string_view inactiveLedColor {"CloseLedColor"};
73 };
75 {
76 // Abstract Mimic Element
77 static constexpr std::string string {};
78 static constexpr std::string mimicElementType = {"Digital"};
79 static constexpr iv::types::width width {50};
80 static constexpr iv::types::height height {50};
81
82 // Digital
83 static constexpr bool withFeedbackOpen {false};
85 static constexpr bool activationValue {true};
86
87 // Digital Indicator
88 static constexpr iv::types::height textHeight {16};
92 };
93 struct Sections
94 {
95 // Abstract Mimic Element
96 static constexpr std::string_view titleSettings {"TitleSettings"};
97 static constexpr std::string_view location {"Location"};
98 static constexpr std::string_view onlineVariables {"OnlineVariables"};
99 static constexpr std::string_view addedAlarms {"AddedAlarms"};
100 static constexpr std::string_view addedChannel {"AddedChannel"};
101
102 // Digital
103 static constexpr std::string_view digital {"Digital"};
104 static constexpr std::string_view maintenance {"Maintenance"};
105 static constexpr std::string_view closeFeedback {"CloseFeedback"};
106 static constexpr std::string_view openFeedback {"OpenFeedback"};
107
108 // Digital Indicator
109 static constexpr std::string_view digitalIndicator {"DigitalIndicator"};
110 static constexpr std::string_view activeTexts {"OpenTexts"};
111 static constexpr std::string_view activeText {"OpenText"};
112 static constexpr std::string_view inactiveTexts {"CloseTexts"};
113 static constexpr std::string_view inactiveText {"CloseText"};
114 static constexpr std::string_view attempt {"Attempt"};
115 static constexpr std::string_view rules {"Rules"};
116 };
117};
118
119}// namespace iv::mimics::retro
120
121#endif//IV_SRC_MIMICS_RETRO_ELEMENTS_DIGITAL_1_0_HPP_
Definition xmlFile.hpp:15
Definition Channel.hpp:12
Definition AbstractRetroMimicElement.hpp:12
Definition Digital_1_0.hpp:13
iv::mimics::eMimicElementType m_mimicElementType
Definition Digital_1_0.hpp:26
iv::types::width m_width
Definition Digital_1_0.hpp:29
iv::types::color m_activeLedColor
Definition Digital_1_0.hpp:49
iv::mimics::retro::stringMimicElementType getElementType() const override
Definition Digital_1_0.cpp:178
iv::model::LocalizedText m_inactiveText
Definition Digital_1_0.hpp:52
iv::mimics::elements::eActivationMode m_activationMode
Definition Digital_1_0.hpp:42
std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > m_addedAlarms
Definition Digital_1_0.hpp:36
Digital_1_0()
Definition Digital_1_0.cpp:10
~Digital_1_0() override=default
iv::types::height m_height
Definition Digital_1_0.hpp:30
iv::mimics::Location m_location
Definition Digital_1_0.hpp:27
iv::mimics::Channel m_openFeedback
Definition Digital_1_0.hpp:41
bool m_withFeedbackOpen
Definition Digital_1_0.hpp:40
bool load(const iv::file::xml::node &nodeControlMimic) override
Definition Digital_1_0.cpp:39
iv::mimics::TitleSettings m_titleSettings
Definition Digital_1_0.hpp:32
std::shared_ptr< iv::mimics::AbstractMimicElement > toMimicElement() const override
Definition Digital_1_0.cpp:188
iv::mimics::elements::eLedType m_ledType
Definition Digital_1_0.hpp:48
bool m_activationValue
Definition Digital_1_0.hpp:43
iv::types::color m_inactiveLedColor
Definition Digital_1_0.hpp:51
std::shared_ptr< AbstractRetroMimicElement > toNextVersion() const override
Definition Digital_1_0.cpp:183
std::shared_ptr< OnlineVariables > m_onlineVariables
Definition Digital_1_0.hpp:34
iv::model::LocalizedText m_activeText
Definition Digital_1_0.hpp:50
iv::types::height m_textHeight
Definition Digital_1_0.hpp:47
bool save(iv::file::xml::node &nodeControlMimic) const override
Definition Digital_1_0.cpp:118
iv::mimics::Background m_background
Definition Digital_1_0.hpp:33
iv::mimics::support::Maintenance m_maintenance
Definition Digital_1_0.hpp:44
iv::mimics::Channel m_closeFeedback
Definition Digital_1_0.hpp:39
Definition Maintenance.hpp:11
constexpr iv::types::color Red
Definition color.hpp:179
constexpr iv::types::color ControlClosed
Definition color.hpp:429
eLedType
Definition enums.hpp:164
eActivationMode
Definition enums.hpp:98
Definition AbstractRetroMimicElement.hpp:9
std::string stringMimicElementType
Definition types.hpp:9
eMimicElementType
Definition enums.hpp:8
double height
Definition types.hpp:14
double width
Definition types.hpp:23
uint32_t color
Definition types.hpp:12
Definition structs.hpp:176
Definition structs.hpp:15
Definition structs.hpp:67
static constexpr bool activationValue
Definition Digital_1_0.hpp:85
static constexpr auto ledType
Definition Digital_1_0.hpp:89
static constexpr iv::types::color activeLedColor
Definition Digital_1_0.hpp:90
static constexpr iv::types::height height
Definition Digital_1_0.hpp:80
static constexpr iv::types::height textHeight
Definition Digital_1_0.hpp:88
static constexpr auto activationMode
Definition Digital_1_0.hpp:84
static constexpr iv::types::color inactiveLedColor
Definition Digital_1_0.hpp:91
static constexpr std::string mimicElementType
Definition Digital_1_0.hpp:78
static constexpr iv::types::width width
Definition Digital_1_0.hpp:79
static constexpr bool withFeedbackOpen
Definition Digital_1_0.hpp:83
Definition Digital_1_0.hpp:55
static constexpr std::string_view isSemiautomatic
Definition Digital_1_0.hpp:66
static constexpr std::string_view height
Definition Digital_1_0.hpp:59
static constexpr std::string_view width
Definition Digital_1_0.hpp:58
static constexpr std::string_view textHeight
Definition Digital_1_0.hpp:69
static constexpr std::string_view inactiveLedColor
Definition Digital_1_0.hpp:72
static constexpr std::string_view mimicElementType
Definition Digital_1_0.hpp:57
static constexpr std::string_view activationMode
Definition Digital_1_0.hpp:64
static constexpr std::string_view ledType
Definition Digital_1_0.hpp:70
static constexpr std::string_view activeLedColor
Definition Digital_1_0.hpp:71
static constexpr std::string_view addedChannelId
Definition Digital_1_0.hpp:60
static constexpr std::string_view activationValue
Definition Digital_1_0.hpp:65
static constexpr std::string_view withFeedbackOpen
Definition Digital_1_0.hpp:63
Definition Digital_1_0.hpp:94
static constexpr std::string_view inactiveText
Definition Digital_1_0.hpp:113
static constexpr std::string_view maintenance
Definition Digital_1_0.hpp:104
static constexpr std::string_view onlineVariables
Definition Digital_1_0.hpp:98
static constexpr std::string_view titleSettings
Definition Digital_1_0.hpp:96
static constexpr std::string_view openFeedback
Definition Digital_1_0.hpp:106
static constexpr std::string_view closeFeedback
Definition Digital_1_0.hpp:105
static constexpr std::string_view activeTexts
Definition Digital_1_0.hpp:110
static constexpr std::string_view rules
Definition Digital_1_0.hpp:115
static constexpr std::string_view addedAlarms
Definition Digital_1_0.hpp:99
static constexpr std::string_view addedChannel
Definition Digital_1_0.hpp:100
static constexpr std::string_view location
Definition Digital_1_0.hpp:97
static constexpr std::string_view inactiveTexts
Definition Digital_1_0.hpp:112
static constexpr std::string_view digital
Definition Digital_1_0.hpp:103
static constexpr std::string_view digitalIndicator
Definition Digital_1_0.hpp:109
static constexpr std::string_view activeText
Definition Digital_1_0.hpp:111
static constexpr std::string_view attempt
Definition Digital_1_0.hpp:114
Definition structs.hpp:29