ShallowHistoryWithDeepEntry.c 20 KB

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