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_FILES_STRUCTS_HPP_
2#define IV_SRC_LOGIC_FILES_STRUCTS_HPP_
3
4#include "core/defines.hpp"
5
6#include <cstdint>
7#include <memory>
8#include <string>
9#include <string_view>
10#include <vector>
11
12namespace iv::logic::files
13{
14
17// LOM File Structs
18//
19
20typedef uint8_t propertyStringSize;
21
23{
24 uint16_t numProperties;
25
26 static constexpr std::string_view propLomNumberTitle {"LOM Number"};
27 std::string propLomNumber;
28 static constexpr std::string_view propAuthorTitle {"Author"};
29 std::string propAuthor;
30 static constexpr std::string_view propNameTitle {"Name"};
31 std::string propName;
32 static constexpr std::string_view propFileTitle {"File"};
33 std::string propFile;
34 static constexpr std::string_view propVersionTitle {"Version"};
35 std::string propVersion;
36 static constexpr std::string_view propTimeTitle {"Time"};
37 std::string propTime;
38 static constexpr std::string_view propDateTitle {"Date"};
39 std::string propDate;
40 static constexpr std::string_view propDescriptionTitle {"Description"};
41 std::string propDescription;
42
43 bool operator==(const PropertiesLom &other) const = default;
44};
45
47{
48 // Basic properties
49 uint8_t size;
50 uint8_t type;
51 std::string description;
52 std::string tag;
54
55 // Ending property
56 std::string sParamValue;
57
58 bool operator==(const BlockParamLom &other) const = default;
59};
60
62{
63 uint8_t size;
64 uint8_t subtype;
65 uint8_t type;
66 uint8_t extraSize;
67 uint8_t numParams;
68 std::string name;
69 uint16_t order;
70
71 std::vector<BlockParamLom> params;
72
73 bool operator==(const BlockLom &other) const = default;
74};
75
77{
78 uint32_t numBlocks;
79
80 std::vector<BlockLom> blocks;
81
82 bool operator==(const BlocksLom &other) const = default;
83};
84
86{
87 std::string libraryName;
88 uint16_t numProperties;
89
90 std::vector<std::pair<std::string, std::string>> graphicToChannel;
91
92 bool operator==(const GraphicInfoLom &other) const = default;
93};
94
96{
98 std::vector<GraphicInfoLom> graphicInfo;
99
100 bool operator==(const GraphicsInfoLom &other) const = default;
101};
102
116{
118
120
121 uint32_t version;
122
124
125 std::string lomType;
126
127 // Blocks Ending Properties
128
129 bool operator==(const LomFile &other) const = default;
130};
131
134// PL File Structs
135//
136
138{
139 uint8_t size;
140 uint8_t type;
141
142 std::string libraryBlockTagName {};
143 std::string externalTag {};
144 std::string externalTag2 {};
145
146 std::string tag {};
147 uint32_t value {};
148
149 uint16_t blockOrder {};
150 uint16_t orderInBlock {};
151 uint32_t orderInLogic {};
152
153 bool operator==(const LibraryParameterPl &other) const = default;
154};
155
157{
158 std::string tagName;
159
160 uint32_t numParam {0};
161 std::vector<LibraryParameterPl> parameters;
162
163 bool operator==(const LibraryPl &other) const = default;
164};
165
169struct PlFile
170{
171 uint32_t version {3};
172 uint32_t numLibraries {0};
173 uint32_t numParams {0};
174
175 std::vector<LibraryPl> libraries;
176
177 bool operator==(const PlFile &other) const = default;
178};
179
182// LIM File Structs
183//
184
186{
187 std::string name;
188 std::string unit;
189 std::string author;
190 std::string file;
191 std::string date;
192 std::string time;
193 std::string version;
194 std::string description;
195};
196
198{
199 uint32_t type {};// Tipo del param
200 uint16_t channelUnitId {};
201 uint16_t channelId {};
202 uint32_t globalIdOrValue {};
203 std::string channelType {};
204 std::string parameterDescription {};// Parameter system description
205 std::string sParamValue {}; // Parameter value (user input in block) (for String6 types)
206 std::string text {}; // Formatted description (general libraries info) (for .txt)
207};
208
210{
211 uint16_t orderOfExecution {};
212 std::string name {};
213 uint8_t type {};
214 uint8_t subType {};
215
216 std::vector<LogicParameterStationLom> parameters;
217};
218
223{
225
226 std::vector<LogicBlockStationLom> logicBlocksLim;
227};
228
231// TXT File Structs
232//
233
235{
236 std::string unit;
237 std::string description;
238 std::string version;
239 std::string author;
240 std::string date;
241 std::string time;
242 std::string file;
243 std::string name;
244};
245
247{
248 std::string text {};// Formatted description (general libraries info) (for .txt)
249
250 std::string libraryEditParamText {};// Text "EDIT PARAMETER" (for .txt)
251 std::string libraryBlocksText {}; // Text "PARAMETRO ... con tag externo: ()" (for .txt)
252};
253
261
263{
265
266 uint16_t orderOfExecution {};
267 std::string name {};
268 uint8_t type {};
269 uint8_t subType {};
270
271 std::vector<LogicParameterTxt> parameters;
272
274 std::vector<LogicBlockTxt> libraryBlocks;
275};
276
278{
280 std::string externalTag;
281 std::string externalTag2;
282
283 std::string value;
284
286 uint16_t orderInBlock;
287};
288
293{
295
296 std::string lomType;
297
298 std::vector<LogicChannelInfoTxt> logicChannelsInfo;
299
300 std::vector<LogicBlockTxt> logicBlocks;
301
302 std::vector<LogicParameterOnlineTxt> logicParametersOnline;
303};
304
305}// namespace iv::logic::files
306
307#endif//IV_SRC_LOGIC_FILES_STRUCTS_HPP_
Definition LomFileCoder.cpp:13
uint8_t propertyStringSize
Definition structs.hpp:20
uint32_t indexChannel
Definition types.hpp:87
uint16_t unitId
Definition types.hpp:77
uint16_t channelOrder
Definition types.hpp:68
std::string channelId
Definition types.hpp:66
Definition structs.hpp:62
uint16_t order
Definition structs.hpp:69
uint8_t numParams
Definition structs.hpp:67
uint8_t type
Definition structs.hpp:65
uint8_t extraSize
Definition structs.hpp:66
std::string name
Definition structs.hpp:68
uint8_t size
Definition structs.hpp:63
std::vector< BlockParamLom > params
Definition structs.hpp:71
uint8_t subtype
Definition structs.hpp:64
bool operator==(const BlockLom &other) const =default
Definition structs.hpp:47
std::string sParamValue
Definition structs.hpp:56
std::string tag
Definition structs.hpp:52
std::string description
Definition structs.hpp:51
uint32_t globalIdOrValue
Definition structs.hpp:53
uint8_t type
Definition structs.hpp:50
uint8_t size
Definition structs.hpp:49
bool operator==(const BlockParamLom &other) const =default
Definition structs.hpp:77
uint32_t numBlocks
Definition structs.hpp:78
std::vector< BlockLom > blocks
Definition structs.hpp:80
bool operator==(const BlocksLom &other) const =default
Definition structs.hpp:86
uint16_t numProperties
Definition structs.hpp:88
std::string libraryName
Definition structs.hpp:87
bool operator==(const GraphicInfoLom &other) const =default
std::vector< std::pair< std::string, std::string > > graphicToChannel
Definition structs.hpp:90
Definition structs.hpp:96
uint32_t numGraphicInfo
Definition structs.hpp:97
std::vector< GraphicInfoLom > graphicInfo
Definition structs.hpp:98
bool operator==(const GraphicsInfoLom &other) const =default
Definition structs.hpp:138
std::string externalTag2
Definition structs.hpp:144
uint8_t size
Definition structs.hpp:139
std::string externalTag
Definition structs.hpp:143
uint32_t orderInLogic
Definition structs.hpp:151
uint32_t value
Definition structs.hpp:147
uint16_t orderInBlock
Definition structs.hpp:150
uint8_t type
Definition structs.hpp:140
uint16_t blockOrder
Definition structs.hpp:149
bool operator==(const LibraryParameterPl &other) const =default
std::string tag
Definition structs.hpp:146
std::string libraryBlockTagName
Definition structs.hpp:142
Definition structs.hpp:157
std::vector< LibraryParameterPl > parameters
Definition structs.hpp:161
bool operator==(const LibraryPl &other) const =default
uint32_t numParam
Definition structs.hpp:160
std::string tagName
Definition structs.hpp:158
Definition structs.hpp:210
std::vector< LogicParameterStationLom > parameters
Definition structs.hpp:216
std::string name
Definition structs.hpp:212
uint16_t orderOfExecution
Definition structs.hpp:211
uint8_t subType
Definition structs.hpp:214
uint8_t type
Definition structs.hpp:213
Definition structs.hpp:263
bool isLibrary
Definition structs.hpp:273
uint8_t type
Definition structs.hpp:268
std::vector< LogicParameterTxt > parameters
Definition structs.hpp:271
uint32_t orderOfWrittenBlock
Definition structs.hpp:264
std::vector< LogicBlockTxt > libraryBlocks
Definition structs.hpp:274
std::string name
Definition structs.hpp:267
uint8_t subType
Definition structs.hpp:269
uint16_t orderOfExecution
Definition structs.hpp:266
Definition structs.hpp:255
iv::types::unitId idUnit
Definition structs.hpp:257
iv::types::indexChannel indexChannel
Definition structs.hpp:259
iv::types::channelId channelId
Definition structs.hpp:256
iv::types::channelOrder channelOrder
Definition structs.hpp:258
Definition structs.hpp:186
std::string name
Definition structs.hpp:187
std::string time
Definition structs.hpp:192
std::string author
Definition structs.hpp:189
std::string description
Definition structs.hpp:194
std::string unit
Definition structs.hpp:188
std::string date
Definition structs.hpp:191
std::string version
Definition structs.hpp:193
std::string file
Definition structs.hpp:190
Definition structs.hpp:235
std::string file
Definition structs.hpp:242
std::string date
Definition structs.hpp:240
std::string description
Definition structs.hpp:237
std::string author
Definition structs.hpp:239
std::string unit
Definition structs.hpp:236
std::string version
Definition structs.hpp:238
std::string time
Definition structs.hpp:241
std::string name
Definition structs.hpp:243
std::string libraryBlockTagName
Definition structs.hpp:279
std::string externalTag
Definition structs.hpp:280
uint16_t orderInBlock
Definition structs.hpp:286
uint16_t unpackedBlockOrder
Definition structs.hpp:285
std::string externalTag2
Definition structs.hpp:281
std::string value
Definition structs.hpp:283
uint32_t type
Definition structs.hpp:199
std::string sParamValue
Definition structs.hpp:205
uint16_t channelId
Definition structs.hpp:201
std::string channelType
Definition structs.hpp:203
uint16_t channelUnitId
Definition structs.hpp:200
std::string text
Definition structs.hpp:206
std::string parameterDescription
Definition structs.hpp:204
uint32_t globalIdOrValue
Definition structs.hpp:202
Definition structs.hpp:247
std::string libraryBlocksText
Definition structs.hpp:251
std::string text
Definition structs.hpp:248
std::string libraryEditParamText
Definition structs.hpp:250
Main structure of the LOM File. This file contains the structure to write LOM files for modules.
Definition structs.hpp:116
uint32_t version
Definition structs.hpp:121
GraphicsInfoLom graphicsInfo
Definition structs.hpp:123
bool operator==(const LomFile &other) const =default
PropertiesLom properties
Definition structs.hpp:117
std::string lomType
Definition structs.hpp:125
BlocksLom blocks
Definition structs.hpp:119
Main structure of the PL file. This file contains the online parameters of the logic.
Definition structs.hpp:170
uint32_t numParams
Definition structs.hpp:173
uint32_t numLibraries
Definition structs.hpp:172
uint32_t version
Definition structs.hpp:171
std::vector< LibraryPl > libraries
Definition structs.hpp:175
bool operator==(const PlFile &other) const =default
Definition structs.hpp:23
static constexpr std::string_view propNameTitle
Definition structs.hpp:30
static constexpr std::string_view propLomNumberTitle
Definition structs.hpp:26
uint16_t numProperties
Definition structs.hpp:24
static constexpr std::string_view propTimeTitle
Definition structs.hpp:36
std::string propDescription
Definition structs.hpp:41
std::string propVersion
Definition structs.hpp:35
std::string propLomNumber
Definition structs.hpp:27
std::string propName
Definition structs.hpp:31
std::string propDate
Definition structs.hpp:39
std::string propFile
Definition structs.hpp:33
static constexpr std::string_view propVersionTitle
Definition structs.hpp:34
bool operator==(const PropertiesLom &other) const =default
static constexpr std::string_view propDateTitle
Definition structs.hpp:38
static constexpr std::string_view propAuthorTitle
Definition structs.hpp:28
std::string propTime
Definition structs.hpp:37
std::string propAuthor
Definition structs.hpp:29
static constexpr std::string_view propFileTitle
Definition structs.hpp:32
static constexpr std::string_view propDescriptionTitle
Definition structs.hpp:40
Main structure of the Station Logic LOM file. This file contains the needed information to execute th...
Definition structs.hpp:223
std::vector< LogicBlockStationLom > logicBlocksLim
Definition structs.hpp:226
LogicInfoStationLom logicInfoLim
Definition structs.hpp:224
Main structure of the Logic TXT file. This file contains the needed information to write an info TXT ...
Definition structs.hpp:293
std::vector< LogicParameterOnlineTxt > logicParametersOnline
Definition structs.hpp:302
LogicInfoTxt logicInfo
Definition structs.hpp:294
std::string lomType
Definition structs.hpp:296
std::vector< LogicBlockTxt > logicBlocks
Definition structs.hpp:300
std::vector< LogicChannelInfoTxt > logicChannelsInfo
Definition structs.hpp:298