ConOpSys V2970  P004.07
ANVILEX control operating system
Defines.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file Defines.h
3 //! @brief ConOpSys data type definitions header file.
4 //! @attention No special attention requered.
5 //! @copyright (C) 2004-2020 ANVILEX LLC
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Defines/Defines.h $
7 //! $Revision: 2958 $
8 //! $Date: 2022-03-03 22:21:58 +0500 (Do, 03 Mrz 2022) $
9 //! $Author: ggavrituhin $
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 // Include ConOpSys deploy target definition file
44 //------------------------------------------------------------------------------
45 
46 #include "ConOpSys_Target.h"
47 
48 //------------------------------------------------------------------------------
49 // ConOpSys deployment target definition checking
50 //------------------------------------------------------------------------------
51 
52 #if CONOPSYS_TARGET == CONOPSYS_TARGET_DEVICE
53 
54 #elif CONOPSYS_TARGET == CONOPSYS_TARGET_VDC
55 
56 #else
57 
58  #error "FATAL ERROR: No any deployment target not defined."
59 
60 #endif
61 
62 //------------------------------------------------------------------------------
63 // Target dependent includes
64 //------------------------------------------------------------------------------
65 
66 #if CONOPSYS_TARGET == CONOPSYS_TARGET_DEVICE
67 
68  #include <stdbool.h>
69 
70 #endif
71 
72 //------------------------------------------------------------------------------
73 // VDC tool dependent includes
74 //------------------------------------------------------------------------------
75 
76 #if CONOPSYS_TARGET == CONOPSYS_TARGET_VDC
77 
78  #include <windows.h>
79  #include <system.hpp>
80 
81 #endif
82 
83 //------------------------------------------------------------------------------
84 // ConOpSys module definitiona
85 //------------------------------------------------------------------------------
86 
87 // Undefined target
88 #define CONOPSYS_SOFTWARE_MODULE_DISABLED 0
89 #define CONOPSYS_SOFTWARE_MODULE_ENABLED 1
90 
91 //------------------------------------------------------------------------------
92 // CPU size definition
93 //------------------------------------------------------------------------------
94 
95 //! @brief Native CPU datatype size: 32-Bit CPU
96 #define CPU_SIZE unsigned char
97 
98 //------------------------------------------------------------------------------
99 // Void type
100 //------------------------------------------------------------------------------
101 
102 #if CONOPSYS_TARGET == CONOPSYS_TARGET_DEVICE
103 
104  //! @brief Datatypesess datatype definition
105  typedef void VOID;
106  //#define void VOID
107 
108 #elif CONOPSYS_TARGET == CONOPSYS_TARGET_VDC
109 
110  //! @brief Datatypesess datatype definition
111  #define VOID void
112 
113 #endif
114 
115 //------------------------------------------------------------------------------
116 // Boolean type
117 //------------------------------------------------------------------------------
118 
119 #if CONOPSYS_TARGET == CONOPSYS_TARGET_DEVICE
120 
121  // ANVILEX : Redefinition of BOOL to meet AnyBus driver requerements
122  //typedef bool BOOL;
123  //! @brief Boolean datatype definition
124  typedef int BOOL;
125 
126 #elif CONOPSYS_TARGET == CONOPSYS_TARGET_VDC
127 
128  //! @brief Boolean datatype definition
129  typedef int BOOL;
130  //#undef BOOL
131  //#define BOOL bool
132 
133 #endif
134 
135 //------------------------------------------------------------------------------
136 // Three state boolean data type (trilean)
137 // Info: Three state boolean variable and have "true", "false" and "unset"
138 // values. "true" and "false" are used from standart boolean datatype
139 // definition.
140 //------------------------------------------------------------------------------
141 
142 //! @brief Thrilean datatype defenition
143 typedef int TRIL;
144 
145 //! @brief Unset value of thrilean datatype defenition
146 #define unset -1
147 
148 //------------------------------------------------------------------------------
149 // 8 bit character types
150 //------------------------------------------------------------------------------
151 
152 //! @brief ASCII 8-Bit unsigned char datatype defenition
153 typedef unsigned char UC8;
154 
155 //! @brief ASCII 8-Bit char datatype defenition
156 typedef char C8;
157 
158 //------------------------------------------------------------------------------
159 // 16 bit multibyte character types
160 //------------------------------------------------------------------------------
161 
162 // ASCII 16-Bit unsigned char
163 //typedef unsigned char UC16;
164 
165 // ASCII 16-Bit char
166 //typedef char C16;
167 
168 // UTF16
169 //typedef char16_t UTF16 ;
170 
171 //------------------------------------------------------------------------------
172 // 32 bit multibyte character types
173 //------------------------------------------------------------------------------
174 
175 // UTF16
176 //typedef char32_t UTF32;
177 
178 //------------------------------------------------------------------------------
179 // 8 bit integer types
180 //------------------------------------------------------------------------------
181 
182 //! @brief Binary 8-Bit unsigned integer datatype defenition
183 typedef unsigned char U8;
184 
185 //! @brief 2s Compliment 8-Bit signed integer datatype defenition
186 typedef signed char I8;
187 
188 //------------------------------------------------------------------------------
189 // 16 bit integer types
190 //------------------------------------------------------------------------------
191 
192 //! @brief Binary 16-Bit unsigned integer datatype defenition
193 typedef unsigned short U16;
194 
195 //! @brief 2s Compliment 16-Bit signed integer datatype defenition
196 typedef short I16;
197 
198 //------------------------------------------------------------------------------
199 // 32 bit integer types
200 //------------------------------------------------------------------------------
201 
202 //! @brief Binary 32-Bit unsigned integer datatype defenition
203 typedef unsigned long U32;
204 
205 //! @brief 2s Compliment 32-Bit signed integer datatype defenition
206 typedef long I32;
207 
208 //------------------------------------------------------------------------------
209 // 64 bit integer types
210 //------------------------------------------------------------------------------
211 
212 //! @brief Binary 64-Bit unsigned integer datatype defenition
213 typedef unsigned long long U64;
214 //typedef unsigned long long int U64;
215 
216 //! @brief 2s Compliment 64-Bit signed integer datatype defenition
217 typedef long long I64;
218 
219 //------------------------------------------------------------------------------
220 // 32 bit fixed point types
221 //------------------------------------------------------------------------------
222 
223 //! @brief 32 bit fixed point number datatype definition
224 typedef long int IQ32;
225 
226 //! @brief 32 bit fixed point number datatype definition
227 typedef long int IQ31;
228 
229 //! @brief 32 bit fixed point number datatype definition
230 typedef long int IQ30;
231 
232 //! @brief 32 bit fixed point number datatype definition
233 typedef long int IQ29;
234 
235 //! @brief 32 bit fixed point number datatype definition
236 typedef long int IQ28;
237 
238 //! @brief 32 bit fixed point number datatype definition
239 typedef long int IQ27;
240 
241 //! @brief 32 bit fixed point number datatype definition
242 typedef long int IQ26;
243 
244 //! @brief 32 bit fixed point number datatype definition
245 typedef long int IQ25;
246 
247 //! @brief 32 bit fixed point number datatype definition
248 typedef long int IQ24;
249 
250 //! @brief 32 bit fixed point number datatype definition
251 typedef long int IQ23;
252 
253 //! @brief 32 bit fixed point number datatype definition
254 typedef long int IQ22;
255 
256 //! @brief 32 bit fixed point number datatype definition
257 typedef long int IQ21;
258 
259 //! @brief 32 bit fixed point number datatype definition
260 typedef long int IQ20;
261 
262 //! @brief 32 bit fixed point number datatype definition
263 typedef long int IQ19;
264 
265 //! @brief 32 bit fixed point number datatype definition
266 typedef long int IQ18;
267 
268 //! @brief 32 bit fixed point number datatype definition
269 typedef long int IQ17;
270 
271 //! @brief 32 bit fixed point number datatype definition
272 typedef long int IQ16;
273 
274 //! @brief 32 bit fixed point number datatype definition
275 typedef long int IQ15;
276 
277 //! @brief 32 bit fixed point number datatype definition
278 typedef long int IQ14;
279 
280 //! @brief 32 bit fixed point number datatype definition
281 typedef long int IQ13;
282 
283 //! @brief 32 bit fixed point number datatype definition
284 typedef long int IQ12;
285 
286 //! @brief 32 bit fixed point number datatype definition
287 typedef long int IQ11;
288 
289 //! @brief 32 bit fixed point number datatype definition
290 typedef long int IQ10;
291 
292 //! @brief 32 bit fixed point number datatype definition
293 typedef long int IQ9;
294 
295 //! @brief 32 bit fixed point number datatype definition
296 typedef long int IQ8;
297 
298 //! @brief 32 bit fixed point number datatype definition
299 typedef long int IQ7;
300 
301 //! @brief 32 bit fixed point number datatype definition
302 typedef long int IQ6;
303 
304 //! @brief 32 bit fixed point number datatype definition
305 typedef long int IQ5;
306 
307 //! @brief 32 bit fixed point number datatype definition
308 typedef long int IQ4;
309 
310 //! @brief 32 bit fixed point number datatype definition
311 typedef long int IQ3;
312 
313 //! @brief 32 bit fixed point number datatype definition
314 typedef long int IQ2;
315 
316 //! @brief 32 bit fixed point number datatype definition
317 typedef long int IQ1;
318 
319 //------------------------------------------------------------------------------
320 // Floating point types
321 //------------------------------------------------------------------------------
322 
323 //! @brief IEEE-754 32-Bit single presession floating point numbers datatype defenition
324 typedef float F32;
325 
326 //! @brief IEEE-754 64-Bit double presession floating point numbers datatype defenition
327 typedef double F64;
328 
329 //! @brief IEEE-754 80-Bit extended presession floating point numbers datatype defenition
330 typedef long double F80;
331 
332 //------------------------------------------------------------------------------
333 // Data and time types
334 //------------------------------------------------------------------------------
335 
336 //! @brief Data time type
337 //typedef unsigned long long DT64;
338 
339 //! @brief Compressed data and time datatype definition
340 typedef unsigned long long CDT64;
341 
342 //! @brief Linear data and time
343 //typedef unsigned long long LDT64;
344 
345 //------------------------------------------------------------------------------
346 // VDC tool related datatypes
347 //------------------------------------------------------------------------------
348 
349 #if CONOPSYS_TARGET == CONOPSYS_TARGET_VDC
350 
351  //! @brief ANSI string datatype definition
352  typedef AnsiString AS;
353 
354  //! @brief Unicode string datatype definition
355  typedef UnicodeString DS;
356 
357  //! @brief Unicode string datatype definition
358  typedef UnicodeString US;
359 
360 #endif
361 
362 //------------------------------------------------------------------------------
363 
364 //! @brief Record datatype defenition
365 //! @note ANVILEX KM: Depricated ==> To remove accross the project
366 typedef unsigned long R32;
367 
368 //------------------------------------------------------------------------------
369 
370 // ANVILEX KM: Depricated ==> To remove accross the project
371 typedef unsigned long SC; //!< ConOpSys status code
372 typedef unsigned long EC; //!< ConOpSys event code
373 
374 //------------------------------------------------------------------------------
375 // Special datatypes
376 //------------------------------------------------------------------------------
377 
378 //! @brief 7-Segment code datatype definition
379 typedef unsigned char S7;
380 
381 //------------------------------------------------------------------------------
382 // NULL pointer definition
383 //------------------------------------------------------------------------------
384 
385 #if CONOPSYS_TARGET == CONOPSYS_TARGET_DEVICE
386 
387  #ifndef NULL
388  #define NULL ((void *)(0))
389  #endif
390 
391 #endif
392 
393 //------------------------------------------------------------------------------
394 // S7 code definitions
395 //------------------------------------------------------------------------------
396 // A
397 // -----
398 // | |
399 // B | | F
400 // | G |
401 // -----
402 // | |
403 // C | | E
404 // | |
405 // ----- O DP
406 // D
407 //------------------------------------------------------------------------------
408 // Bit 0 - Segment A
409 // Bit 1 - Segment B
410 // Bit 2 - Segment C
411 // Bit 3 - Segment D
412 // Bit 4 - Segment E
413 // Bit 5 - Segment F
414 // Bit 6 - Segment G
415 // Bit 7 - Segment DP (Decimal Point)
416 //------------------------------------------------------------------------------
417 
418 //! @brief Seven segment code definition for blank symbol
419 #define S7_CODE_BLANK ( (S7)0x00 )
420 
421 //! @brief Seven segment code definition for '0' symbol
422 #define S7_CODE_0 ( (S7)0x3F )
423 
424 //! @brief Seven segment code definition for '1' symbol
425 #define S7_CODE_1 ( (S7)0x06 )
426 
427 //! @brief Seven segment code definition for '2' symbol
428 #define S7_CODE_2 ( (S7)0x5B )
429 
430 //! @brief Seven segment code definition for '3' symbol
431 #define S7_CODE_3 ( (S7)0x4F )
432 
433 //! @brief Seven segment code definition for '4' symbol
434 #define S7_CODE_4 ( (S7)0x66 )
435 
436 //! @brief Seven segment code definition for '5' symbol
437 #define S7_CODE_5 ( (S7)0x6D )
438 
439 //! @brief Seven segment code definition for '6' symbol
440 #define S7_CODE_6 ( (S7)0x7D )
441 
442 //! @brief Seven segment code definition for '7' symbol
443 #define S7_CODE_7 ( (S7)0x07 )
444 
445 //! @brief Seven segment code definition for '8' symbol
446 #define S7_CODE_8 ( (S7)0x7F )
447 
448 //! @brief Seven segment code definition for '9' symbol
449 #define S7_CODE_9 ( (S7)0x6F )
450 
451 //! @brief Seven segment code definition for 'A' symbol
452 #define S7_CODE_CAPITAL_A ( (S7)0x77 )
453 
454 //! @brief Seven segment code definition for 'C' symbol
455 #define S7_CODE_CAPITAL_C ( (S7)0x39 )
456 
457 //! @brief Seven segment code definition for 'E' symbol
458 #define S7_CODE_CAPITAL_E ( (S7)0x79 )
459 
460 //! @brief Seven segment code definition for 'F' symbol
461 #define S7_CODE_CAPITAL_F ( (S7)0x71 )
462 
463 //! @brief Seven segment code definition for 'P' symbol
464 #define S7_CODE_CAPITAL_P ( (S7)0x73 )
465 
466 //! @brief Seven segment code definition for 'r' symbol
467 #define S7_CODE_CAPITAL_R ( (S7)0x50 )
468 
469 //! @brief Seven segment code definition for 'd' symbol
470 #define S7_CODE_CAPITAL_D ( (S7)0x5e )
471 
472 //! @brief Seven segment code definition for 'Y' symbol
473 #define S7_CODE_CAPITAL_Y ( (S7)0x6e )
474 
475 //! @brief Seven segment code definition for 'd' symbol
476 #define S7_CODE_d ( (S7)0x5e )
477 
478 //! @brief Seven segment code definition for 'b' symbol
479 #define S7_CODE_b ( (S7)0x7C )
480 
481 //! @brief Seven segment code definition for 'o' symbol
482 #define S7_CODE_o ( (S7)0x5C )
483 
484 //! @brief Seven segment code definition for 'n' symbol
485 #define S7_CODE_n ( (S7)0x54 )
486 
487 //! @brief Seven segment code definition for 'r' symbol
488 #define S7_CODE_r ( (S7)0x50 )
489 
490 //! @brief Seven segment code definition for '-' symbol
491 #define S7_CODE_DASH ( (S7)0x40 )
492 
493 //! @brief Seven segment code definition for '.' symbol
494 #define S7_CODE_DECIMAL_POINT ( (S7)0x80 )
495 
496 //------------------------------------------------------------------------------
497 // Binary to hexal character lookup table
498 //------------------------------------------------------------------------------
499 
500 //! @todo ANVILEX KM: Fix warning [bcc32 Warnung] Defines.h(500): W8058 Vorcompilierter Header initialisierte Daten im Header kann nicht erzeugt werden
501 const C8 Bin2HexTable[ 16 ] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
502 
503 //------------------------------------------------------------------------------
504 // Define minimal and maximal values of the datatypes
505 //------------------------------------------------------------------------------
506 
507 //! @brief minimum value for U8 definition
508 #define U8_MIN ( (U8)0x00 )
509 
510 //! @brief Maxinum value for U8 definition
511 #define U8_MAX ( (U8)0xFF )
512 
513 //! @brief minimum value for I8 definition
514 #define I8_MIN ( (U8)0x80 )
515 
516 //! @brief Maxinum value for I8 definition
517 #define I8_MAX ( (U8)0x7F )
518 
519 //! @brief minimum value for U16 definition
520 #define U16_MIN ( (U16)0x0000 )
521 
522 //! @brief Maxinum value for U16 definition
523 #define U16_MAX ( (U16)0xFFFF )
524 
525 //! @brief minimum value for I16 definition
526 #define I16_MIN ( (U16)0x8000 )
527 
528 //! @brief Maxinum value for I16 definition
529 #define I16_MAX ( (U16)0x7FFF )
530 
531 //! @brief minimum value for U32 definition
532 #define U32_MIN ( (U32)0x00000000 )
533 
534 //! @brief Maxinum value for U32 definition
535 #define U32_MAX ( (U32)0xFFFFFFFF )
536 
537 //! @brief minimum value for I32 definition
538 #define I32_MIN ( (U32)0x80000000 )
539 
540 //! @brief Maxinum value for I32 definition
541 #define I32_MAX ( (U32)0x7FFFFFFF )
542 
543 //! @brief minimum value for U64 definition
544 #define U64_MIN ( (U64)0x0000000000000000 )
545 
546 //! @brief Maxinum value for U64 definition
547 #define U64_MAX ( (U64)0xFFFFFFFFFFFFFFFF )
548 
549 //! @brief minimum value for I64 definition
550 #define I64_MIN ( (U64)0x8000000000000000 )
551 
552 //! @brief Maxinum value for I64 definition
553 #define I64_MAX ( (U64)0x7FFFFFFFFFFFFFFF )
554 
555 //------------------------------------------------------------------------------
556 // Define string buffer for different datatypes
557 //------------------------------------------------------------------------------
558 
559 #define BOOL_STRING_BUFFER 2
560 
561 #define U8_STRING_BUFFER 4
562 
563 #define I8_STRING_BUFFER 5
564 
565 #define U16_STRING_BUFFER 6
566 
567 #define I16_STRING_BUFFER 7
568 
569 //#define U32_STRING_BUFFER ?
570 
571 //#define I32_STRING_BUFFER ?
572 
573 //#define U64_STRING_BUFFER ?
574 
575 //#define I64_STRING_BUFFER ?
576 
577 //#define U128_STRING_BUFFER ?
578 
579 //#define I128_STRING_BUFFER ?
580 
581 //#define U256_STRING_BUFFER ?
582 
583 //#define I256_STRING_BUFFER ?
584 
585 // ANVILEX used 12 symbols
586 #define F32_STRING_BUFFER 16 + 1
587 
588 #define F64_STRING_BUFFER 24 + 1
589 
590 //#define F80_STRING_BUFFER 30 + 1
591 
592 //#define F128_STRING_BUFFER 45 + 1
593 
594 //------------------------------------------------------------------------------
595 
596 //! @brief Text encoding codes
597 typedef enum
598 {
599 
600  //! @brief Unknown encodung
602 
603  //! @brief ASCII encodung
605 
606  //! @brief CP437 encodung
608 
609  //! @brief CP850 encodung
611 
612  //! @brief CP1252 encodung
614 
615  //! @brief ISO8859_1 encodung
617 
618  //! @brief ISO8859_15 encodung
620 
621  //! @brief UTF8 encodung
623 
624  //! @brief UTF16 encodung
626 
627  //! @brief EBCDIC273 encodung
629 
630  //! @brief HTML encodung
631  text_encoding_HTML = 10
632 
634 
635 //------------------------------------------------------------------------------
636 // Define language codes according ISO 639-1
637 //------------------------------------------------------------------------------
638 
639 //! @brief ISO-639-1 language sting for "DE" definition
640 #define ISO_639_1_STRING_DE "DE"
641 
642 //! @brief ISO-639-1 language sting for "EN" definition
643 #define ISO_639_1_STRING_EN "EN"
644 
645 //! @brief ISO-639-1 language sting for "RU" definition
646 #define ISO_639_1_STRING_RU "RU"
647 
648 //! @brief ISO-639-1 language sting for "IT" definition
649 #define ISO_639_1_STRING_IT "IT"
650 
651 //! @brief ISO-639-1 language sting for "ES" definition
652 #define ISO_639_1_STRING_ES "ES"
653 
654 //! @brief ISO-639-1 language sting for "FR" definition
655 #define ISO_639_1_STRING_FR "FR"
656 
657 //------------------------------------------------------------------------------
658 // Global code errors
659 //------------------------------------------------------------------------------
660 
661 //! @brief Global test status
662 typedef enum
663 {
664 
665  //! @brief Test success status (Test complete successfully)
667 
668  //! @brief Erase blocks test failed status
670 
671  //! @brief Write page test failed status
673 
674  //! @brief Read page test failed status
676 
677  //! @brief Single block erase test failed status
679 
680  //! @brief Block erase error
682 
683  //! @brief Write error
685 
686  //! @brief Read error
688 
689  //! @brief Parameter "Page_Per_Block_Count" not getten
691 
692  //! @brief Parameter "Page_Size" not getten
694 
695  //! @brief Parameter "Block_Status" not getten
697 
698  //! @brief Parameter "Blocks_Per_Chip_Count" not getten
700 
701  //! @brief Parameter "Page_Per_Chip_Count" not getten
703 
704  //! @brief Parameter "Block_Index" not getten
706 
707  //! @brief Page index is out range status
709 
710  //! @brief Empty block error (Block is not empty)
712 
713  //! @brief Block index is out range status
715 
716  //! @brief Read verefy error status
718 
720 
721 //------------------------------------------------------------------------------
722 // Type for extracting
723 //------------------------------------------------------------------------------
724 
725 //! @brief Generic U16 data composition
726 typedef union
727 {
728 
729  //! @brief Raw 16-bit value
731 
732  struct
733  {
734 
735  U8 u8_High_byte:8; //!< Bit 0:7 : High byte
736  U8 u8_Low_byte:8; //!< Bit 8:15 : Low byte
737 
738  };
739 
740 } U16_Composite;
741 
742 
743 //! @brief Generic U32 data composition
744 typedef union
745 {
746 
747  //! @brief Raw 32-bit value
749 
750  struct
751  {
752 
753  U8 u8_Byte_0:8; //!< Bit 0:7 : Byte 0
754  U8 u8_Byte_1:8; //!< Bit 8:15 : Byte 1
755  U8 u8_Byte_2:8; //!< Bit 16:23 : Byte 2
756  U8 u8_Byte_3:8; //!< Bit 24:31 : Byte 3
757 
758  };
759 
760  struct
761  {
762 
763  U32 b4_Nibble_0:4; //!< Bit 0:3 : Nibble 0
764  U32 b4_Nibble_1:4; //!< Bit 4:7 : Nibble 1
765  U32 b4_Nibble_2:4; //!< Bit 8:11 : Nibble 2
766  U32 b4_Nibble_3:4; //!< Bit 12:15 : Nibble 3
767  U32 b4_Nibble_4:4; //!< Bit 16:19 : Nibble 4
768  U32 b4_Nibble_5:4; //!< Bit 20:23 : Nibble 5
769  U32 b4_Nibble_6:4; //!< Bit 24:27 : Nibble 6
770  U32 b4_Nibble_7:4; //!< Bit 28:31 : Nibble 7
771 
772  };
773 
774 } U32_Composite;
775 
776 //------------------------------------------------------------------------------
777 // Application task state definition
778 //------------------------------------------------------------------------------
779 
780 /*
781 //! @brief Task parameter status structure
782 typedef union
783 {
784 
785  //! @brief Raw data representation
786  U32 u32_Raw_Data;
787 
788  struct
789  {
790 
791  //--------------------------------------------------------------------------
792  // Proccesing states
793  //--------------------------------------------------------------------------
794 
795  //! @brief initialising state, 1 bit
796  U32 u32_Initialising:1;
797 
798  //! @brief Ready state, 1 bit
799  U32 u32_Ready:1;
800 
801  //! @brief Transition state, 1 bit
802  U32 u32_Transition:1;
803 
804  //! @brief Standby state, 1 bit
805  U32 u32_Standby:1;
806 
807  //! @brief Operation state, 1 bit
808  U32 u32_Operation:1;
809 
810  //! @brief Error state, 1 bit
811  U32 u32_Error:1;
812 
813  //! @brief Reset state, 1 bit
814  U32 u32_Reseting:1;
815 
816  //! @brief Reserved bits
817  U32 :1;
818 
819  //--------------------------------------------------------------------------
820  // Warnings, alarms and errors
821  //--------------------------------------------------------------------------
822 
823  //! @brief Alarm state, 1 bit
824  U32 u32_Warning:1;
825 
826  //! @brief Warning state, 1 bit
827  U32 u32_Alarm:1;
828 
829  //! @brief Pre-fault emergency state, 1 bit
830  U32 u32_Emergency:1;
831 
832  //! @brief Fault state, 1 bit
833  U32 u32_Fault:1;
834 
835  //! @brief Reserved bits
836  U32 :4;
837 
838  //--------------------------------------------------------------------------
839  // Reserved
840  //--------------------------------------------------------------------------
841 
842  //! @brief Reserved bits
843  U32 :16;
844 
845  } Bits;
846 
847 } TTask_Status_Structure;
848 */
849 //------------------------------------------------------------------------------
850 // Type for ConOpSys state
851 //------------------------------------------------------------------------------
852 
853 //! @brief OS parameter status structure
854 typedef union
855 {
856 
857  //! @brief Raw data representation
859 
860  struct
861  {
862 
863  //----------------------------------------------------------------------
864  // Alarms and errors
865  //----------------------------------------------------------------------
866 
867  //! @brief Error state, 1 bit
869 
870  //! @brief Alarm state, 1 bit
872 
873  //----------------------------------------------------------------------
874  // Proccesing
875  //----------------------------------------------------------------------
876 
877  //! @brief Init state, 1 bit
879 
880  //! @brief Ready state, 1 bit
882 
883  //--------------------------------------------------------------------------
884  // Reserved
885  //--------------------------------------------------------------------------
886 
887  //! @brief Reserved bits
888  U32 :28;
889 
890  }Bits;
891 
893 
894 //------------------------------------------------------------------------------
895 // CAN frame structure
896 //------------------------------------------------------------------------------
897 // ANVILEX KM: Move to CAN module
898 
899 typedef struct
900 {
901 
902  //--------------------------------------------------------------------------
903  // CAN message field
904  //--------------------------------------------------------------------------
905 
906  //! @brief Identifier field from CAN message, 29 bits
908 
909  //! @brief RTR bit from CAN message, 1 bit
911 
912  //! @brief Data length (DLC) field from CAN message, 4 bits
914 
915  union
916  {
917 
918  //! @brief Data field from CAN message, 64 bits
920 
921  U8 u8_Paylod_Raw_Data[ 8 ];
922 
923  struct
924  {
925 
926  //! @brief Data field from CAN message, 64 bits
928 
930 
932 
934 
936 
938 
940 
942 
943  } Data_Bits;
944 
945  } CAN_Data;
946 
947 } TCAN_Msg;
948 
949 //------------------------------------------------------------------------------
950 // ANVILEX KM: Not used
951 //------------------------------------------------------------------------------
952 
953 typedef struct
954 {
955 
958  U8 u8_Manufacturer_Error_Code[ 8 ];
959 
960 } CANopen_EMCY;
961 
962 //------------------------------------------------------------------------------
963 // Conntctor type
964 //------------------------------------------------------------------------------
965 
966 typedef enum
967 {
968 
973 
975 
976 //------------------------------------------------------------------------------
977 // Conntctor orintation
978 //------------------------------------------------------------------------------
979 
980 typedef enum
981 {
982 
984  enum_Up = (U8)1,
986  enum_Down = (U8)3,
987  enum_Left = (U8)3
988 
990 
991 //------------------------------------------------------------------------------
992 // ANVILEX : ABCC bug fix for C++ compiler and ConOpSys system. Remove after the ABCC integration
993 //------------------------------------------------------------------------------
994 
995 #ifdef __cplusplus
996  #define EXTFUNC extern
997 #else
998  #define EXTFUNC extern "C"
999 #endif
1000 
1001 //------------------------------------------------------------------------------
1002 // End of file
1003 //------------------------------------------------------------------------------
ConOpSys deploy target definitions file.
long int IQ6
32 bit fixed point number datatype definition
Definition: Defines.h:302
long int IQ32
32 bit fixed point number datatype definition
Definition: Defines.h:224
int BOOL
Boolean datatype definition.
Definition: Defines.h:124
long int IQ9
32 bit fixed point number datatype definition
Definition: Defines.h:293
unsigned char S7
7-Segment code datatype definition
Definition: Defines.h:379
long int IQ23
32 bit fixed point number datatype definition
Definition: Defines.h:251
TText_Encoding
Text encoding codes.
Definition: Defines.h:598
@ text_encoding_ASCII
ASCII encodung.
Definition: Defines.h:604
@ text_encoding_Unknown
Unknown encodung.
Definition: Defines.h:601
@ text_encoding_CP1252
CP1252 encodung.
Definition: Defines.h:613
@ text_encoding_CP437
CP437 encodung.
Definition: Defines.h:607
@ text_encoding_CP850
CP850 encodung.
Definition: Defines.h:610
@ text_encoding_UTF16
UTF16 encodung.
Definition: Defines.h:625
@ text_encoding_HTML
HTML encodung.
Definition: Defines.h:631
@ text_encoding_EBCDIC273
EBCDIC273 encodung.
Definition: Defines.h:628
@ text_encoding_UTF8
UTF8 encodung.
Definition: Defines.h:622
@ text_encoding_ISO8859_1
ISO8859_1 encodung.
Definition: Defines.h:616
@ text_encoding_ISO8859_15
ISO8859_15 encodung.
Definition: Defines.h:619
long int IQ31
32 bit fixed point number datatype definition
Definition: Defines.h:227
long int IQ27
32 bit fixed point number datatype definition
Definition: Defines.h:239
unsigned long long U64
Binary 64-Bit unsigned integer datatype defenition.
Definition: Defines.h:213
long int IQ22
32 bit fixed point number datatype definition
Definition: Defines.h:254
UnicodeString US
Unicode string datatype definition.
Definition: Defines.h:358
int TRIL
Thrilean datatype defenition.
Definition: Defines.h:143
long I32
2s Compliment 32-Bit signed integer datatype defenition
Definition: Defines.h:206
TConntctor_Orintation
Definition: Defines.h:981
@ enum_Down
Definition: Defines.h:986
@ enum_Right
Definition: Defines.h:985
@ enum_Up
Definition: Defines.h:984
@ enum_Left
Definition: Defines.h:987
@ enum_Unknown_Orintation
Definition: Defines.h:983
long int IQ25
32 bit fixed point number datatype definition
Definition: Defines.h:245
long int IQ13
32 bit fixed point number datatype definition
Definition: Defines.h:281
unsigned char U8
Binary 8-Bit unsigned integer datatype defenition.
Definition: Defines.h:183
long int IQ7
32 bit fixed point number datatype definition
Definition: Defines.h:299
long int IQ28
32 bit fixed point number datatype definition
Definition: Defines.h:236
long int IQ21
32 bit fixed point number datatype definition
Definition: Defines.h:257
long int IQ24
32 bit fixed point number datatype definition
Definition: Defines.h:248
signed char I8
2s Compliment 8-Bit signed integer datatype defenition
Definition: Defines.h:186
long int IQ16
32 bit fixed point number datatype definition
Definition: Defines.h:272
const C8 Bin2HexTable[16]
Definition: Defines.h:501
long double F80
IEEE-754 80-Bit extended presession floating point numbers datatype defenition.
Definition: Defines.h:330
unsigned long long CDT64
Data time type.
Definition: Defines.h:340
long int IQ2
32 bit fixed point number datatype definition
Definition: Defines.h:314
TConntctor_Type
Definition: Defines.h:967
@ enum_Output_Connector
Definition: Defines.h:972
@ enum_Parameter_Connector
Definition: Defines.h:970
@ enum_Unknown_Type
Definition: Defines.h:969
@ enum_Input_Connector
Definition: Defines.h:971
long int IQ12
32 bit fixed point number datatype definition
Definition: Defines.h:284
long int IQ10
32 bit fixed point number datatype definition
Definition: Defines.h:290
long int IQ20
32 bit fixed point number datatype definition
Definition: Defines.h:260
TReturn_Test_Code
Global test status.
Definition: Defines.h:663
@ enum_Single_Block_Erase_Test_Failed
Single block erase test failed status.
Definition: Defines.h:678
@ enum_Block_Index_Out_Range
Block index is out range status.
Definition: Defines.h:714
@ enum_Get_Block_Status_Error
Parameter "Block_Status" not getten
Definition: Defines.h:696
@ enum_Read_Failed
Read error.
Definition: Defines.h:687
@ enum_Get_Block_Index_Error
Parameter "Block_Index" not getten.
Definition: Defines.h:705
@ enum_Get_Page_Size_Error
Parameter "Page_Size" not getten.
Definition: Defines.h:693
@ enum_Get_Page_Per_Block_Count_Error
Parameter "Page_Per_Block_Count" not getten.
Definition: Defines.h:690
@ enum_Verify_Read_Error
Read verefy error status.
Definition: Defines.h:717
@ enum_Block_Empty_Error
Empty block error (Block is not empty)
Definition: Defines.h:711
@ enum_Write_Failed
Write error.
Definition: Defines.h:684
@ enum_Get_Page_Per_Chip_Count_Error
Parameter "Page_Per_Chip_Count" not getten.
Definition: Defines.h:702
@ enum_Write_Test_Failed
Write page test failed status.
Definition: Defines.h:672
@ enum_Page_Index_Out_Range
Page index is out range status.
Definition: Defines.h:708
@ enum_Erase_Test_Failed
Erase blocks test failed status.
Definition: Defines.h:669
@ enum_Get_Block_Count_Error
Parameter "Blocks_Per_Chip_Count" not getten.
Definition: Defines.h:699
@ enum_Block_Erase_Error
Block erase error.
Definition: Defines.h:681
@ enum_Success_Test_Code
Test success status (Test complete successfully)
Definition: Defines.h:666
@ enum_Read_Test_Failed
Read page test failed status.
Definition: Defines.h:675
long int IQ8
32 bit fixed point number datatype definition
Definition: Defines.h:296
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
float F32
IEEE-754 32-Bit single presession floating point numbers datatype defenition.
Definition: Defines.h:324
long int IQ14
32 bit fixed point number datatype definition
Definition: Defines.h:278
short I16
2s Compliment 16-Bit signed integer datatype defenition
Definition: Defines.h:196
long int IQ1
32 bit fixed point number datatype definition
Definition: Defines.h:317
unsigned char UC8
ASCII 8-Bit unsigned char datatype defenition.
Definition: Defines.h:153
unsigned long SC
ConOpSys status code.
Definition: Defines.h:371
long long I64
2s Compliment 64-Bit signed integer datatype defenition
Definition: Defines.h:217
long int IQ15
32 bit fixed point number datatype definition
Definition: Defines.h:275
long int IQ29
32 bit fixed point number datatype definition
Definition: Defines.h:233
long int IQ26
32 bit fixed point number datatype definition
Definition: Defines.h:242
long int IQ4
32 bit fixed point number datatype definition
Definition: Defines.h:308
long int IQ3
32 bit fixed point number datatype definition
Definition: Defines.h:311
long int IQ17
32 bit fixed point number datatype definition
Definition: Defines.h:269
unsigned long R32
Record datatype defenition.
Definition: Defines.h:366
long int IQ30
32 bit fixed point number datatype definition
Definition: Defines.h:230
double F64
IEEE-754 64-Bit double presession floating point numbers datatype defenition.
Definition: Defines.h:327
unsigned long EC
ConOpSys event code.
Definition: Defines.h:372
AnsiString AS
Linear data and time.
Definition: Defines.h:352
unsigned short U16
Binary 16-Bit unsigned integer datatype defenition.
Definition: Defines.h:193
UnicodeString DS
Unicode string datatype definition.
Definition: Defines.h:355
long int IQ18
32 bit fixed point number datatype definition
Definition: Defines.h:266
char C8
ASCII 8-Bit char datatype defenition.
Definition: Defines.h:156
long int IQ19
32 bit fixed point number datatype definition
Definition: Defines.h:263
long int IQ11
32 bit fixed point number datatype definition
Definition: Defines.h:287
long int IQ5
32 bit fixed point number datatype definition
Definition: Defines.h:305
Definition: Defines.h:954
U8 u8_Error_Register
Definition: Defines.h:957
U16 u16_Error_Code
Definition: Defines.h:956
Definition: Defines.h:900
U32 u32_Identifier
Identifier field from CAN message, 29 bits.
Definition: Defines.h:907
BOOL bool_RTR_Bit
RTR bit from CAN message, 1 bit.
Definition: Defines.h:910
U8 u8_CAN_Data_Byte_3
Definition: Defines.h:933
U8 u8_CAN_Data_Byte_2
Definition: Defines.h:931
U8 u8_CAN_Data_Byte_4
Definition: Defines.h:935
U8 u8_CAN_Data_Byte_7
Definition: Defines.h:941
U8 u8_CAN_Data_Byte_1
Definition: Defines.h:929
U8 u8_CAN_Data_Byte_0
Data field from CAN message, 64 bits.
Definition: Defines.h:927
U8 u8_DLC
Data length (DLC) field from CAN message, 4 bits.
Definition: Defines.h:913
U8 u8_CAN_Data_Byte_6
Definition: Defines.h:939
U64 u64_CAN_Raw_Data
Data field from CAN message, 64 bits.
Definition: Defines.h:919
U8 u8_CAN_Data_Byte_5
Definition: Defines.h:937
OS parameter status structure.
Definition: Defines.h:855
U32 u32_Alarm
Alarm state, 1 bit.
Definition: Defines.h:871
U32 u32_Ready
Ready state, 1 bit.
Definition: Defines.h:881
U32 u32_Error
Error state, 1 bit.
Definition: Defines.h:868
U32 u32_Raw_Data
Raw data representation.
Definition: Defines.h:858
U32 u32_Init
Init state, 1 bit.
Definition: Defines.h:878
Generic U16 data composition.
Definition: Defines.h:727
U8 u8_Low_byte
Bit 8:15 : Low byte.
Definition: Defines.h:736
U16 u16_Raw_Value
Raw 16-bit value.
Definition: Defines.h:730
U8 u8_High_byte
Bit 0:7 : High byte.
Definition: Defines.h:735
Generic U32 data composition.
Definition: Defines.h:745
U32 b4_Nibble_4
Bit 16:19 : Nibble 4.
Definition: Defines.h:767
U32 b4_Nibble_1
Bit 4:7 : Nibble 1.
Definition: Defines.h:764
U8 u8_Byte_3
Bit 24:31 : Byte 3.
Definition: Defines.h:756
U8 u8_Byte_1
Bit 8:15 : Byte 1.
Definition: Defines.h:754
U32 b4_Nibble_7
Bit 28:31 : Nibble 7.
Definition: Defines.h:770
U8 u8_Byte_0
Bit 0:7 : Byte 0.
Definition: Defines.h:753
U32 b4_Nibble_5
Bit 20:23 : Nibble 5.
Definition: Defines.h:768
U32 b4_Nibble_0
Bit 0:3 : Nibble 0.
Definition: Defines.h:763
U8 u8_Byte_2
Bit 16:23 : Byte 2.
Definition: Defines.h:755
U32 b4_Nibble_2
Bit 8:11 : Nibble 2.
Definition: Defines.h:765
U32 b4_Nibble_3
Bit 12:15 : Nibble 3.
Definition: Defines.h:766
U32 b4_Nibble_6
Bit 24:27 : Nibble 6.
Definition: Defines.h:769
U32 u32_Raw_Value
Raw 32-bit value.
Definition: Defines.h:748