Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
LogicComponentBroadCastChannel.hpp
Go to the documentation of this file.
1#ifndef IV_LOGIC_COMPONENTS_LOGICCOMPONENTBROADCASTCHANNEL_HPP
2#define IV_LOGIC_COMPONENTS_LOGICCOMPONENTBROADCASTCHANNEL_HPP
3
5
6#include <optional>
7
9{
10public:
12 std::optional<iv::types::unitId> unitId);
14 const std::string &name, std::optional<iv::types::unitId> unitId);
15
16 ~LogicComponentBroadCastChannel() override = default;
17
18 iv::file::xml::node read(const iv::file::xml::node &node) override;
19 iv::file::xml::node save(iv::file::xml::node &node) const override;
20
21 [[nodiscard]] std::string maxText() const override;
22 [[nodiscard]] std::string getDescriptiveText() const override;
23
24 [[nodiscard]] uint32_t firmwareValue() const;
26 [[nodiscard]] std::string constantLogicStateToConstantFirmwareString() const;
27
28 [[nodiscard]] std::string toString() const;
29
31
32 uint32_t indexArea() const;
33 void setIndexArea(uint32_t indexArea);
34
35 struct Constants
36 {
37 static constexpr uint32_t baseBroadCastDirection {768};
39 static constexpr uint32_t numBroadCastChannelTypes {4};//NewAlarm, SoundOff, Ack, DeadMan
40 static constexpr uint32_t minIndexArea {1};
41 static constexpr uint32_t maxIndexArea {5};
42
43 static constexpr std::string_view firmwareNewAlarm {"BCC_NEW_ALARM"};
44 static constexpr std::string_view firmwareSoundOff {"BCC_SOUND_OFF"};
45 static constexpr std::string_view firmwareAck {"BCC_ACK"};
46 static constexpr std::string_view firmwareDeadMan {"BCC_DEADMAN"};
47 };
48
49private:
50 uint32_t m_indexArea;// From 1 to 5
51 std::optional<iv::types::unitId> m_unitId;
52
53 struct Sections
54 {
55 static constexpr std::string_view broadCastChannelData {"BoardCastChannelData"};
56 };
57 struct Keys
58 {
59 static constexpr std::string_view broadCastChannelType {"BoardCastChannelType"};
60 static constexpr std::string_view indexArea {"IndexArea"};
61 };
63 {
64 static constexpr std::string string {};
66 static constexpr uint32_t indexArea {1};
67 };
68};
69
70#endif//IV_LOGIC_COMPONENTS_LOGICCOMPONENTBROADCASTCHANNEL_HPP
uint32_t TId
Definition AbstractCanvasItem.hpp:47
Definition CLogicsComponentOthers.hpp:12
Definition LogicComponentBroadCastChannel.hpp:9
iv::file::xml::node read(const iv::file::xml::node &node) override
Definition LogicComponentBroadCastChannel.cpp:28
std::optional< iv::types::unitId > m_unitId
Definition LogicComponentBroadCastChannel.hpp:51
iv::types::logic::channelGlobalId getChannelId() const
Definition LogicComponentBroadCastChannel.cpp:76
uint32_t m_indexArea
Definition LogicComponentBroadCastChannel.hpp:50
iv::file::xml::node save(iv::file::xml::node &node) const override
Definition LogicComponentBroadCastChannel.cpp:41
void setIndexArea(uint32_t indexArea)
Definition LogicComponentBroadCastChannel.cpp:118
~LogicComponentBroadCastChannel() override=default
std::string getDescriptiveText() const override
Definition LogicComponentBroadCastChannel.cpp:60
uint32_t indexArea() const
Definition LogicComponentBroadCastChannel.cpp:113
LogicComponentBroadCastChannel(const iv::types::logic::ComponentType &componentType, std::optional< iv::types::unitId > unitId)
Definition LogicComponentBroadCastChannel.cpp:8
iv::logic::eBroadCastChannelType m_broadCastChannelType
Definition LogicComponentBroadCastChannel.hpp:30
std::string toString() const
Definition LogicComponentBroadCastChannel.cpp:108
uint32_t firmwareValue() const
Definition LogicComponentBroadCastChannel.cpp:65
std::string maxText() const override
Definition LogicComponentBroadCastChannel.cpp:52
std::string constantLogicStateToConstantFirmwareString() const
Definition LogicComponentBroadCastChannel.cpp:82
Definition xmlFile.hpp:15
eBroadCastChannelType
Definition enums.hpp:52
uint32_t channelGlobalId
Definition types.hpp:127
Definition LogicComponentBroadCastChannel.hpp:36
static constexpr std::string_view firmwareSoundOff
Definition LogicComponentBroadCastChannel.hpp:44
static constexpr std::string_view firmwareDeadMan
Definition LogicComponentBroadCastChannel.hpp:46
static constexpr iv::types::logic::channelGlobalId baseChannelGlobalId
Definition LogicComponentBroadCastChannel.hpp:38
static constexpr std::string_view firmwareAck
Definition LogicComponentBroadCastChannel.hpp:45
static constexpr uint32_t maxIndexArea
Definition LogicComponentBroadCastChannel.hpp:41
static constexpr std::string_view firmwareNewAlarm
Definition LogicComponentBroadCastChannel.hpp:43
static constexpr uint32_t numBroadCastChannelTypes
Definition LogicComponentBroadCastChannel.hpp:39
static constexpr uint32_t minIndexArea
Definition LogicComponentBroadCastChannel.hpp:40
static constexpr uint32_t baseBroadCastDirection
Definition LogicComponentBroadCastChannel.hpp:37
Definition LogicComponentBroadCastChannel.hpp:63
static constexpr auto broadCastChannelType
Definition LogicComponentBroadCastChannel.hpp:65
static constexpr uint32_t indexArea
Definition LogicComponentBroadCastChannel.hpp:66
Definition LogicComponentBroadCastChannel.hpp:58
static constexpr std::string_view broadCastChannelType
Definition LogicComponentBroadCastChannel.hpp:59
static constexpr std::string_view indexArea
Definition LogicComponentBroadCastChannel.hpp:60
Definition LogicComponentBroadCastChannel.hpp:54
static constexpr std::string_view broadCastChannelData
Definition LogicComponentBroadCastChannel.hpp:55
Tuple containing the type of logic component (logic blocks, library blocks & others blocks).
Definition types.hpp:22