1#ifndef IV_SRC_MIMICS_MODEL_ELEMENTSAUTOMATED_VALVEAUTOMATED_HPP_
2#define IV_SRC_MIMICS_MODEL_ELEMENTSAUTOMATED_VALVEAUTOMATED_HPP_
32 void getChannels(
const std::shared_ptr<std::vector<std::weak_ptr<iv::channels::AbstractChannel>>>
33 &channelsInControl)
const override;
34 void mapChannels(
const std::function<
void(std::weak_ptr<iv::channels::AbstractChannel> &)> &mapFunction)
override;
35 [[nodiscard]] std::shared_ptr<iv::mimics::AbstractMimicElement>
clone()
const override;
40 [[nodiscard]] std::optional<iv::mimics::eAlarmState>
getAlarmState()
const override;
44 std::optional<iv::types::color> colorControlState,
iv::eLanguage drawingLanguage)
override;
48 void addOptionsMenu(
const std::shared_ptr<iv::mimics::MimicControlMenu> &menu)
override;
58 bool hasRepeatedChannels(
const std::unordered_set<iv::types::channelId> &channelsRepeatedOpt)
const override;
60 isRepeatedMimicElement(
const std::set<std::shared_ptr<AbstractMimicElement>> &otherMimicsElements)
const override;
63 bool addOnlineVariables(
const std::optional<iv::types::control::valve::valveId> &newValveId)
const;
72 std::weak_ptr<iv::model::control::Valve>
m_valve;
89 static constexpr std::string
string {};
103 static constexpr std::string_view
valve {
"Valve"};
108 static constexpr std::string_view
valve {
"Valve"};
112 static constexpr std::string_view
orderOpCl {
"OrderOpCl"};
114 static constexpr std::string_view
tripReset {
"TripReset"};
Definition AbstractComponentGUI.hpp:30
Definition CDialog.hpp:21
Definition IGraphics.hpp:20
Definition xmlFile.hpp:15
Definition AbstractMimicElement.hpp:21
Definition ValveAutomated.hpp:23
std::optional< iv::types::color > getColorWorkingState() const override
Retrieves the color representing the current working state of the element.
Definition ValveAutomated.cpp:214
void addOptionsMenu(const std::shared_ptr< iv::mimics::MimicControlMenu > &menu) override
Definition ValveAutomated.cpp:459
bool checkIntegrity() const override
Definition ValveAutomated.cpp:118
virtual void prvDrawNormalValve(iv::types::color colorState, IGraphics *graphics) const
Definition ValveAutomated.cpp:339
AbstractComponentGUI * panelEditControl() override
UI methods ///.
Definition ValveAutomated.cpp:369
std::optional< std::string > getStringWorkingState() const override
Definition ValveAutomated.cpp:250
std::weak_ptr< iv::model::control::Valve > m_valve
Definition ValveAutomated.hpp:72
~ValveAutomated() override=default
void drawSpecific(IGraphics *graphics, std::optional< iv::types::color > colorWorkingState, std::optional< iv::types::color > colorControlState, iv::eLanguage drawingLanguage) override
Draws the specific abstract element shape.
Definition ValveAutomated.cpp:262
void mapChannels(const std::function< void(std::weak_ptr< iv::channels::AbstractChannel > &)> &mapFunction) override
Processed gets ///.
Definition ValveAutomated.cpp:104
virtual void prvDrawMechanicalValve(iv::types::color colorState, IGraphics *graphics) const
Definition ValveAutomated.cpp:288
std::unique_ptr< CDrawText > m_textStateOpt
Definition ValveAutomated.hpp:66
ValveAutomated()
Definition ValveAutomated.cpp:20
bool addOnlineVariables(const std::optional< iv::types::control::valve::valveId > &newValveId) const
Definition ValveAutomated.cpp:180
bool save(iv::file::xml::node &nodeControlMimic) const override
Definition ValveAutomated.cpp:62
bool isRepeatedMimicElement(const std::set< std::shared_ptr< AbstractMimicElement > > &otherMimicsElements) const override
Determines whether the current mimic element shares significant similarities with others.
Definition ValveAutomated.cpp:128
void getChannels(const std::shared_ptr< std::vector< std::weak_ptr< iv::channels::AbstractChannel > > > &channelsInControl) const override
Añade los canales que el MimicElement tiene enlazado.
Definition ValveAutomated.cpp:82
bool canShowCircularMenu() const override
Behaviours gets ///.
Definition ValveAutomated.cpp:516
iv::mimics::elements::eValveDesign m_valveDesign
Definition ValveAutomated.hpp:70
bool removePreviousOnlineVariables(const std::optional< iv::types::control::valve::valveId > &previousValveId) const
Definition ValveAutomated.cpp:153
void updateValveTraits()
Update the valve traits channels with the current valve channels.
Definition ValveAutomated.cpp:692
void executeCommand(const std::string &strAction) const override
Run actions ///.
Definition ValveAutomated.cpp:114
std::shared_ptr< iv::mimics::AbstractMimicElement > clone() const override
Definition ValveAutomated.cpp:108
std::optional< iv::mimics::eAlarmState > getAlarmState() const override
Definition ValveAutomated.cpp:257
bool hasAlternativeAction() const override
Definition ValveAutomated.cpp:521
iv::mimics::support::Maintenance m_maintenance
Definition ValveAutomated.hpp:71
bool hasRepeatedChannels(const std::unordered_set< iv::types::channelId > &channelsRepeatedOpt) const override
Checks if the current mimic element contains any repeated channels.
Definition ValveAutomated.cpp:123
void runAlternativeAction(CDialog *dlgFatherRef) override
Ejecuta código específico del control.
Definition ValveAutomated.cpp:543
bool load(const iv::file::xml::node &nodeControlMimic) override
Definition ValveAutomated.cpp:38
Definition Maintenance.hpp:11
Definition CommandsOpCl.hpp:12
Definition ControlLock.hpp:11
Definition FeedbackOpCl.hpp:12
Definition OrderOpCl.hpp:12
Definition TripReset.hpp:12
constexpr iv::types::color SedniElementNotWorkingWhite
Definition color.hpp:340
constexpr iv::types::color SedniElementWorkingGreen
Definition color.hpp:337
constexpr iv::types::color White
Definition color.hpp:222
constexpr iv::types::color SedniElementOfflineGrey
Definition color.hpp:346
constexpr iv::types::color SedniElementUndefined
Definition color.hpp:344
Definition DamperAutomated.cpp:17
eValveDesign
Definition enums.hpp:114
double width
Definition types.hpp:23
uint32_t color
Definition types.hpp:12
eLanguage
Definition enums.hpp:37
Definition ValveAutomated.hpp:82
static constexpr iv::types::width locaSquareLineMaxWidth
Definition ValveAutomated.hpp:85
static constexpr iv::types::width locaSquareLineMinWidth
Definition ValveAutomated.hpp:84
static constexpr double locaSquareLineWidthProportion
Definition ValveAutomated.hpp:83
Definition ValveAutomated.hpp:92
static constexpr iv::types::color workingStateOffline
Definition ValveAutomated.hpp:98
static constexpr iv::types::color color
Definition ValveAutomated.hpp:93
static constexpr iv::types::color workingStateOpen
Definition ValveAutomated.hpp:95
static constexpr iv::types::color workingStateUndefined
Definition ValveAutomated.hpp:97
static constexpr iv::types::color workingStateClose
Definition ValveAutomated.hpp:96
Definition ValveAutomated.hpp:88
static constexpr iv::mimics::elements::eValveDesign valveDesign
Definition ValveAutomated.hpp:90
Definition ValveAutomated.hpp:102
static constexpr std::string_view valve
Definition ValveAutomated.hpp:103
static constexpr std::string_view valveDesign
Definition ValveAutomated.hpp:104
Definition ValveAutomated.hpp:107
static constexpr std::string_view remoteLocal
Definition ValveAutomated.hpp:113
static constexpr std::string_view orderOpCl
Definition ValveAutomated.hpp:112
static constexpr std::string_view controlLock
Definition ValveAutomated.hpp:115
static constexpr std::string_view commandsOpCl
Definition ValveAutomated.hpp:111
static constexpr std::string_view tripReset
Definition ValveAutomated.hpp:114
static constexpr std::string_view feedbackOpCl
Definition ValveAutomated.hpp:110
static constexpr std::string_view maintenance
Definition ValveAutomated.hpp:109
static constexpr std::string_view valve
Definition ValveAutomated.hpp:108