ConOpSys V2970  P004.07
ANVILEX control operating system
ConOpSys_Variant_Data_Type.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file ConOpSys_Variant_Data_Type.h
3 //! @brief ConOpSys variant data type class header file.
4 //! @copyright (C) 2004-2020 ANVILEX LLC
5 //! @attention No special attention requered.
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Common/ConOpSys_Variant.h $
7 //! $Revision: 2305 $
8 //! $Date: 2020-12-25 03:00:01 +0500 (Fr, 25 Dez 2020) $
9 //! $Author: minch $
10 //------------------------------------------------------------------------------
11 //
12 // Redistribution and use in source and binary forms, with or without
13 // modification, are permitted provided that the following conditions are met:
14 //
15 // 1. Redistributions of source code must retain the above copyright notice,
16 // this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright notice,
19 // this list of conditions and the following disclaimer in the documentation
20 // and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of ANVILEX nor the names of its contributors may be
23 // used to endorse or promote products derived from this software without
24 // specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 // POSSIBILITY OF SUCH DAMAGE.
37 //
38 //------------------------------------------------------------------------------
39 
40 #pragma once
41 
42 //------------------------------------------------------------------------------
43 // System includes
44 //------------------------------------------------------------------------------
45 
46 #include "Defines.h"
47 
48 #if CONOPSYS_TARGET == CONOPSYS_TARGET_DEVICE
49 #include "Application_Resource_Configuration.h"
50 #endif
51 
52 //------------------------------------------------------------------------------
53 // Class definitions
54 //------------------------------------------------------------------------------
55 
57 {
58 
59  //! @brief Unassigned data type marker
60  enum_Unassigned = 0,
61 
62  //! @brief Unknown data type marker
63  enum_Unknown = 255,
64 
65  //! @brief Variant contains value of boolean data type
66  enum_BOOL = 1,
67 
68  //! @brief Variant contains pointer to value of boolean data type
69  enum_PBOOL = 2,
70 
71  //! @brief Variant contains pointer to array of values of boolean data type
72  enum_ABOOL = 108,
73 
74  //! @brief Variant contains value of U8 data type
75  enum_U8 = 3,
76 
77  //! @brief Variant contains pointer to value of U8 data type
78  enum_PU8 = 4,
79 
80  //! @brief Variant contains pointer to array of values of U8 data type
81  enum_AU8 = 109,
82 
83  //! @brief Variant contains value of I8 data type
84  enum_I8 = 5,
85 
86  //! @brief Variant contains pointer to value of I8 data type
87  enum_PI8 = 6,
88 
89  //! @brief Variant contains pointer to array of values of I8 data type
90  enum_AI8 = 110,
91 
92  //! @brief Variant contains value of U16 data type
93  enum_U16 = 7,
94 
95  //! @brief Variant contains pointer to value of U16 data type
96  enum_PU16 = 8,
97 
98  //! @brief Variant contains pointer to array of values of U16 data type
99  enum_AU16 = 111,
100 
101  //! @brief Variant contains value of I16 data type
102  enum_I16 = 9,
103 
104  //! @brief Variant contains pointer to value of I16 data type
105  enum_PI16 = 10,
106 
107  //! @brief Variant contains pointer to array of values of I16 data type
108  enum_AI16 = 112,
109 
110  //! @brief Variant contains value of U32 data type
111  enum_U32 = 11,
112 
113  //! @brief Variant contains pointer to value of U32 data type
114  enum_PU32 = 12,
115 
116  //! @brief Variant contains pointer to array of values of U32 data type
117  enum_AU32 = 113,
118 
119  //! @brief Variant contains value of I32 data type
120  enum_I32 = 13,
121 
122  //! @brief Variant contains pointer to value of I32 data type
123  enum_PI32 = 14,
124 
125  //! @brief Variant contains pointer to array of values of I32 data type
126  enum_AI32 = 114,
127 
128  //! @brief Variant contains value of U64 data
129  enum_U64 = 15,
130 
131  //! @brief Variant contains pointer to value of U64 data type
132  enum_PU64 = 16,
133 
134  //! @brief Variant contains pointer to array of values of U64 data type
135  enum_AU64 = 115,
136 
137  //! @brief Variant contains value of I64 data type
138  enum_I64 = 17,
139 
140  //! @brief Variant contains pointer to value of I64 data type
141  enum_PI64 = 18,
142 
143  //! @brief Variant contains pointer to array of values of I64 data type
144  enum_AI64 = 116,
145 
146  // Test for U128 datatype supported
147  #if ( PARAMETER_DATATYPE_U128_SUPPORT == (true) )
148 
149  //! @brief Variant contains value of U128 data
150  //! @note PU128 data type reserved for future use
151  enum_U128 = 19,
152 
153  //! @brief Variant contains pointer to value of U128 data type
154  //! @note PU128 data type reserved for future use
155  enum_PU128 = 20,
156 
157  //! @brief Variant contains pointer to array of values of U128 data type
158  //! @note AU128 data type reserved for future use
159  enum_AU128 = 117,
160 
161  #endif
162 
163  // Test for I128 datatype supported
164  #if ( PARAMETER_DATATYPE_I128_SUPPORT == (true) )
165 
166  //! @brief Variant contains value of I128 data
167  //! @note I128 data type reserved for future use
168  enum_I128 = 21,
169 
170  //! @brief Variant contains pointer to value of I128 data type
171  //! @note PI128 data type reserved for future use
172  enum_PI128 = 22,
173 
174  //! @brief Variant contains pointer to array of values of I128 data type
175  //! @note AI128 data type reserved for future use
176  enum_AI128 = 118,
177 
178  #endif
179 
180  // Test for U256 datatype supported
181  #if ( PARAMETER_DATATYPE_U256_SUPPORT == (true) )
182 
183  //! @brief Variant contains value of U256 data
184  //! @note U256 data type reserved for future use
185  enum_U256 = 23,
186 
187  //! @brief Variant contains pointer to value of U256 data type
188  //! @note PU256 data type reserved for future use
189  enum_PU256 = 24,
190 
191  //! @brief Variant contains pointer to array of values of U256 data type
192  //! @note AU256 data type reserved for future use
193  enum_AU256 = 119,
194 
195  #endif
196 
197  // Test for I256 datatype supported
198  #if ( PARAMETER_DATATYPE_I256_SUPPORT == (true) )
199 
200  //! @brief Variant contains value of I256 data
201  //! @note PI256 data type reserved for future use
202  enum_I256 = 25,
203 
204  //! @brief Variant contains pointer to value of I256 data type
205  //! @note PI256 data type reserved for future use
206  enum_PI256 = 26,
207 
208  //! @brief Variant contains pointer to array of values of I256 data type
209  enum_AI256 = 120,
210 
211  #endif
212 
213  //----------------------------------------------------------------------------
214  // F16 datatype
215  //----------------------------------------------------------------------------
216 
217  // Test for F16 datatype supported
218  #if ( PARAMETER_DATATYPE_F16_SUPPORT == (true) )
219 
220  //! @brief Variant contains value of F16 data
221  //! @note F16 data type reserved for future use
222  enum_F16 = 27,
223 
224  //! @brief Variant contains pointer to value of F16 data type
225  //! @note PF16 data type reserved for future use
226  enum_PF16 = 28,
227 
228  //! @brief Variant contains pointer to array of values of F16 data type
229  //! @note F16 data type reserved for future use
230  enum_AF16 = 121,
231 
232  #endif
233 
234  //----------------------------------------------------------------------------
235  // F32 datatype
236  //----------------------------------------------------------------------------
237 
238  //! @brief Variant contains value of F32 data
239  enum_F32 = 29,
240 
241  //! @brief Variant contains pointer to value of F32 data type
242  enum_PF32 = 30,
243 
244  //! @brief Variant contains pointer to array of values of F32 data type
245  enum_AF32 = 122,
246 
247  //----------------------------------------------------------------------------
248  // F64 datatype
249  //----------------------------------------------------------------------------
250 
251  //! @brief Variant contains value of F64 data
252  enum_F64 = 31,
253 
254  //! @brief Variant contains pointer to value of F64 data type
255  enum_PF64 = 32,
256 
257  //! @brief Variant contains pointer to array of values of F64 data type
258  enum_AF64 = 123,
259 
260  //----------------------------------------------------------------------------
261  // F80 datatype
262  //----------------------------------------------------------------------------
263 
264  // Test for F80 datatype supported
265  #if ( PARAMETER_DATATYPE_F80_SUPPORT == (true) )
266 
267  //! @brief Variant contains value of F80 data
268  //! @note F80 data type reserved for future use
269  enum_F80 = 33, // Reserved
270 
271  //! @brief Variant contains pointer to value of F80 data type
272  //! @note PF80 data type reserved for future use
273  enum_PF80 = 34, // Reserved
274 
275  //! @brief Variant contains pointer to array of values of F80 data type
276  //! @note AF80 data type reserved for future use
277  enum_AF80 = 124,
278 
279  #endif
280 
281  //----------------------------------------------------------------------------
282  // F128 datatype
283  //----------------------------------------------------------------------------
284 
285  // Test for F128 datatype supported
286  #if ( PARAMETER_DATATYPE_F128_SUPPORT == (true) )
287 
288  //! @brief Variant contains value of F128 data
289  //! @note F128 data type reserved for future use
290  enum_F128 = 35,
291 
292  //! @brief Variant contains pointer to value of F128 data type
293  //! @note PF128 data type reserved for future use
294  enum_PF128 = 36,
295 
296  //! @brief Variant contains pointer to array of values of F128 data type
297  //! @note AF128 data type reserved for future use
298  enum_AF128 = 125,
299 
300  #endif
301 
302  //----------------------------------------------------------------------------
303  // F256 datatype
304  //----------------------------------------------------------------------------
305 
306  // Test for F256 datatype supported
307  #if ( PARAMETER_DATATYPE_F256_SUPPORT == (true) )
308 
309  //! @brief Variant contains value of F256 data
310  //! @note F256 data type reserved for future use
311  enum_F256 = 37,
312 
313  //! @brief Variant contains pointer to value of F256 data type
314  //! @note PF256 data type reserved for future use
315  enum_PF256 = 38,
316 
317  //! @brief Variant contains pointer to array of values of F256 data type
318  //! @note AF256 data type reserved for future use
319  enum_AF256 = 126,
320 
321  #endif
322 
323  // Test for IQ datatype supported
324  #if ( PARAMETER_DATATYPE_IQ_SUPPORT == (true) )
325 
326  // Fixed point data types
327  enum_IQ1 = 39,
328  enum_PIQ1 = 40,
329 
330  enum_IQ2 = 41,
331  enum_PIQ2 = 42,
332 
333  enum_IQ3 = 43,
334  enum_PIQ3 = 44,
335 
336  enum_IQ4 = 45,
337  enum_PIQ4 = 46,
338 
339  enum_IQ5 = 47,
340  enum_PIQ5 = 48,
341 
342  enum_IQ6 = 49,
343  enum_PIQ6 = 50,
344 
345  enum_IQ7 = 51,
346  enum_PIQ7 = 52,
347 
348  enum_IQ8 = 53,
349  enum_PIQ8 = 54,
350 
351  enum_IQ9 = 55,
352  enum_PIQ9 = 56,
353 
354  enum_IQ10 = 57,
355  enum_PIQ10 = 58,
356 
357  enum_IQ11 = 59,
358  enum_PIQ11 = 60,
359 
360  enum_IQ12 = 61,
361  enum_PIQ12 = 62,
362 
363  enum_IQ13 = 63,
364  enum_PIQ13 = 64,
365 
366  enum_IQ14 = 65,
367  enum_PIQ14 = 66,
368 
369  enum_IQ15 = 67,
370  enum_PIQ15 = 68,
371 
372  enum_IQ16 = 69,
373  enum_PIQ16 = 70,
374 
375  enum_IQ17 = 71,
376  enum_PIQ17 = 72,
377 
378  enum_IQ18 = 73,
379  enum_PIQ18 = 74,
380 
381  enum_IQ19 = 75,
382  enum_PIQ19 = 76,
383 
384  enum_IQ20 = 77,
385  enum_PIQ20 = 78,
386 
387  enum_IQ21 = 79,
388  enum_PIQ21 = 80,
389 
390  enum_IQ22 = 81,
391  enum_PIQ22 = 82,
392 
393  enum_IQ23 = 83,
394  enum_PIQ23 = 84,
395 
396  enum_IQ24 = 85,
397  enum_PIQ24 = 86,
398 
399  enum_IQ25 = 87,
400  enum_PIQ25 = 88,
401 
402  enum_IQ26 = 89,
403  enum_PIQ26 = 90,
404 
405  enum_IQ27 = 91,
406  enum_PIQ27 = 92,
407 
408  enum_IQ28 = 93,
409  enum_PIQ28 = 94,
410 
411  enum_IQ29 = 95,
412  enum_PIQ29 = 96,
413 
414  enum_IQ30 = 97,
415  enum_PIQ30 = 98,
416 
417  enum_IQ31 = 99,
418  enum_PIQ31 = 100,
419 
420  enum_IQ32 = 101,
421  enum_PIQ32 = 102,
422 
423  #endif
424 
425  //! @brief String data types
426  enum_DS = 103,
427 
428  //! @brief Date and time
429  //! @note Reserved
430  enum_DT = 104,
431 
432  //! @brief
433  //! @note Reserved
434  enum_LDT64 = 105,
435 
436  //! @brief Compressed data and time
437  //! @note Reserved
438  enum_CDT64 = 106,
439 
440  //! @brief Record datatype
441  enum_R32 = 107,
442 
443  //! @brief Virtual machine command data type
444  enum_VMP = 127,
445 
446  //! @brief Virtual machine array of commands data type
447  enum_AVMP = 128,
448 
449  // NOTE: Last number 129
450 
451 };
452 
453 //------------------------------------------------------------------------------
454 
456 
458 
460 
461 //------------------------------------------------------------------------------
462 // End of file
463 //------------------------------------------------------------------------------
@ enum_IQ12
32 bit IQ12 fixed point data type
@ enum_U64
64 bit unsigned integer data type
@ enum_F80
80 bit floating point data type
@ enum_IQ27
32 bit IQ27 fixed point data type
@ enum_IQ6
32 bit IQ6 fixed point data type
@ enum_IQ9
32 bit IQ9 fixed point data type
@ enum_F128
128 bit floating point data type
@ enum_IQ28
32 bit IQ28 fixed point data type
@ enum_IQ2
32 bit IQ2 fixed point data type
@ enum_IQ8
32 bit IQ8 fixed point data type
@ enum_IQ24
32 bit IQ24 fixed point data type
@ enum_Unassigned
Connector unassigned.
@ enum_IQ16
32 bit IQ16 fixed point data type
@ enum_IQ10
32 bit IQ10 fixed point data type
@ enum_IQ23
32 bit IQ23 fixed point data type
@ enum_IQ7
32 bit IQ7 fixed point data type
@ enum_F64
64 bit floating point data type
@ enum_IQ25
32 bit IQ25 fixed point data type
@ enum_IQ3
32 bit IQ3 fixed point data type
@ enum_F256
256 bit floating point data type
@ enum_IQ5
32 bit IQ5 fixed point data type
@ enum_IQ31
32 bit IQ31 fixed point data type
@ enum_U32
32 bit unsigned integer data type
@ enum_U128
128 bit unsigned integer data type
@ enum_IQ29
32 bit IQ29 fixed point data type
@ enum_U256
256 bit unsigned integer data type
@ enum_I128
128 bit signed integer data type
@ enum_IQ22
32 bit IQ22 fixed point data type
@ enum_IQ30
32 bit IQ30 fixed point data type
@ enum_IQ1
32 bit IQ1 fixed point data type
@ enum_I64
64 bit signed integer data type
@ enum_IQ26
32 bit IQ26 fixed point data type
@ enum_IQ15
32 bit IQ15 fixed point data type
@ enum_IQ32
32 bit IQ32 fixed point data type
@ enum_I16
16 bit signed integer data type
@ enum_F32
32 bit floating point data type
@ enum_F16
16 bit floating point data type
@ enum_IQ13
32 bit IQ13 fixed point data type
@ enum_AVMP
Virtual machine program data type.
@ enum_I256
256 bit signed integer data type
@ enum_U16
16 bit unsigned integer data type
@ enum_IQ4
32 bit IQ4 fixed point data type
@ enum_IQ20
32 bit IQ20 fixed point data type
@ enum_I8
8 bit signed integer data type
@ enum_IQ17
32 bit IQ17 fixed point data type
@ enum_IQ18
32 bit IQ18 fixed point data type
@ enum_IQ19
32 bit IQ19 fixed point data type
@ enum_IQ21
32 bit IQ21 fixed point data type
@ enum_IQ14
32 bit IQ14 fixed point data type
@ enum_I32
32 bit signed integer data type
@ enum_IQ11
32 bit IQ11 fixed point data type
BOOL Is_ConOpSys_Variant_Data_Type_Pointer(TConOpSys_Variant_Data_Type enum_Type)
Definition: ConOpSys_Variant_Data_Type.cpp:268
TConOpSys_Variant_Data_Type
Definition: ConOpSys_Variant_Data_Type.h:57
@ enum_AF16
Variant contains pointer to array of values of F16 data type.
@ enum_AF64
Variant contains pointer to array of values of F64 data type.
@ enum_PF32
Variant contains pointer to value of F32 data type.
@ enum_AU128
Variant contains pointer to array of values of U128 data type.
@ enum_PU64
Variant contains pointer to value of U64 data type.
@ enum_AU64
Variant contains pointer to array of values of U64 data type.
@ enum_AI256
Variant contains pointer to array of values of I256 data type.
@ enum_PF128
Variant contains pointer to value of F128 data type.
@ enum_R32
Record datatype.
@ enum_PI8
Variant contains pointer to value of I8 data type.
@ enum_AI8
Variant contains pointer to array of values of I8 data type.
@ enum_AU32
Variant contains pointer to array of values of U32 data type.
@ enum_PF256
Variant contains pointer to value of F256 data type.
@ enum_CDT64
Compressed data and time.
@ enum_PI16
Variant contains pointer to value of I16 data type.
@ enum_Unknown
Unknown data type marker.
@ enum_AI64
Variant contains pointer to array of values of I64 data type.
@ enum_BOOL
Variant contains value of boolean data type.
@ enum_AU8
Variant contains pointer to array of values of U8 data type.
@ enum_AU256
Variant contains pointer to array of values of U256 data type.
@ enum_PU256
Variant contains pointer to value of U256 data type.
@ enum_PF16
Variant contains pointer to value of F16 data type.
@ enum_DS
String data types.
@ enum_AF32
Variant contains pointer to array of values of F32 data type.
@ enum_PI32
Variant contains pointer to value of I32 data type.
@ enum_PU16
Variant contains pointer to value of U16 data type.
@ enum_PF64
Variant contains pointer to value of F64 data type.
@ enum_AF128
Variant contains pointer to array of values of F128 data type.
@ enum_PU32
Variant contains pointer to value of U32 data type.
@ enum_PI128
Variant contains pointer to value of I128 data type.
@ enum_U8
Variant contains value of U8 data type.
@ enum_PI64
Variant contains pointer to value of I64 data type.
@ enum_AU16
Variant contains pointer to array of values of U16 data type.
@ enum_PI256
Variant contains pointer to value of I256 data type.
@ enum_VMP
Virtual machine command data type.
@ enum_AF256
Variant contains pointer to array of values of F256 data type.
@ enum_AI16
Variant contains pointer to array of values of I16 data type.
@ enum_AI128
Variant contains pointer to array of values of I128 data type.
@ enum_PBOOL
Variant contains pointer to value of boolean data type.
@ enum_AF80
Variant contains pointer to array of values of F80 data type.
@ enum_ABOOL
Variant contains pointer to array of values of boolean data type.
@ enum_AI32
Variant contains pointer to array of values of I32 data type.
@ enum_PU8
Variant contains pointer to value of U8 data type.
@ enum_PU128
Variant contains pointer to value of U128 data type.
@ enum_PF80
Variant contains pointer to value of F80 data type.
BOOL Is_ConOpSys_Variant_Data_Type_Array(TConOpSys_Variant_Data_Type enum_Type)
Definition: ConOpSys_Variant_Data_Type.cpp:217
BOOL Is_ConOpSys_Variant_Data_Type_Element(TConOpSys_Variant_Data_Type enum_Type)
Definition: ConOpSys_Variant_Data_Type.cpp:86
ConOpSys data type definitions header file.
int BOOL
Boolean datatype definition.
Definition: Defines.h:124