1
9
10 #ifndef __RTWTYPES_H__
11 #define __RTWTYPES_H__
12 #ifndef __TMWTYPES__
13 #define __TMWTYPES__
14
15 #include <limits.h>
16
17
26
27
28 #define RTWTYPES_ID_C08S16I32L32N32F1
29
30
36
37 typedef signed char int8_T;
38 typedef unsigned char uint8_T;
39 typedef short int16_T;
40 typedef unsigned short uint16_T;
41 typedef int int32_T;
42 typedef unsigned int uint32_T;
43 typedef float real32_T;
44 typedef double real64_T;
45
46
50
51 typedef double real_T;
52 typedef double time_T;
53 typedef unsigned char boolean_T;
54 typedef int int_T;
55 typedef unsigned int uint_T;
56 typedef char char_T;
57 typedef char_T byte_T;
58
59
64
65 #define MAX_int8_T ((int8_T)(127))
66 #define MIN_int8_T ((int8_T)(-128))
67 #define MAX_uint8_T ((uint8_T)(255))
68 #define MIN_uint8_T ((uint8_T)(0))
69 #define MAX_int16_T ((int16_T)(32767))
70 #define MIN_int16_T ((int16_T)(-32768))
71 #define MAX_uint16_T ((uint16_T)(65535))
72 #define MIN_uint16_T ((uint16_T)(0))
73 #define MAX_int32_T ((int32_T)(2147483647))
74 #define MIN_int32_T ((int32_T)(-2147483647-1))
75 #define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
76 #define MIN_uint32_T ((uint32_T)(0))
77
78
79 #if !defined(__cplusplus) && !defined(__true_false_are_keywords)
80 # ifndef false
81 # define false (0)
82 # endif
83 # ifndef true
84 # define true (1)
85 # endif
86 #endif
87
88 #ifndef TRUE
89 # define TRUE (1)
90 #endif
91 #ifndef FALSE
92 # define FALSE (0)
93 #endif
94
95
99 #if ((SCHAR_MIN + 1) != -SCHAR_MAX)
100 #error "This code must be compiled using a 2's complement representation for signed integer values"
101 #endif
102
103
108 #define TMW_NAME_LENGTH_MAX 64
109 #else
110 #define TMWTYPES_PREVIOUSLY_INCLUDED
111 #endif
112
113
114 typedef void * pointer_T;
115
116
117
118 #ifndef __SIMSTRUC_TYPES_H__
119 #define __SIMSTRUC_TYPES_H__
120
121
122 typedef enum {
123 SUBSYS_DISABLED = 0,
124 SUBSYS_ENABLED = 2,
125 SUBSYS_BECOMING_DISABLED = 4,
126 SUBSYS_BECOMING_ENABLED = 8,
127 SUBSYS_TRIGGERED = 16
128 } CondStates;
129
130
131 typedef enum {
132 FALLING_ZERO_CROSSING = -1,
133 ANY_ZERO_CROSSING = 0,
134 RISING_ZERO_CROSSING = 1
135 } ZCDirection;
136
137
138 typedef enum {
139 NEG_ZCSIG = -1,
140 ZERO_ZCSIG = 0,
141 POS_ZCSIG = 1,
142 ZERO_RISING_EV_ZCSIG = 100,
143 ZERO_FALLING_EV_ZCSIG = 101,
144 UNINITIALIZED_ZCSIG = INT_MAX
145 } ZCSigState;
146
147
148 typedef enum {
149 FALLING_ZCEVENT = -1,
150 NO_ZCEVENT = 0,
151 RISING_ZCEVENT = 1
152 } ZCEventType;
153
154
155 typedef enum {
156 SS_DOUBLE = 0,
157 SS_SINGLE = 1,
158 SS_INT8 = 2,
159 SS_UINT8 = 3,
160 SS_INT16 = 4,
161 SS_UINT16 = 5,
162 SS_INT32 = 6,
163 SS_UINT32 = 7,
164 SS_BOOLEAN = 8
165 } BuiltInDTypeId;
166
167 #define SS_NUM_BUILT_IN_DTYPE ((int_T)SS_BOOLEAN+1)
168
169 typedef int_T DTypeId;
170
171 #endif
172 #endif
|