Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
structs.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_LOGIC_STRUCTS_HPP_
2#define IV_SRC_LOGIC_STRUCTS_HPP_
3
4#include "core/structs.hpp"
5#include "logic/defines.hpp"
6
7#include <atomic>
8#include <cstdint>
9#include <map>
10#include <memory>
11#include <optional>
12#include <string>
13#include <vector>
14
15namespace iv::logic
16{
17
18struct ParamId
19{
22
23 bool operator==(const ParamId &other) const = default;
24 bool operator<(const ParamId &other) const
25 {
26 return type < other.type or (type == other.type and number < other.number);
27 };
28};
29
31{
34
35 bool operator==(const LogicBlockId &other) const = default;
36 bool operator<(const LogicBlockId &other) const
37 {
38 return type < other.type or (type == other.type and subType < other.subType);
39 };
40};
41
43{
44 std::string m_name {};
45 std::string m_unit {};
46 std::string m_author {};
47 std::string m_file {};
48 std::string m_date {};
49 std::string m_time {};
50 std::string m_version {};
51 std::string m_description {};
52};
53
54namespace formulaLogic
55{
56
58{
61 uint8_t m_size {}; // Size del parámetro
62 uint32_t
63 m_globalIdOrValueParameter {};// m_ui32ParamValue (dirección que puede ser la memoria intermedia o el canal)
64 uint32_t m_indexInBlock {}; // Parameter index in block [from 0 to nParameters]
65 std::string m_parameterDescription {};// Parameter system description
66 std::string m_description {}; // ChannelTag, Const Name, Label Name
67 std::string m_paramOnlineTag {}; // Nombre del parámetro online
68 std::string m_externalTag {}; // Descripción externa (para librerías)
69 std::string m_tag {}; // Nombre de conexión (ChTag, LabelTag, CstName)
70 std::string m_sParamValue {}; // Parameter value (user input in block) (for String6 types)
71
72 std::string m_text {}; // Formatted description (general libraries info) (for .txt)
73 std::string m_libraryEditParamText {};// Text "EDIT PARAMETER" (for .txt)
74 std::string m_libraryBlocksText {}; // Text "PARAMETRO ... con tag externo: ()" (for .txt)
75 std::uint16_t m_channelUnitId {};
76 std::uint16_t m_channelId {};
77 std::string m_channelType {};
78};
79
80struct SBlock
81{
82 uint16_t m_orderOfExecution {};
83 uint16_t m_orderOfWritten {};
84 std::string m_name {};
85 uint8_t m_type {};
86 uint8_t m_subType {};
88 uint8_t m_size {};// Sum of sizes of parameters of the block
89 uint8_t m_extraSize {};
90 std::vector<SBlockParam> m_params {};
93 bool loadingCheck {false};
94
95 bool m_isLibrary {false};
97 std::vector<SBlock> m_libraryBlocks {};
98};
99
101{
102 std::string m_nameLibrary {};
103 std::map<std::string, std::string> m_linkGraphicToChannel {};
104};
105
106}// namespace formulaLogic
107
108}// namespace iv::logic
109
110#endif//IV_SRC_LOGIC_STRUCTS_HPP_
Definition LogicRectangle.cpp:4
eDBBlockParamType
Definition defines.hpp:20
uint32_t paramNumber
Definition types.hpp:136
std::string libraryTagName
Definition types.hpp:131
uint32_t blockType
Definition types.hpp:137
uint32_t blockSubType
Definition types.hpp:138
Definition structs.hpp:43
std::string m_date
Definition structs.hpp:48
std::string m_description
Definition structs.hpp:51
std::string m_file
Definition structs.hpp:47
std::string m_version
Definition structs.hpp:50
std::string m_author
Definition structs.hpp:46
std::string m_name
Definition structs.hpp:44
std::string m_unit
Definition structs.hpp:45
std::string m_time
Definition structs.hpp:49
Definition structs.hpp:31
iv::types::logic::blockSubType subType
Definition structs.hpp:33
iv::types::logic::blockType type
Definition structs.hpp:32
bool operator==(const LogicBlockId &other) const =default
bool operator<(const LogicBlockId &other) const
Definition structs.hpp:36
Definition structs.hpp:19
iv::logic::eDBBlockParamType type
Definition structs.hpp:20
iv::types::logic::paramNumber number
Definition structs.hpp:21
bool operator==(const ParamId &other) const =default
bool operator<(const ParamId &other) const
Definition structs.hpp:24
Definition structs.hpp:58
std::string m_tag
Definition structs.hpp:69
std::string m_libraryBlocksText
Definition structs.hpp:74
std::string m_sParamValue
Definition structs.hpp:70
iv::logic::eDBBlockParamType m_type
Definition structs.hpp:59
uint8_t m_size
Definition structs.hpp:61
std::string m_externalTag
Definition structs.hpp:68
iv::types::logic::paramNumber m_parameterTypePosition
Definition structs.hpp:60
std::string m_channelType
Definition structs.hpp:77
std::string m_text
Definition structs.hpp:72
std::string m_description
Definition structs.hpp:66
std::uint16_t m_channelId
Definition structs.hpp:76
uint32_t m_globalIdOrValueParameter
Definition structs.hpp:63
std::string m_parameterDescription
Definition structs.hpp:65
uint32_t m_indexInBlock
Definition structs.hpp:64
std::string m_paramOnlineTag
Definition structs.hpp:67
std::uint16_t m_channelUnitId
Definition structs.hpp:75
std::string m_libraryEditParamText
Definition structs.hpp:73
Definition structs.hpp:81
uint16_t m_orderOfExecution
Definition structs.hpp:82
bool loadingCheck
Definition structs.hpp:93
uint8_t m_subType
Definition structs.hpp:86
std::string m_name
Definition structs.hpp:84
iv::types::logic::libraryTagName m_libraryTagname
Definition structs.hpp:96
bool m_isLibrary
Definition structs.hpp:95
uint8_t m_totalParameters
Definition structs.hpp:87
uint16_t m_orderOfWritten
Definition structs.hpp:83
uint8_t m_size
Definition structs.hpp:88
uint8_t m_type
Definition structs.hpp:85
std::vector< SBlock > m_libraryBlocks
Definition structs.hpp:97
uint8_t m_extraSize
Definition structs.hpp:89
std::vector< SBlockParam > m_params
Definition structs.hpp:90
bool missingOutputConnections
Definition structs.hpp:92
bool missingInputConnections
Definition structs.hpp:91
Definition structs.hpp:101
std::string m_nameLibrary
Definition structs.hpp:102
std::map< std::string, std::string > m_linkGraphicToChannel
Definition structs.hpp:103