ShallowHistoryWithDeepEntry.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  1. #include <stdlib.h>
  2. #include <string.h>
  3. #include "sc_types.h"
  4. #include "ShallowHistoryWithDeepEntry.h"
  5. /*! \file Implementation of the state machine 'ShallowHistoryWithDeepEntry'
  6. */
  7. /* prototypes of all internal functions */
  8. static sc_boolean shallowHistoryWithDeepEntry_check_main_region_Y_tr0_tr0(const ShallowHistoryWithDeepEntry* handle);
  9. static sc_boolean shallowHistoryWithDeepEntry_check_main_region_Y_tr1_tr1(const ShallowHistoryWithDeepEntry* handle);
  10. static sc_boolean shallowHistoryWithDeepEntry_check_main_region_Z_tr0_tr0(const ShallowHistoryWithDeepEntry* handle);
  11. static sc_boolean shallowHistoryWithDeepEntry_check_main_region_Z__region0_A_tr0_tr0(const ShallowHistoryWithDeepEntry* handle);
  12. static sc_boolean shallowHistoryWithDeepEntry_check_main_region_Z__region0_B__region0_C_tr0_tr0(const ShallowHistoryWithDeepEntry* handle);
  13. static void shallowHistoryWithDeepEntry_effect_main_region_Y_tr0(ShallowHistoryWithDeepEntry* handle);
  14. static void shallowHistoryWithDeepEntry_effect_main_region_Y_tr1(ShallowHistoryWithDeepEntry* handle);
  15. static void shallowHistoryWithDeepEntry_effect_main_region_Z_tr0(ShallowHistoryWithDeepEntry* handle);
  16. static void shallowHistoryWithDeepEntry_effect_main_region_Z__region0_A_tr0(ShallowHistoryWithDeepEntry* handle);
  17. static void shallowHistoryWithDeepEntry_effect_main_region_Z__region0_B__region0_C_tr0(ShallowHistoryWithDeepEntry* handle);
  18. static void shallowHistoryWithDeepEntry_enseq_main_region_Y_default(ShallowHistoryWithDeepEntry* handle);
  19. static void shallowHistoryWithDeepEntry_enseq_main_region_Z_default(ShallowHistoryWithDeepEntry* handle);
  20. static void shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_A_default(ShallowHistoryWithDeepEntry* handle);
  21. static void shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B_default(ShallowHistoryWithDeepEntry* handle);
  22. static void shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B__region0_C_default(ShallowHistoryWithDeepEntry* handle);
  23. static void shallowHistoryWithDeepEntry_enseq_main_region_default(ShallowHistoryWithDeepEntry* handle);
  24. static void shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_default(ShallowHistoryWithDeepEntry* handle);
  25. static void shallowHistoryWithDeepEntry_shenseq_main_region_Z__region0(ShallowHistoryWithDeepEntry* handle);
  26. static void shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B__region0_default(ShallowHistoryWithDeepEntry* handle);
  27. static void shallowHistoryWithDeepEntry_exseq_main_region_Y(ShallowHistoryWithDeepEntry* handle);
  28. static void shallowHistoryWithDeepEntry_exseq_main_region_Z(ShallowHistoryWithDeepEntry* handle);
  29. static void shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_A(ShallowHistoryWithDeepEntry* handle);
  30. static void shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B(ShallowHistoryWithDeepEntry* handle);
  31. static void shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B__region0_C(ShallowHistoryWithDeepEntry* handle);
  32. static void shallowHistoryWithDeepEntry_exseq_main_region(ShallowHistoryWithDeepEntry* handle);
  33. static void shallowHistoryWithDeepEntry_exseq_main_region_Z__region0(ShallowHistoryWithDeepEntry* handle);
  34. static void shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B__region0(ShallowHistoryWithDeepEntry* handle);
  35. static void shallowHistoryWithDeepEntry_react_main_region_Y(ShallowHistoryWithDeepEntry* handle);
  36. static void shallowHistoryWithDeepEntry_react_main_region_Z__region0_A(ShallowHistoryWithDeepEntry* handle);
  37. static void shallowHistoryWithDeepEntry_react_main_region_Z__region0_B__region0_C(ShallowHistoryWithDeepEntry* handle);
  38. static void shallowHistoryWithDeepEntry_react_main_region__entry_Default(ShallowHistoryWithDeepEntry* handle);
  39. static void shallowHistoryWithDeepEntry_react_main_region_Z__region0__entry_Default(ShallowHistoryWithDeepEntry* handle);
  40. static void shallowHistoryWithDeepEntry_react_main_region_Z__region0_B__region0__entry_Default(ShallowHistoryWithDeepEntry* handle);
  41. static void shallowHistoryWithDeepEntry_clearInEvents(ShallowHistoryWithDeepEntry* handle);
  42. static void shallowHistoryWithDeepEntry_clearOutEvents(ShallowHistoryWithDeepEntry* handle);
  43. void shallowHistoryWithDeepEntry_init(ShallowHistoryWithDeepEntry* handle)
  44. {
  45. sc_integer i;
  46. for (i = 0; i < SHALLOWHISTORYWITHDEEPENTRY_MAX_ORTHOGONAL_STATES; ++i)
  47. {
  48. handle->stateConfVector[i] = ShallowHistoryWithDeepEntry_last_state;
  49. }
  50. for (i = 0; i < SHALLOWHISTORYWITHDEEPENTRY_MAX_HISTORY_STATES; ++i)
  51. {
  52. handle->historyVector[i] = ShallowHistoryWithDeepEntry_last_state;
  53. }
  54. handle->stateConfVectorPosition = 0;
  55. shallowHistoryWithDeepEntry_clearInEvents(handle);
  56. shallowHistoryWithDeepEntry_clearOutEvents(handle);
  57. }
  58. void shallowHistoryWithDeepEntry_enter(ShallowHistoryWithDeepEntry* handle)
  59. {
  60. /* Default enter sequence for statechart ShallowHistoryWithDeepEntry */
  61. shallowHistoryWithDeepEntry_enseq_main_region_default(handle);
  62. }
  63. void shallowHistoryWithDeepEntry_exit(ShallowHistoryWithDeepEntry* handle)
  64. {
  65. /* Default exit sequence for statechart ShallowHistoryWithDeepEntry */
  66. shallowHistoryWithDeepEntry_exseq_main_region(handle);
  67. }
  68. sc_boolean shallowHistoryWithDeepEntry_isActive(const ShallowHistoryWithDeepEntry* handle)
  69. {
  70. sc_boolean result;
  71. if (handle->stateConfVector[0] != ShallowHistoryWithDeepEntry_last_state)
  72. {
  73. result = bool_true;
  74. }
  75. else
  76. {
  77. result = bool_false;
  78. }
  79. return result;
  80. }
  81. /*
  82. * Always returns 'false' since this state machine can never become final.
  83. */
  84. sc_boolean shallowHistoryWithDeepEntry_isFinal(const ShallowHistoryWithDeepEntry* handle)
  85. {
  86. return bool_false;
  87. }
  88. static void shallowHistoryWithDeepEntry_clearInEvents(ShallowHistoryWithDeepEntry* handle)
  89. {
  90. handle->iface.toZ_raised = bool_false;
  91. handle->iface.toY_raised = bool_false;
  92. handle->iface.toC_raised = bool_false;
  93. handle->iface.toA_raised = bool_false;
  94. }
  95. static void shallowHistoryWithDeepEntry_clearOutEvents(ShallowHistoryWithDeepEntry* handle)
  96. {
  97. }
  98. void shallowHistoryWithDeepEntry_runCycle(ShallowHistoryWithDeepEntry* handle)
  99. {
  100. shallowHistoryWithDeepEntry_clearOutEvents(handle);
  101. for (handle->stateConfVectorPosition = 0;
  102. handle->stateConfVectorPosition < SHALLOWHISTORYWITHDEEPENTRY_MAX_ORTHOGONAL_STATES;
  103. handle->stateConfVectorPosition++)
  104. {
  105. switch (handle->stateConfVector[handle->stateConfVectorPosition])
  106. {
  107. case ShallowHistoryWithDeepEntry_main_region_Y :
  108. {
  109. shallowHistoryWithDeepEntry_react_main_region_Y(handle);
  110. break;
  111. }
  112. case ShallowHistoryWithDeepEntry_main_region_Z__region0_A :
  113. {
  114. shallowHistoryWithDeepEntry_react_main_region_Z__region0_A(handle);
  115. break;
  116. }
  117. case ShallowHistoryWithDeepEntry_main_region_Z__region0_B__region0_C :
  118. {
  119. shallowHistoryWithDeepEntry_react_main_region_Z__region0_B__region0_C(handle);
  120. break;
  121. }
  122. default:
  123. break;
  124. }
  125. }
  126. shallowHistoryWithDeepEntry_clearInEvents(handle);
  127. }
  128. sc_boolean shallowHistoryWithDeepEntry_isStateActive(const ShallowHistoryWithDeepEntry* handle, ShallowHistoryWithDeepEntryStates state)
  129. {
  130. sc_boolean result = bool_false;
  131. switch (state)
  132. {
  133. case ShallowHistoryWithDeepEntry_main_region_Y :
  134. result = (sc_boolean) (handle->stateConfVector[0] == ShallowHistoryWithDeepEntry_main_region_Y
  135. );
  136. break;
  137. case ShallowHistoryWithDeepEntry_main_region_Z :
  138. result = (sc_boolean) (handle->stateConfVector[0] >= ShallowHistoryWithDeepEntry_main_region_Z
  139. && handle->stateConfVector[0] <= ShallowHistoryWithDeepEntry_main_region_Z__region0_B__region0_C);
  140. break;
  141. case ShallowHistoryWithDeepEntry_main_region_Z__region0_A :
  142. result = (sc_boolean) (handle->stateConfVector[0] == ShallowHistoryWithDeepEntry_main_region_Z__region0_A
  143. );
  144. break;
  145. case ShallowHistoryWithDeepEntry_main_region_Z__region0_B :
  146. result = (sc_boolean) (handle->stateConfVector[0] >= ShallowHistoryWithDeepEntry_main_region_Z__region0_B
  147. && handle->stateConfVector[0] <= ShallowHistoryWithDeepEntry_main_region_Z__region0_B__region0_C);
  148. break;
  149. case ShallowHistoryWithDeepEntry_main_region_Z__region0_B__region0_C :
  150. result = (sc_boolean) (handle->stateConfVector[0] == ShallowHistoryWithDeepEntry_main_region_Z__region0_B__region0_C
  151. );
  152. break;
  153. default:
  154. result = bool_false;
  155. break;
  156. }
  157. return result;
  158. }
  159. void shallowHistoryWithDeepEntryIface_raise_toZ(ShallowHistoryWithDeepEntry* handle)
  160. {
  161. handle->iface.toZ_raised = bool_true;
  162. }
  163. void shallowHistoryWithDeepEntryIface_raise_toY(ShallowHistoryWithDeepEntry* handle)
  164. {
  165. handle->iface.toY_raised = bool_true;
  166. }
  167. void shallowHistoryWithDeepEntryIface_raise_toC(ShallowHistoryWithDeepEntry* handle)
  168. {
  169. handle->iface.toC_raised = bool_true;
  170. }
  171. void shallowHistoryWithDeepEntryIface_raise_toA(ShallowHistoryWithDeepEntry* handle)
  172. {
  173. handle->iface.toA_raised = bool_true;
  174. }
  175. /* implementations of all internal functions */
  176. static sc_boolean shallowHistoryWithDeepEntry_check_main_region_Y_tr0_tr0(const ShallowHistoryWithDeepEntry* handle)
  177. {
  178. return handle->iface.toZ_raised;
  179. }
  180. static sc_boolean shallowHistoryWithDeepEntry_check_main_region_Y_tr1_tr1(const ShallowHistoryWithDeepEntry* handle)
  181. {
  182. return handle->iface.toC_raised;
  183. }
  184. static sc_boolean shallowHistoryWithDeepEntry_check_main_region_Z_tr0_tr0(const ShallowHistoryWithDeepEntry* handle)
  185. {
  186. return handle->iface.toY_raised;
  187. }
  188. static sc_boolean shallowHistoryWithDeepEntry_check_main_region_Z__region0_A_tr0_tr0(const ShallowHistoryWithDeepEntry* handle)
  189. {
  190. return handle->iface.toC_raised;
  191. }
  192. static sc_boolean shallowHistoryWithDeepEntry_check_main_region_Z__region0_B__region0_C_tr0_tr0(const ShallowHistoryWithDeepEntry* handle)
  193. {
  194. return handle->iface.toA_raised;
  195. }
  196. static void shallowHistoryWithDeepEntry_effect_main_region_Y_tr0(ShallowHistoryWithDeepEntry* handle)
  197. {
  198. shallowHistoryWithDeepEntry_exseq_main_region_Y(handle);
  199. shallowHistoryWithDeepEntry_enseq_main_region_Z_default(handle);
  200. }
  201. static void shallowHistoryWithDeepEntry_effect_main_region_Y_tr1(ShallowHistoryWithDeepEntry* handle)
  202. {
  203. shallowHistoryWithDeepEntry_exseq_main_region_Y(handle);
  204. shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B__region0_C_default(handle);
  205. handle->historyVector[0] = handle->stateConfVector[0];
  206. }
  207. static void shallowHistoryWithDeepEntry_effect_main_region_Z_tr0(ShallowHistoryWithDeepEntry* handle)
  208. {
  209. shallowHistoryWithDeepEntry_exseq_main_region_Z(handle);
  210. shallowHistoryWithDeepEntry_enseq_main_region_Y_default(handle);
  211. }
  212. static void shallowHistoryWithDeepEntry_effect_main_region_Z__region0_A_tr0(ShallowHistoryWithDeepEntry* handle)
  213. {
  214. shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_A(handle);
  215. shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B__region0_C_default(handle);
  216. handle->historyVector[0] = handle->stateConfVector[0];
  217. }
  218. static void shallowHistoryWithDeepEntry_effect_main_region_Z__region0_B__region0_C_tr0(ShallowHistoryWithDeepEntry* handle)
  219. {
  220. shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B(handle);
  221. shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_A_default(handle);
  222. }
  223. /* 'default' enter sequence for state Y */
  224. static void shallowHistoryWithDeepEntry_enseq_main_region_Y_default(ShallowHistoryWithDeepEntry* handle)
  225. {
  226. /* 'default' enter sequence for state Y */
  227. handle->stateConfVector[0] = ShallowHistoryWithDeepEntry_main_region_Y;
  228. handle->stateConfVectorPosition = 0;
  229. }
  230. /* 'default' enter sequence for state Z */
  231. static void shallowHistoryWithDeepEntry_enseq_main_region_Z_default(ShallowHistoryWithDeepEntry* handle)
  232. {
  233. /* 'default' enter sequence for state Z */
  234. shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_default(handle);
  235. }
  236. /* 'default' enter sequence for state A */
  237. static void shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_A_default(ShallowHistoryWithDeepEntry* handle)
  238. {
  239. /* 'default' enter sequence for state A */
  240. handle->stateConfVector[0] = ShallowHistoryWithDeepEntry_main_region_Z__region0_A;
  241. handle->stateConfVectorPosition = 0;
  242. handle->historyVector[0] = handle->stateConfVector[0];
  243. }
  244. /* 'default' enter sequence for state B */
  245. static void shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B_default(ShallowHistoryWithDeepEntry* handle)
  246. {
  247. /* 'default' enter sequence for state B */
  248. shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B__region0_default(handle);
  249. handle->historyVector[0] = handle->stateConfVector[0];
  250. }
  251. /* 'default' enter sequence for state C */
  252. static void shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B__region0_C_default(ShallowHistoryWithDeepEntry* handle)
  253. {
  254. /* 'default' enter sequence for state C */
  255. handle->stateConfVector[0] = ShallowHistoryWithDeepEntry_main_region_Z__region0_B__region0_C;
  256. handle->stateConfVectorPosition = 0;
  257. }
  258. /* 'default' enter sequence for region main region */
  259. static void shallowHistoryWithDeepEntry_enseq_main_region_default(ShallowHistoryWithDeepEntry* handle)
  260. {
  261. /* 'default' enter sequence for region main region */
  262. shallowHistoryWithDeepEntry_react_main_region__entry_Default(handle);
  263. }
  264. /* 'default' enter sequence for region null */
  265. static void shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_default(ShallowHistoryWithDeepEntry* handle)
  266. {
  267. /* 'default' enter sequence for region null */
  268. shallowHistoryWithDeepEntry_react_main_region_Z__region0__entry_Default(handle);
  269. }
  270. /* shallow enterSequence with history in child null */
  271. static void shallowHistoryWithDeepEntry_shenseq_main_region_Z__region0(ShallowHistoryWithDeepEntry* handle)
  272. {
  273. /* shallow enterSequence with history in child null */
  274. /* Handle shallow history entry of null */
  275. switch(handle->historyVector[ 0 ])
  276. {
  277. case ShallowHistoryWithDeepEntry_main_region_Z__region0_A :
  278. {
  279. shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_A_default(handle);
  280. break;
  281. }
  282. case ShallowHistoryWithDeepEntry_main_region_Z__region0_B__region0_C :
  283. {
  284. shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B_default(handle);
  285. break;
  286. }
  287. default: break;
  288. }
  289. }
  290. /* 'default' enter sequence for region null */
  291. static void shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B__region0_default(ShallowHistoryWithDeepEntry* handle)
  292. {
  293. /* 'default' enter sequence for region null */
  294. shallowHistoryWithDeepEntry_react_main_region_Z__region0_B__region0__entry_Default(handle);
  295. }
  296. /* Default exit sequence for state Y */
  297. static void shallowHistoryWithDeepEntry_exseq_main_region_Y(ShallowHistoryWithDeepEntry* handle)
  298. {
  299. /* Default exit sequence for state Y */
  300. handle->stateConfVector[0] = ShallowHistoryWithDeepEntry_last_state;
  301. handle->stateConfVectorPosition = 0;
  302. }
  303. /* Default exit sequence for state Z */
  304. static void shallowHistoryWithDeepEntry_exseq_main_region_Z(ShallowHistoryWithDeepEntry* handle)
  305. {
  306. /* Default exit sequence for state Z */
  307. shallowHistoryWithDeepEntry_exseq_main_region_Z__region0(handle);
  308. }
  309. /* Default exit sequence for state A */
  310. static void shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_A(ShallowHistoryWithDeepEntry* handle)
  311. {
  312. /* Default exit sequence for state A */
  313. handle->stateConfVector[0] = ShallowHistoryWithDeepEntry_last_state;
  314. handle->stateConfVectorPosition = 0;
  315. }
  316. /* Default exit sequence for state B */
  317. static void shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B(ShallowHistoryWithDeepEntry* handle)
  318. {
  319. /* Default exit sequence for state B */
  320. shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B__region0(handle);
  321. }
  322. /* Default exit sequence for state C */
  323. static void shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B__region0_C(ShallowHistoryWithDeepEntry* handle)
  324. {
  325. /* Default exit sequence for state C */
  326. handle->stateConfVector[0] = ShallowHistoryWithDeepEntry_last_state;
  327. handle->stateConfVectorPosition = 0;
  328. }
  329. /* Default exit sequence for region main region */
  330. static void shallowHistoryWithDeepEntry_exseq_main_region(ShallowHistoryWithDeepEntry* handle)
  331. {
  332. /* Default exit sequence for region main region */
  333. /* Handle exit of all possible states (of ShallowHistoryWithDeepEntry.main_region) at position 0... */
  334. switch(handle->stateConfVector[ 0 ])
  335. {
  336. case ShallowHistoryWithDeepEntry_main_region_Y :
  337. {
  338. shallowHistoryWithDeepEntry_exseq_main_region_Y(handle);
  339. break;
  340. }
  341. case ShallowHistoryWithDeepEntry_main_region_Z__region0_A :
  342. {
  343. shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_A(handle);
  344. break;
  345. }
  346. case ShallowHistoryWithDeepEntry_main_region_Z__region0_B__region0_C :
  347. {
  348. shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B__region0_C(handle);
  349. break;
  350. }
  351. default: break;
  352. }
  353. }
  354. /* Default exit sequence for region null */
  355. static void shallowHistoryWithDeepEntry_exseq_main_region_Z__region0(ShallowHistoryWithDeepEntry* handle)
  356. {
  357. /* Default exit sequence for region null */
  358. /* Handle exit of all possible states (of ShallowHistoryWithDeepEntry.main_region.Z._region0) at position 0... */
  359. switch(handle->stateConfVector[ 0 ])
  360. {
  361. case ShallowHistoryWithDeepEntry_main_region_Z__region0_A :
  362. {
  363. shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_A(handle);
  364. break;
  365. }
  366. case ShallowHistoryWithDeepEntry_main_region_Z__region0_B__region0_C :
  367. {
  368. shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B__region0_C(handle);
  369. break;
  370. }
  371. default: break;
  372. }
  373. }
  374. /* Default exit sequence for region null */
  375. static void shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B__region0(ShallowHistoryWithDeepEntry* handle)
  376. {
  377. /* Default exit sequence for region null */
  378. /* Handle exit of all possible states (of ShallowHistoryWithDeepEntry.main_region.Z._region0.B._region0) at position 0... */
  379. switch(handle->stateConfVector[ 0 ])
  380. {
  381. case ShallowHistoryWithDeepEntry_main_region_Z__region0_B__region0_C :
  382. {
  383. shallowHistoryWithDeepEntry_exseq_main_region_Z__region0_B__region0_C(handle);
  384. break;
  385. }
  386. default: break;
  387. }
  388. }
  389. /* The reactions of state Y. */
  390. static void shallowHistoryWithDeepEntry_react_main_region_Y(ShallowHistoryWithDeepEntry* handle)
  391. {
  392. /* The reactions of state Y. */
  393. if (shallowHistoryWithDeepEntry_check_main_region_Y_tr0_tr0(handle) == bool_true)
  394. {
  395. shallowHistoryWithDeepEntry_effect_main_region_Y_tr0(handle);
  396. } else
  397. {
  398. if (shallowHistoryWithDeepEntry_check_main_region_Y_tr1_tr1(handle) == bool_true)
  399. {
  400. shallowHistoryWithDeepEntry_effect_main_region_Y_tr1(handle);
  401. }
  402. }
  403. }
  404. /* The reactions of state A. */
  405. static void shallowHistoryWithDeepEntry_react_main_region_Z__region0_A(ShallowHistoryWithDeepEntry* handle)
  406. {
  407. /* The reactions of state A. */
  408. if (shallowHistoryWithDeepEntry_check_main_region_Z_tr0_tr0(handle) == bool_true)
  409. {
  410. shallowHistoryWithDeepEntry_effect_main_region_Z_tr0(handle);
  411. } else
  412. {
  413. if (shallowHistoryWithDeepEntry_check_main_region_Z__region0_A_tr0_tr0(handle) == bool_true)
  414. {
  415. shallowHistoryWithDeepEntry_effect_main_region_Z__region0_A_tr0(handle);
  416. }
  417. }
  418. }
  419. /* The reactions of state C. */
  420. static void shallowHistoryWithDeepEntry_react_main_region_Z__region0_B__region0_C(ShallowHistoryWithDeepEntry* handle)
  421. {
  422. /* The reactions of state C. */
  423. if (shallowHistoryWithDeepEntry_check_main_region_Z_tr0_tr0(handle) == bool_true)
  424. {
  425. shallowHistoryWithDeepEntry_effect_main_region_Z_tr0(handle);
  426. } else
  427. {
  428. if (shallowHistoryWithDeepEntry_check_main_region_Z__region0_B__region0_C_tr0_tr0(handle) == bool_true)
  429. {
  430. shallowHistoryWithDeepEntry_effect_main_region_Z__region0_B__region0_C_tr0(handle);
  431. }
  432. }
  433. }
  434. /* Default react sequence for initial entry */
  435. static void shallowHistoryWithDeepEntry_react_main_region__entry_Default(ShallowHistoryWithDeepEntry* handle)
  436. {
  437. /* Default react sequence for initial entry */
  438. shallowHistoryWithDeepEntry_enseq_main_region_Y_default(handle);
  439. }
  440. /* Default react sequence for shallow history entry */
  441. static void shallowHistoryWithDeepEntry_react_main_region_Z__region0__entry_Default(ShallowHistoryWithDeepEntry* handle)
  442. {
  443. /* Default react sequence for shallow history entry */
  444. /* Enter the region with shallow history */
  445. if (handle->historyVector[0] != ShallowHistoryWithDeepEntry_last_state)
  446. {
  447. shallowHistoryWithDeepEntry_shenseq_main_region_Z__region0(handle);
  448. } else
  449. {
  450. shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_A_default(handle);
  451. }
  452. }
  453. /* Default react sequence for initial entry */
  454. static void shallowHistoryWithDeepEntry_react_main_region_Z__region0_B__region0__entry_Default(ShallowHistoryWithDeepEntry* handle)
  455. {
  456. /* Default react sequence for initial entry */
  457. shallowHistoryWithDeepEntry_enseq_main_region_Z__region0_B__region0_C_default(handle);
  458. }