Revision b9724665 stateflow_json/simple_Chart_SFIR_pp.json
stateflow_json/simple_Chart_SFIR_pp.json | ||
---|---|---|
5 | 5 |
"datatype": "int", |
6 | 6 |
"initial_value": "0", |
7 | 7 |
"name": "x", |
8 |
"port": 1, |
|
8 | 9 |
"scope": "Output" |
9 | 10 |
}, |
10 | 11 |
{ |
... | ... | |
12 | 13 |
"datatype": "real", |
13 | 14 |
"initial_value": "0.0", |
14 | 15 |
"name": "y", |
16 |
"port": 2, |
|
15 | 17 |
"scope": "Output" |
16 | 18 |
}, |
17 | 19 |
{ |
... | ... | |
19 | 21 |
"datatype": "real", |
20 | 22 |
"initial_value": "[0,0]", |
21 | 23 |
"name": "t", |
24 |
"port": 3, |
|
22 | 25 |
"scope": "Output" |
23 | 26 |
}, |
24 | 27 |
{ |
... | ... | |
26 | 29 |
"datatype": "bool", |
27 | 30 |
"initial_value": "false", |
28 | 31 |
"name": "E", |
32 |
"port": 1, |
|
29 | 33 |
"scope": "Input" |
30 | 34 |
} |
31 | 35 |
], |
... | ... | |
49 | 53 |
"type": "State" |
50 | 54 |
}, |
51 | 55 |
"event": "", |
52 |
"id": 69,
|
|
56 |
"id": 29,
|
|
53 | 57 |
"transition_act": "" |
54 | 58 |
}, |
55 | 59 |
"type": "EXCLUSIVE_OR" |
... | ... | |
59 | 63 |
"state_actions": { |
60 | 64 |
"during_act": { |
61 | 65 |
"actions": "", |
62 |
"external_nodes": [], |
|
63 |
"node_struct": { |
|
64 |
"intputs": [], |
|
65 |
"outputs": [] |
|
66 |
} |
|
66 |
"external_fun": "", |
|
67 |
"inputs": "", |
|
68 |
"outputs": "", |
|
69 |
"variables": "" |
|
67 | 70 |
}, |
68 | 71 |
"entry_act": { |
69 | 72 |
"actions": "", |
70 |
"external_nodes": [], |
|
71 |
"node_struct": { |
|
72 |
"intputs": [], |
|
73 |
"outputs": [] |
|
74 |
} |
|
73 |
"external_fun": "", |
|
74 |
"inputs": "", |
|
75 |
"outputs": "", |
|
76 |
"variables": "" |
|
75 | 77 |
}, |
76 | 78 |
"exit_act": { |
77 | 79 |
"actions": "", |
78 |
"external_nodes": [], |
|
79 |
"node_struct": { |
|
80 |
"intputs": [], |
|
81 |
"outputs": [] |
|
82 |
} |
|
80 |
"external_fun": "", |
|
81 |
"inputs": "", |
|
82 |
"outputs": "", |
|
83 |
"variables": "" |
|
83 | 84 |
} |
84 | 85 |
} |
85 | 86 |
}, |
... | ... | |
94 | 95 |
"path": "simple_Chart/B", |
95 | 96 |
"state_actions": { |
96 | 97 |
"during_act": { |
97 |
"action_struct": { |
|
98 |
"intputs": [], |
|
99 |
"outputs": [] |
|
100 |
}, |
|
101 | 98 |
"actions": [], |
102 |
"external_nodes": [], |
|
103 |
"node_struct": { |
|
104 |
"intputs": [], |
|
105 |
"outputs": [] |
|
106 |
} |
|
99 |
"external_fun": "", |
|
100 |
"inputs": "", |
|
101 |
"outputs": "", |
|
102 |
"variables": "" |
|
107 | 103 |
}, |
108 | 104 |
"entry_act": { |
109 |
"action_struct": { |
|
110 |
"intputs": [], |
|
111 |
"outputs": [] |
|
112 |
}, |
|
113 | 105 |
"actions": [], |
114 |
"external_nodes": [], |
|
115 |
"node_struct": { |
|
116 |
"intputs": [], |
|
117 |
"outputs": [] |
|
118 |
} |
|
106 |
"external_fun": "", |
|
107 |
"inputs": "", |
|
108 |
"outputs": "", |
|
109 |
"variables": "" |
|
119 | 110 |
}, |
120 | 111 |
"exit_act": { |
121 |
"action_struct": { |
|
122 |
"intputs": [], |
|
123 |
"outputs": [] |
|
124 |
}, |
|
125 | 112 |
"actions": [], |
126 |
"external_nodes": [], |
|
127 |
"node_struct": { |
|
128 |
"intputs": [], |
|
129 |
"outputs": [] |
|
130 |
} |
|
113 |
"external_fun": "", |
|
114 |
"inputs": "", |
|
115 |
"outputs": "", |
|
116 |
"variables": "" |
|
131 | 117 |
} |
132 | 118 |
} |
133 | 119 |
}, |
... | ... | |
140 | 126 |
}, |
141 | 127 |
"outer_trans": { |
142 | 128 |
"condition": { |
143 |
"action_struct": { |
|
144 |
"intputs": [ |
|
145 |
{ |
|
146 |
"array_size": "-1", |
|
147 |
"datatype": "int32", |
|
148 |
"initial_value": "", |
|
149 |
"name": "x", |
|
150 |
"scope": "Output" |
|
151 |
}, |
|
152 |
{ |
|
153 |
"array_size": "-1", |
|
154 |
"datatype": "double", |
|
155 |
"initial_value": "", |
|
156 |
"name": "y", |
|
157 |
"scope": "Output" |
|
158 |
} |
|
159 |
], |
|
160 |
"outputs": [] |
|
161 |
}, |
|
162 |
"actions": " x__1 +1> y__1 ", |
|
163 |
"external_nodes": [], |
|
164 |
"node_struct": { |
|
165 |
"intputs": [], |
|
166 |
"outputs": [] |
|
167 |
} |
|
129 |
"actions": "int_to_real(x + 1) > y ", |
|
130 |
"external_fun": "int_to_real", |
|
131 |
"inputs": "y: real;x: int;", |
|
132 |
"outputs": "", |
|
133 |
"variables": "" |
|
168 | 134 |
}, |
169 | 135 |
"condition_act": { |
170 |
"action_struct": { |
|
171 |
"intputs": [], |
|
172 |
"outputs": { |
|
173 |
"array_size": "-1", |
|
174 |
"datatype": "int32", |
|
175 |
"index": 2, |
|
176 |
"initial_value": "", |
|
177 |
"name": "x", |
|
178 |
"scope": "Output" |
|
179 |
} |
|
180 |
}, |
|
181 |
"actions": "x__2 = real_to_int(0)", |
|
182 |
"external_nodes": { |
|
183 |
"Name": "conv", |
|
184 |
"Type": "real_to_int" |
|
185 |
}, |
|
186 |
"node_struct": { |
|
187 |
"intputs": [], |
|
188 |
"outputs": [] |
|
189 |
} |
|
136 |
"actions": "x__1 = real_to_int(0.0); ", |
|
137 |
"external_fun": "real_to_int, int_to_real", |
|
138 |
"inputs": "x: int;", |
|
139 |
"outputs": "x__1: int;", |
|
140 |
"variables": "" |
|
190 | 141 |
}, |
191 | 142 |
"dest": { |
192 | 143 |
"name": "simple_Chart/B", |
193 | 144 |
"type": "State" |
194 | 145 |
}, |
195 | 146 |
"event": "E", |
196 |
"id": 74,
|
|
147 |
"id": 30,
|
|
197 | 148 |
"transition_act": { |
198 |
"action_struct": { |
|
199 |
"intputs": { |
|
200 |
"array_size": "-1", |
|
201 |
"datatype": "double", |
|
202 |
"initial_value": "", |
|
203 |
"name": "y", |
|
204 |
"scope": "Output" |
|
205 |
}, |
|
206 |
"outputs": { |
|
207 |
"array_size": "-1", |
|
208 |
"datatype": "double", |
|
209 |
"index": 2, |
|
210 |
"initial_value": "", |
|
211 |
"name": "y", |
|
212 |
"scope": "Output" |
|
213 |
} |
|
214 |
}, |
|
215 |
"actions": "y__2 = y__1 +1.0", |
|
216 |
"external_nodes": [], |
|
217 |
"node_struct": { |
|
218 |
"intputs": [], |
|
219 |
"outputs": [] |
|
220 |
} |
|
149 |
"actions": "y__1 = y + 1.0; ", |
|
150 |
"external_fun": "int_to_real", |
|
151 |
"inputs": "y: real;", |
|
152 |
"outputs": "y__1: real;", |
|
153 |
"variables": "" |
|
221 | 154 |
} |
222 | 155 |
}, |
223 | 156 |
"path": "simple_Chart/A", |
224 | 157 |
"state_actions": { |
225 | 158 |
"during_act": { |
226 |
"action_struct": { |
|
227 |
"intputs": [ |
|
228 |
{ |
|
229 |
"array_size": "-1", |
|
230 |
"datatype": "int32", |
|
231 |
"initial_value": "", |
|
232 |
"name": "x", |
|
233 |
"scope": "Output" |
|
234 |
}, |
|
235 |
{ |
|
236 |
"array_size": "-1", |
|
237 |
"datatype": "double", |
|
238 |
"index": 2, |
|
239 |
"initial_value": "", |
|
240 |
"name": "y", |
|
241 |
"scope": "Output" |
|
242 |
} |
|
243 |
], |
|
244 |
"outputs": [ |
|
245 |
{ |
|
246 |
"array_size": "-1", |
|
247 |
"datatype": "int32", |
|
248 |
"index": 3, |
|
249 |
"initial_value": "", |
|
250 |
"name": "x", |
|
251 |
"scope": "Output" |
|
252 |
}, |
|
253 |
{ |
|
254 |
"array_size": "-1", |
|
255 |
"datatype": "double", |
|
256 |
"index": 2, |
|
257 |
"initial_value": "", |
|
258 |
"name": "y", |
|
259 |
"scope": "Output" |
|
260 |
} |
|
261 |
] |
|
262 |
}, |
|
263 |
"actions": [ |
|
264 |
"x__2 = x__1 +1", |
|
265 |
"y__2 = int_to_real( x__2 )-1.0", |
|
266 |
"x__3 = min( x__2 , y__2 )" |
|
267 |
], |
|
268 |
"external_nodes": [ |
|
269 |
{ |
|
270 |
"Name": "conv", |
|
271 |
"Type": "int_to_real" |
|
272 |
}, |
|
273 |
{ |
|
274 |
"Name": "min", |
|
275 |
"Type": "int" |
|
276 |
} |
|
277 |
], |
|
278 |
"node_struct": { |
|
279 |
"intputs": [], |
|
280 |
"outputs": [] |
|
281 |
} |
|
159 |
"actions": "x__1 = x + 1; y__1 = int_to_real(x__1) - 1.0; x__2 = real_to_int(min(int_to_real(x__1), y__1)); ", |
|
160 |
"external_fun": "real_to_int, min, int_to_real", |
|
161 |
"inputs": "y: real;x: int;", |
|
162 |
"outputs": "y__1: real;x__2: int;", |
|
163 |
"variables": "x__1: int;" |
|
282 | 164 |
}, |
283 | 165 |
"entry_act": { |
284 |
"action_struct": { |
|
285 |
"intputs": [], |
|
286 |
"outputs": [ |
|
287 |
{ |
|
288 |
"array_size": "-1", |
|
289 |
"datatype": "int32", |
|
290 |
"index": 2, |
|
291 |
"initial_value": "", |
|
292 |
"name": "x", |
|
293 |
"scope": "Output" |
|
294 |
}, |
|
295 |
{ |
|
296 |
"array_size": "-1", |
|
297 |
"datatype": "double", |
|
298 |
"index": 2, |
|
299 |
"initial_value": "", |
|
300 |
"name": "y", |
|
301 |
"scope": "Output" |
|
302 |
} |
|
303 |
] |
|
304 |
}, |
|
305 |
"actions": [ |
|
306 |
"x__2 = real_to_int(0)", |
|
307 |
"y__2 = 0.0" |
|
308 |
], |
|
309 |
"external_nodes": { |
|
310 |
"Name": "conv", |
|
311 |
"Type": "real_to_int" |
|
312 |
}, |
|
313 |
"node_struct": { |
|
314 |
"intputs": [], |
|
315 |
"outputs": [] |
|
316 |
} |
|
166 |
"actions": "x__1 = real_to_int(0.0); y__1 = 0.0; ", |
|
167 |
"external_fun": "real_to_int, int_to_real", |
|
168 |
"inputs": "y: real;x: int;", |
|
169 |
"outputs": "y__1: real;x__1: int;", |
|
170 |
"variables": "" |
|
317 | 171 |
}, |
318 | 172 |
"exit_act": { |
319 |
"action_struct": { |
|
320 |
"intputs": [], |
|
321 |
"outputs": [] |
|
322 |
}, |
|
323 | 173 |
"actions": [], |
324 |
"external_nodes": [], |
|
325 |
"node_struct": { |
|
326 |
"intputs": [], |
|
327 |
"outputs": [] |
|
328 |
} |
|
174 |
"external_fun": "", |
|
175 |
"inputs": "", |
|
176 |
"outputs": "", |
|
177 |
"variables": "" |
|
329 | 178 |
} |
330 | 179 |
} |
331 | 180 |
} |
Also available in: Unified diff