1
9
10 #ifndef __RTWTYPES_H__
11 #define __RTWTYPES_H__
12 #ifndef TRUE
13 # define TRUE (1U)
14 #endif
15
16 #ifndef FALSE
17 # define FALSE (0U)
18 #endif
19
20 #ifndef __TMWTYPES__
21 #define __TMWTYPES__
22 #include <limits.h>
23
24
33
34
40 typedef signed char int8_T;
41 typedef unsigned char uint8_T;
42 typedef int int16_T;
43 typedef unsigned int uint16_T;
44 typedef long int32_T;
45 typedef unsigned long uint32_T;
46 typedef float real32_T;
47 typedef double real64_T;
48
49
53 typedef double real_T;
54 typedef double time_T;
55 typedef unsigned char boolean_T;
56 typedef int int_T;
57 typedef unsigned int uint_T;
58 typedef char char_T;
59 typedef char_T byte_T;
60
61
64 #define CREAL_T
65
66 typedef struct {
67 real32_T re;
68 real32_T im;
69 } creal32_T;
70
71 typedef struct {
72 real64_T re;
73 real64_T im;
74 } creal64_T;
75
76 typedef struct {
77 real_T re;
78 real_T im;
79 } creal_T;
80
81 typedef struct {
82 int8_T re;
83 int8_T im;
84 } cint8_T;
85
86 typedef struct {
87 uint8_T re;
88 uint8_T im;
89 } cuint8_T;
90
91 typedef struct {
92 int16_T re;
93 int16_T im;
94 } cint16_T;
95
96 typedef struct {
97 uint16_T re;
98 uint16_T im;
99 } cuint16_T;
100
101 typedef struct {
102 int32_T re;
103 int32_T im;
104 } cint32_T;
105
106 typedef struct {
107 uint32_T re;
108 uint32_T im;
109 } cuint32_T;
110
111
116 #define MAX_int8_T ((int8_T)(127))
117 #define MIN_int8_T ((int8_T)(-128))
118 #define MAX_uint8_T ((uint8_T)(255U))
119 #define MIN_uint8_T ((uint8_T)(0U))
120 #define MAX_int16_T ((int16_T)(32767))
121 #define MIN_int16_T ((int16_T)(-32768))
122 #define MAX_uint16_T ((uint16_T)(65535U))
123 #define MIN_uint16_T ((uint16_T)(0U))
124 #define MAX_int32_T ((int32_T)(2147483647))
125 #define MIN_int32_T ((int32_T)(-2147483647-1))
126 #define MAX_uint32_T ((uint32_T)(0xFFFFFFFFU))
127 #define MIN_uint32_T ((uint32_T)(0U))
128
129
130 #if !defined(__cplusplus) && !defined(__true_false_are_keywords)
131 # ifndef false
132 # define false (0U)
133 # endif
134
135 # ifndef true
136 # define true (1U)
137 # endif
138 #endif
139
140
144 #if ((SCHAR_MIN + 1) != -SCHAR_MAX)
145 #error "This code must be compiled using a 2's complement representation for signed integer values"
146 #endif
147
148
153 #define TMW_NAME_LENGTH_MAX 64
154
155
156 #define RTWTYPES_ID_C08S16I16L32N16F1
157 #else
158 #define TMWTYPES_PREVIOUSLY_INCLUDED
159 #endif
160
161
162 typedef void * pointer_T;
163
164
165 #ifndef __SIMSTRUC_TYPES_H__
166 #define __SIMSTRUC_TYPES_H__
167
168
169 typedef enum {
170 SUBSYS_DISABLED = 0,
171 SUBSYS_ENABLED = 2,
172 SUBSYS_BECOMING_DISABLED = 4,
173 SUBSYS_BECOMING_ENABLED = 8,
174 SUBSYS_TRIGGERED = 16
175 } CondStates;
176
177
178 typedef enum {
179 FALLING_ZERO_CROSSING = -1,
180 ANY_ZERO_CROSSING = 0,
181 RISING_ZERO_CROSSING = 1
182 } ZCDirection;
183
184
185 typedef enum {
186 NEG_ZCSIG = -1,
187 ZERO_ZCSIG = 0,
188 POS_ZCSIG = 1,
189 ZERO_RISING_EV_ZCSIG = 100,
190 ZERO_FALLING_EV_ZCSIG = 101,
191 UNINITIALIZED_ZCSIG = INT_MAX
192 } ZCSigState;
193
194
195 typedef enum {
196 FALLING_ZCEVENT = -1,
197 NO_ZCEVENT = 0,
198 RISING_ZCEVENT = 1
199 } ZCEventType;
200
201
202 typedef enum {
203 SS_DOUBLE = 0,
204 SS_SINGLE = 1,
205 SS_INT8 = 2,
206 SS_UINT8 = 3,
207 SS_INT16 = 4,
208 SS_UINT16 = 5,
209 SS_INT32 = 6,
210 SS_UINT32 = 7,
211 SS_BOOLEAN = 8
212 } BuiltInDTypeId;
213
214 #define SS_NUM_BUILT_IN_DTYPE ((int_T)SS_BOOLEAN+1)
215
216 typedef int_T DTypeId;
217
218 #endif
219 #endif
|