Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
Generator.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_MODEL_PMS_GENERATOR_HPP_
2#define IV_SRC_MODEL_PMS_GENERATOR_HPP_
3
4#include "core/types.hpp"
6#include "model/pms/enums.hpp"
8
9namespace iv::model::pms
10{
11
13{
14public:
15 Generator();
16 ~Generator() = default;
17
18 bool load(const iv::file::xml::node &nodeGenerator);
19 bool save(iv::file::xml::node &nodeGenerator) const;
20 [[nodiscard]] std::shared_ptr<iv::model::pms::AllGeneratorChannels> getAllChannels() const;
21 [[nodiscard]] std::set<iv::model::pms::eGenCmdActionType> getAvailableActionTypes() const;
22
30
34private:
35 std::shared_ptr<iv::model::pms::AllGeneratorChannels> m_allGeneratorChannels;
37 struct Keys
38 {
39 static constexpr std::string_view generatorId {"GeneratorId"};
40 static constexpr std::string_view breakerId {"BreakerId"};
41 static constexpr std::string_view genBarId {"GenBarId"};
42 static constexpr std::string_view name {"Name"};
43 static constexpr std::string_view type {"Type"};
44 static constexpr std::string_view lomId {"LomId"};
45 static constexpr std::string_view mainBarId {"MainBarId"};
46 static constexpr std::string_view ratedPower {"RatedPower"};
47 };
49 {
50 static constexpr std::string string {};
51 static constexpr iv::types::pms::elementId id {0};
52 static constexpr iv::types::unitId lomId {0};
54 static constexpr uint16_t ratedPower {0};
55 };
56};
57
58}// namespace iv::model::pms
59
60#endif//IV_SRC_MODEL_PMS_GENERATOR_HPP_
Definition xmlFile.hpp:15
Definition Generator.hpp:13
uint32_t m_ratedPower
Definition Generator.hpp:29
iv::types::unitId m_lomId
Definition Generator.hpp:28
iv::model::pms::eGeneratorType m_genType
Definition Generator.hpp:27
std::set< iv::model::pms::eGenCmdActionType > getAvailableActionTypes() const
Definition Generator.cpp:50
iv::types::pms::elementId m_genBarId
Definition Generator.hpp:25
std::shared_ptr< iv::model::pms::AllGeneratorChannels > m_allGeneratorChannels
Definition Generator.hpp:35
std::string m_name
Definition Generator.hpp:26
iv::types::pms::elementId m_breakerId
Definition Generator.hpp:24
bool load(const iv::file::xml::node &nodeGenerator)
Definition Generator.cpp:12
bool save(iv::file::xml::node &nodeGenerator) const
Definition Generator.cpp:30
Generator()
Definition Generator.cpp:7
std::shared_ptr< iv::model::pms::AllGeneratorChannels > getAllChannels() const
Definition Generator.cpp:45
iv::types::pms::elementId m_generatorId
Definition Generator.hpp:23
iv::types::pms::elementId m_mainBarId
Definition Generator.hpp:32
Definition AbstractPmsAction.cpp:9
eGeneratorType
Definition enums.hpp:8
uint16_t elementId
Definition types.hpp:96
uint16_t unitId
Definition types.hpp:77
Definition Generator.hpp:49
static constexpr uint16_t ratedPower
Definition Generator.hpp:54
static constexpr std::string string
Definition Generator.hpp:50
static constexpr iv::types::unitId lomId
Definition Generator.hpp:52
static constexpr iv::types::pms::elementId id
Definition Generator.hpp:51
static constexpr iv::model::pms::eGeneratorType genType
Definition Generator.hpp:53
Definition Generator.hpp:38
static constexpr std::string_view generatorId
Definition Generator.hpp:39
static constexpr std::string_view breakerId
Definition Generator.hpp:40
static constexpr std::string_view lomId
Definition Generator.hpp:44
static constexpr std::string_view type
Definition Generator.hpp:43
static constexpr std::string_view name
Definition Generator.hpp:42
static constexpr std::string_view ratedPower
Definition Generator.hpp:46
static constexpr std::string_view genBarId
Definition Generator.hpp:41
static constexpr std::string_view mainBarId
Definition Generator.hpp:45