ValuedEvents.c 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984
  1. #include <stdlib.h>
  2. #include <string.h>
  3. #include "sc_types.h"
  4. #include "ValuedEvents.h"
  5. /*! \file Implementation of the state machine 'ValuedEvents'
  6. */
  7. /* prototypes of all internal functions */
  8. static sc_boolean valuedEvents_check_integer_region_B_tr0_tr0(const ValuedEvents* handle);
  9. static sc_boolean valuedEvents_check_integer_region_C_tr0_tr0(const ValuedEvents* handle);
  10. static sc_boolean valuedEvents_check_boolean_region_B_tr0_tr0(const ValuedEvents* handle);
  11. static sc_boolean valuedEvents_check_boolean_region_C_tr0_tr0(const ValuedEvents* handle);
  12. static sc_boolean valuedEvents_check_real_region_B_tr0_tr0(const ValuedEvents* handle);
  13. static sc_boolean valuedEvents_check_real_region_C_tr0_tr0(const ValuedEvents* handle);
  14. static sc_boolean valuedEvents_check_string_region_B_tr0_tr0(const ValuedEvents* handle);
  15. static sc_boolean valuedEvents_check_string_region_C_tr0_tr0(const ValuedEvents* handle);
  16. static void valuedEvents_effect_integer_region_B_tr0(ValuedEvents* handle);
  17. static void valuedEvents_effect_integer_region_C_tr0(ValuedEvents* handle);
  18. static void valuedEvents_effect_boolean_region_B_tr0(ValuedEvents* handle);
  19. static void valuedEvents_effect_boolean_region_C_tr0(ValuedEvents* handle);
  20. static void valuedEvents_effect_real_region_B_tr0(ValuedEvents* handle);
  21. static void valuedEvents_effect_real_region_C_tr0(ValuedEvents* handle);
  22. static void valuedEvents_effect_string_region_B_tr0(ValuedEvents* handle);
  23. static void valuedEvents_effect_string_region_C_tr0(ValuedEvents* handle);
  24. static void valuedEvents_enact_main_region1_A(ValuedEvents* handle);
  25. static void valuedEvents_enseq_main_region1_A_default(ValuedEvents* handle);
  26. static void valuedEvents_enseq_integer_region_B_default(ValuedEvents* handle);
  27. static void valuedEvents_enseq_integer_region_C_default(ValuedEvents* handle);
  28. static void valuedEvents_enseq_integer_region_D_default(ValuedEvents* handle);
  29. static void valuedEvents_enseq_boolean_region_B_default(ValuedEvents* handle);
  30. static void valuedEvents_enseq_boolean_region_C_default(ValuedEvents* handle);
  31. static void valuedEvents_enseq_boolean_region_D_default(ValuedEvents* handle);
  32. static void valuedEvents_enseq_real_region_B_default(ValuedEvents* handle);
  33. static void valuedEvents_enseq_real_region_C_default(ValuedEvents* handle);
  34. static void valuedEvents_enseq_real_region_D_default(ValuedEvents* handle);
  35. static void valuedEvents_enseq_string_region_B_default(ValuedEvents* handle);
  36. static void valuedEvents_enseq_string_region_C_default(ValuedEvents* handle);
  37. static void valuedEvents_enseq_string_region_D_default(ValuedEvents* handle);
  38. static void valuedEvents_enseq_main_region1_default(ValuedEvents* handle);
  39. static void valuedEvents_enseq_integer_region_default(ValuedEvents* handle);
  40. static void valuedEvents_enseq_boolean_region_default(ValuedEvents* handle);
  41. static void valuedEvents_enseq_real_region_default(ValuedEvents* handle);
  42. static void valuedEvents_enseq_string_region_default(ValuedEvents* handle);
  43. static void valuedEvents_exseq_main_region1_A(ValuedEvents* handle);
  44. static void valuedEvents_exseq_integer_region_B(ValuedEvents* handle);
  45. static void valuedEvents_exseq_integer_region_C(ValuedEvents* handle);
  46. static void valuedEvents_exseq_integer_region_D(ValuedEvents* handle);
  47. static void valuedEvents_exseq_boolean_region_B(ValuedEvents* handle);
  48. static void valuedEvents_exseq_boolean_region_C(ValuedEvents* handle);
  49. static void valuedEvents_exseq_boolean_region_D(ValuedEvents* handle);
  50. static void valuedEvents_exseq_real_region_B(ValuedEvents* handle);
  51. static void valuedEvents_exseq_real_region_C(ValuedEvents* handle);
  52. static void valuedEvents_exseq_real_region_D(ValuedEvents* handle);
  53. static void valuedEvents_exseq_string_region_B(ValuedEvents* handle);
  54. static void valuedEvents_exseq_string_region_C(ValuedEvents* handle);
  55. static void valuedEvents_exseq_string_region_D(ValuedEvents* handle);
  56. static void valuedEvents_exseq_main_region1(ValuedEvents* handle);
  57. static void valuedEvents_exseq_integer_region(ValuedEvents* handle);
  58. static void valuedEvents_exseq_boolean_region(ValuedEvents* handle);
  59. static void valuedEvents_exseq_real_region(ValuedEvents* handle);
  60. static void valuedEvents_exseq_string_region(ValuedEvents* handle);
  61. static void valuedEvents_react_main_region1_A(ValuedEvents* handle);
  62. static void valuedEvents_react_integer_region_B(ValuedEvents* handle);
  63. static void valuedEvents_react_integer_region_C(ValuedEvents* handle);
  64. static void valuedEvents_react_integer_region_D(ValuedEvents* handle);
  65. static void valuedEvents_react_boolean_region_B(ValuedEvents* handle);
  66. static void valuedEvents_react_boolean_region_C(ValuedEvents* handle);
  67. static void valuedEvents_react_boolean_region_D(ValuedEvents* handle);
  68. static void valuedEvents_react_real_region_B(ValuedEvents* handle);
  69. static void valuedEvents_react_real_region_C(ValuedEvents* handle);
  70. static void valuedEvents_react_real_region_D(ValuedEvents* handle);
  71. static void valuedEvents_react_string_region_B(ValuedEvents* handle);
  72. static void valuedEvents_react_string_region_C(ValuedEvents* handle);
  73. static void valuedEvents_react_string_region_D(ValuedEvents* handle);
  74. static void valuedEvents_react_main_region1__entry_Default(ValuedEvents* handle);
  75. static void valuedEvents_react_integer_region__entry_Default(ValuedEvents* handle);
  76. static void valuedEvents_react_boolean_region__entry_Default(ValuedEvents* handle);
  77. static void valuedEvents_react_real_region__entry_Default(ValuedEvents* handle);
  78. static void valuedEvents_react_string_region__entry_Default(ValuedEvents* handle);
  79. static void valuedEvents_clearInEvents(ValuedEvents* handle);
  80. static void valuedEvents_clearOutEvents(ValuedEvents* handle);
  81. void valuedEvents_init(ValuedEvents* handle)
  82. {
  83. sc_integer i;
  84. for (i = 0; i < VALUEDEVENTS_MAX_ORTHOGONAL_STATES; ++i)
  85. {
  86. handle->stateConfVector[i] = ValuedEvents_last_state;
  87. }
  88. handle->stateConfVectorPosition = 0;
  89. valuedEvents_clearInEvents(handle);
  90. valuedEvents_clearOutEvents(handle);
  91. /* Default init sequence for statechart ValuedEvents */
  92. handle->iface.myInt = 0;
  93. handle->iface.myBool = bool_false;
  94. handle->iface.myReal = 0.0;
  95. handle->iface.myString = "";
  96. }
  97. void valuedEvents_enter(ValuedEvents* handle)
  98. {
  99. /* Default enter sequence for statechart ValuedEvents */
  100. valuedEvents_enseq_main_region1_default(handle);
  101. valuedEvents_enseq_integer_region_default(handle);
  102. valuedEvents_enseq_boolean_region_default(handle);
  103. valuedEvents_enseq_real_region_default(handle);
  104. valuedEvents_enseq_string_region_default(handle);
  105. }
  106. void valuedEvents_exit(ValuedEvents* handle)
  107. {
  108. /* Default exit sequence for statechart ValuedEvents */
  109. valuedEvents_exseq_main_region1(handle);
  110. valuedEvents_exseq_integer_region(handle);
  111. valuedEvents_exseq_boolean_region(handle);
  112. valuedEvents_exseq_real_region(handle);
  113. valuedEvents_exseq_string_region(handle);
  114. }
  115. sc_boolean valuedEvents_isActive(const ValuedEvents* handle)
  116. {
  117. sc_boolean result = bool_false;
  118. int i;
  119. for(i = 0; i < VALUEDEVENTS_MAX_ORTHOGONAL_STATES; i++)
  120. {
  121. result = result || handle->stateConfVector[i] != ValuedEvents_last_state;
  122. }
  123. return result;
  124. }
  125. /*
  126. * Always returns 'false' since this state machine can never become final.
  127. */
  128. sc_boolean valuedEvents_isFinal(const ValuedEvents* handle)
  129. {
  130. return bool_false;
  131. }
  132. static void valuedEvents_clearInEvents(ValuedEvents* handle)
  133. {
  134. handle->iface.integerEvent_raised = bool_false;
  135. handle->iface.booleanEvent_raised = bool_false;
  136. handle->iface.realEvent_raised = bool_false;
  137. handle->iface.stringEvent_raised = bool_false;
  138. }
  139. static void valuedEvents_clearOutEvents(ValuedEvents* handle)
  140. {
  141. }
  142. void valuedEvents_runCycle(ValuedEvents* handle)
  143. {
  144. valuedEvents_clearOutEvents(handle);
  145. for (handle->stateConfVectorPosition = 0;
  146. handle->stateConfVectorPosition < VALUEDEVENTS_MAX_ORTHOGONAL_STATES;
  147. handle->stateConfVectorPosition++)
  148. {
  149. switch (handle->stateConfVector[handle->stateConfVectorPosition])
  150. {
  151. case ValuedEvents_main_region1_A :
  152. {
  153. valuedEvents_react_main_region1_A(handle);
  154. break;
  155. }
  156. case ValuedEvents_integer_region_B :
  157. {
  158. valuedEvents_react_integer_region_B(handle);
  159. break;
  160. }
  161. case ValuedEvents_integer_region_C :
  162. {
  163. valuedEvents_react_integer_region_C(handle);
  164. break;
  165. }
  166. case ValuedEvents_integer_region_D :
  167. {
  168. valuedEvents_react_integer_region_D(handle);
  169. break;
  170. }
  171. case ValuedEvents_boolean_region_B :
  172. {
  173. valuedEvents_react_boolean_region_B(handle);
  174. break;
  175. }
  176. case ValuedEvents_boolean_region_C :
  177. {
  178. valuedEvents_react_boolean_region_C(handle);
  179. break;
  180. }
  181. case ValuedEvents_boolean_region_D :
  182. {
  183. valuedEvents_react_boolean_region_D(handle);
  184. break;
  185. }
  186. case ValuedEvents_real_region_B :
  187. {
  188. valuedEvents_react_real_region_B(handle);
  189. break;
  190. }
  191. case ValuedEvents_real_region_C :
  192. {
  193. valuedEvents_react_real_region_C(handle);
  194. break;
  195. }
  196. case ValuedEvents_real_region_D :
  197. {
  198. valuedEvents_react_real_region_D(handle);
  199. break;
  200. }
  201. case ValuedEvents_string_region_B :
  202. {
  203. valuedEvents_react_string_region_B(handle);
  204. break;
  205. }
  206. case ValuedEvents_string_region_C :
  207. {
  208. valuedEvents_react_string_region_C(handle);
  209. break;
  210. }
  211. case ValuedEvents_string_region_D :
  212. {
  213. valuedEvents_react_string_region_D(handle);
  214. break;
  215. }
  216. default:
  217. break;
  218. }
  219. }
  220. valuedEvents_clearInEvents(handle);
  221. }
  222. sc_boolean valuedEvents_isStateActive(const ValuedEvents* handle, ValuedEventsStates state)
  223. {
  224. sc_boolean result = bool_false;
  225. switch (state)
  226. {
  227. case ValuedEvents_main_region1_A :
  228. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_MAIN_REGION1_A] == ValuedEvents_main_region1_A
  229. );
  230. break;
  231. case ValuedEvents_integer_region_B :
  232. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_INTEGER_REGION_B] == ValuedEvents_integer_region_B
  233. );
  234. break;
  235. case ValuedEvents_integer_region_C :
  236. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_INTEGER_REGION_C] == ValuedEvents_integer_region_C
  237. );
  238. break;
  239. case ValuedEvents_integer_region_D :
  240. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_INTEGER_REGION_D] == ValuedEvents_integer_region_D
  241. );
  242. break;
  243. case ValuedEvents_boolean_region_B :
  244. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_BOOLEAN_REGION_B] == ValuedEvents_boolean_region_B
  245. );
  246. break;
  247. case ValuedEvents_boolean_region_C :
  248. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_BOOLEAN_REGION_C] == ValuedEvents_boolean_region_C
  249. );
  250. break;
  251. case ValuedEvents_boolean_region_D :
  252. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_BOOLEAN_REGION_D] == ValuedEvents_boolean_region_D
  253. );
  254. break;
  255. case ValuedEvents_real_region_B :
  256. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_REAL_REGION_B] == ValuedEvents_real_region_B
  257. );
  258. break;
  259. case ValuedEvents_real_region_C :
  260. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_REAL_REGION_C] == ValuedEvents_real_region_C
  261. );
  262. break;
  263. case ValuedEvents_real_region_D :
  264. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_REAL_REGION_D] == ValuedEvents_real_region_D
  265. );
  266. break;
  267. case ValuedEvents_string_region_B :
  268. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_STRING_REGION_B] == ValuedEvents_string_region_B
  269. );
  270. break;
  271. case ValuedEvents_string_region_C :
  272. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_STRING_REGION_C] == ValuedEvents_string_region_C
  273. );
  274. break;
  275. case ValuedEvents_string_region_D :
  276. result = (sc_boolean) (handle->stateConfVector[SCVI_VALUEDEVENTS_STRING_REGION_D] == ValuedEvents_string_region_D
  277. );
  278. break;
  279. default:
  280. result = bool_false;
  281. break;
  282. }
  283. return result;
  284. }
  285. void valuedEventsIface_raise_integerEvent(ValuedEvents* handle, sc_integer value)
  286. {
  287. handle->iface.integerEvent_value = value;
  288. handle->iface.integerEvent_raised = bool_true;
  289. }
  290. void valuedEventsIface_raise_booleanEvent(ValuedEvents* handle, sc_boolean value)
  291. {
  292. handle->iface.booleanEvent_value = value;
  293. handle->iface.booleanEvent_raised = bool_true;
  294. }
  295. void valuedEventsIface_raise_realEvent(ValuedEvents* handle, sc_real value)
  296. {
  297. handle->iface.realEvent_value = value;
  298. handle->iface.realEvent_raised = bool_true;
  299. }
  300. void valuedEventsIface_raise_stringEvent(ValuedEvents* handle, sc_string value)
  301. {
  302. handle->iface.stringEvent_value = value;
  303. handle->iface.stringEvent_raised = bool_true;
  304. }
  305. sc_integer valuedEventsIface_get_myInt(const ValuedEvents* handle)
  306. {
  307. return handle->iface.myInt;
  308. }
  309. void valuedEventsIface_set_myInt(ValuedEvents* handle, sc_integer value)
  310. {
  311. handle->iface.myInt = value;
  312. }
  313. sc_boolean valuedEventsIface_get_myBool(const ValuedEvents* handle)
  314. {
  315. return handle->iface.myBool;
  316. }
  317. void valuedEventsIface_set_myBool(ValuedEvents* handle, sc_boolean value)
  318. {
  319. handle->iface.myBool = value;
  320. }
  321. sc_real valuedEventsIface_get_myReal(const ValuedEvents* handle)
  322. {
  323. return handle->iface.myReal;
  324. }
  325. void valuedEventsIface_set_myReal(ValuedEvents* handle, sc_real value)
  326. {
  327. handle->iface.myReal = value;
  328. }
  329. sc_string valuedEventsIface_get_myString(const ValuedEvents* handle)
  330. {
  331. return handle->iface.myString;
  332. }
  333. void valuedEventsIface_set_myString(ValuedEvents* handle, sc_string value)
  334. {
  335. handle->iface.myString = value;
  336. }
  337. /* implementations of all internal functions */
  338. static sc_boolean valuedEvents_check_integer_region_B_tr0_tr0(const ValuedEvents* handle)
  339. {
  340. return handle->iface.integerEvent_raised;
  341. }
  342. static sc_boolean valuedEvents_check_integer_region_C_tr0_tr0(const ValuedEvents* handle)
  343. {
  344. return handle->iface.integerEvent_raised;
  345. }
  346. static sc_boolean valuedEvents_check_boolean_region_B_tr0_tr0(const ValuedEvents* handle)
  347. {
  348. return handle->iface.booleanEvent_raised;
  349. }
  350. static sc_boolean valuedEvents_check_boolean_region_C_tr0_tr0(const ValuedEvents* handle)
  351. {
  352. return handle->iface.booleanEvent_raised;
  353. }
  354. static sc_boolean valuedEvents_check_real_region_B_tr0_tr0(const ValuedEvents* handle)
  355. {
  356. return handle->iface.realEvent_raised;
  357. }
  358. static sc_boolean valuedEvents_check_real_region_C_tr0_tr0(const ValuedEvents* handle)
  359. {
  360. return handle->iface.realEvent_raised;
  361. }
  362. static sc_boolean valuedEvents_check_string_region_B_tr0_tr0(const ValuedEvents* handle)
  363. {
  364. return handle->iface.stringEvent_raised;
  365. }
  366. static sc_boolean valuedEvents_check_string_region_C_tr0_tr0(const ValuedEvents* handle)
  367. {
  368. return handle->iface.stringEvent_raised;
  369. }
  370. static void valuedEvents_effect_integer_region_B_tr0(ValuedEvents* handle)
  371. {
  372. valuedEvents_exseq_integer_region_B(handle);
  373. handle->iface.myInt = handle->iface.integerEvent_value;
  374. valuedEvents_enseq_integer_region_C_default(handle);
  375. }
  376. static void valuedEvents_effect_integer_region_C_tr0(ValuedEvents* handle)
  377. {
  378. valuedEvents_exseq_integer_region_C(handle);
  379. handle->iface.myInt = handle->iface.integerEvent_value;
  380. valuedEvents_enseq_integer_region_D_default(handle);
  381. }
  382. static void valuedEvents_effect_boolean_region_B_tr0(ValuedEvents* handle)
  383. {
  384. valuedEvents_exseq_boolean_region_B(handle);
  385. handle->iface.myBool = handle->iface.booleanEvent_value;
  386. valuedEvents_enseq_boolean_region_C_default(handle);
  387. }
  388. static void valuedEvents_effect_boolean_region_C_tr0(ValuedEvents* handle)
  389. {
  390. valuedEvents_exseq_boolean_region_C(handle);
  391. handle->iface.myBool = handle->iface.booleanEvent_value;
  392. valuedEvents_enseq_boolean_region_D_default(handle);
  393. }
  394. static void valuedEvents_effect_real_region_B_tr0(ValuedEvents* handle)
  395. {
  396. valuedEvents_exseq_real_region_B(handle);
  397. handle->iface.myReal = handle->iface.realEvent_value;
  398. valuedEvents_enseq_real_region_C_default(handle);
  399. }
  400. static void valuedEvents_effect_real_region_C_tr0(ValuedEvents* handle)
  401. {
  402. valuedEvents_exseq_real_region_C(handle);
  403. handle->iface.myReal = handle->iface.realEvent_value;
  404. valuedEvents_enseq_real_region_D_default(handle);
  405. }
  406. static void valuedEvents_effect_string_region_B_tr0(ValuedEvents* handle)
  407. {
  408. valuedEvents_exseq_string_region_B(handle);
  409. handle->iface.myString = handle->iface.stringEvent_value;
  410. valuedEvents_enseq_string_region_C_default(handle);
  411. }
  412. static void valuedEvents_effect_string_region_C_tr0(ValuedEvents* handle)
  413. {
  414. valuedEvents_exseq_string_region_C(handle);
  415. handle->iface.myString = handle->iface.stringEvent_value;
  416. valuedEvents_enseq_string_region_D_default(handle);
  417. }
  418. /* Entry action for state 'A'. */
  419. static void valuedEvents_enact_main_region1_A(ValuedEvents* handle)
  420. {
  421. /* Entry action for state 'A'. */
  422. handle->iface.integerEvent_value = 2 * 21;
  423. handle->iface.integerEvent_raised = bool_true;
  424. handle->iface.realEvent_value = 10;
  425. handle->iface.realEvent_raised = bool_true;
  426. handle->iface.booleanEvent_value = bool_true || bool_false;
  427. handle->iface.booleanEvent_raised = bool_true;
  428. handle->iface.stringEvent_value = "sct";
  429. handle->iface.stringEvent_raised = bool_true;
  430. }
  431. /* 'default' enter sequence for state A */
  432. static void valuedEvents_enseq_main_region1_A_default(ValuedEvents* handle)
  433. {
  434. /* 'default' enter sequence for state A */
  435. valuedEvents_enact_main_region1_A(handle);
  436. handle->stateConfVector[0] = ValuedEvents_main_region1_A;
  437. handle->stateConfVectorPosition = 0;
  438. }
  439. /* 'default' enter sequence for state B */
  440. static void valuedEvents_enseq_integer_region_B_default(ValuedEvents* handle)
  441. {
  442. /* 'default' enter sequence for state B */
  443. handle->stateConfVector[1] = ValuedEvents_integer_region_B;
  444. handle->stateConfVectorPosition = 1;
  445. }
  446. /* 'default' enter sequence for state C */
  447. static void valuedEvents_enseq_integer_region_C_default(ValuedEvents* handle)
  448. {
  449. /* 'default' enter sequence for state C */
  450. handle->stateConfVector[1] = ValuedEvents_integer_region_C;
  451. handle->stateConfVectorPosition = 1;
  452. }
  453. /* 'default' enter sequence for state D */
  454. static void valuedEvents_enseq_integer_region_D_default(ValuedEvents* handle)
  455. {
  456. /* 'default' enter sequence for state D */
  457. handle->stateConfVector[1] = ValuedEvents_integer_region_D;
  458. handle->stateConfVectorPosition = 1;
  459. }
  460. /* 'default' enter sequence for state B */
  461. static void valuedEvents_enseq_boolean_region_B_default(ValuedEvents* handle)
  462. {
  463. /* 'default' enter sequence for state B */
  464. handle->stateConfVector[2] = ValuedEvents_boolean_region_B;
  465. handle->stateConfVectorPosition = 2;
  466. }
  467. /* 'default' enter sequence for state C */
  468. static void valuedEvents_enseq_boolean_region_C_default(ValuedEvents* handle)
  469. {
  470. /* 'default' enter sequence for state C */
  471. handle->stateConfVector[2] = ValuedEvents_boolean_region_C;
  472. handle->stateConfVectorPosition = 2;
  473. }
  474. /* 'default' enter sequence for state D */
  475. static void valuedEvents_enseq_boolean_region_D_default(ValuedEvents* handle)
  476. {
  477. /* 'default' enter sequence for state D */
  478. handle->stateConfVector[2] = ValuedEvents_boolean_region_D;
  479. handle->stateConfVectorPosition = 2;
  480. }
  481. /* 'default' enter sequence for state B */
  482. static void valuedEvents_enseq_real_region_B_default(ValuedEvents* handle)
  483. {
  484. /* 'default' enter sequence for state B */
  485. handle->stateConfVector[3] = ValuedEvents_real_region_B;
  486. handle->stateConfVectorPosition = 3;
  487. }
  488. /* 'default' enter sequence for state C */
  489. static void valuedEvents_enseq_real_region_C_default(ValuedEvents* handle)
  490. {
  491. /* 'default' enter sequence for state C */
  492. handle->stateConfVector[3] = ValuedEvents_real_region_C;
  493. handle->stateConfVectorPosition = 3;
  494. }
  495. /* 'default' enter sequence for state D */
  496. static void valuedEvents_enseq_real_region_D_default(ValuedEvents* handle)
  497. {
  498. /* 'default' enter sequence for state D */
  499. handle->stateConfVector[3] = ValuedEvents_real_region_D;
  500. handle->stateConfVectorPosition = 3;
  501. }
  502. /* 'default' enter sequence for state B */
  503. static void valuedEvents_enseq_string_region_B_default(ValuedEvents* handle)
  504. {
  505. /* 'default' enter sequence for state B */
  506. handle->stateConfVector[4] = ValuedEvents_string_region_B;
  507. handle->stateConfVectorPosition = 4;
  508. }
  509. /* 'default' enter sequence for state C */
  510. static void valuedEvents_enseq_string_region_C_default(ValuedEvents* handle)
  511. {
  512. /* 'default' enter sequence for state C */
  513. handle->stateConfVector[4] = ValuedEvents_string_region_C;
  514. handle->stateConfVectorPosition = 4;
  515. }
  516. /* 'default' enter sequence for state D */
  517. static void valuedEvents_enseq_string_region_D_default(ValuedEvents* handle)
  518. {
  519. /* 'default' enter sequence for state D */
  520. handle->stateConfVector[4] = ValuedEvents_string_region_D;
  521. handle->stateConfVectorPosition = 4;
  522. }
  523. /* 'default' enter sequence for region main region1 */
  524. static void valuedEvents_enseq_main_region1_default(ValuedEvents* handle)
  525. {
  526. /* 'default' enter sequence for region main region1 */
  527. valuedEvents_react_main_region1__entry_Default(handle);
  528. }
  529. /* 'default' enter sequence for region integer_region */
  530. static void valuedEvents_enseq_integer_region_default(ValuedEvents* handle)
  531. {
  532. /* 'default' enter sequence for region integer_region */
  533. valuedEvents_react_integer_region__entry_Default(handle);
  534. }
  535. /* 'default' enter sequence for region boolean_region */
  536. static void valuedEvents_enseq_boolean_region_default(ValuedEvents* handle)
  537. {
  538. /* 'default' enter sequence for region boolean_region */
  539. valuedEvents_react_boolean_region__entry_Default(handle);
  540. }
  541. /* 'default' enter sequence for region real_region */
  542. static void valuedEvents_enseq_real_region_default(ValuedEvents* handle)
  543. {
  544. /* 'default' enter sequence for region real_region */
  545. valuedEvents_react_real_region__entry_Default(handle);
  546. }
  547. /* 'default' enter sequence for region string_region */
  548. static void valuedEvents_enseq_string_region_default(ValuedEvents* handle)
  549. {
  550. /* 'default' enter sequence for region string_region */
  551. valuedEvents_react_string_region__entry_Default(handle);
  552. }
  553. /* Default exit sequence for state A */
  554. static void valuedEvents_exseq_main_region1_A(ValuedEvents* handle)
  555. {
  556. /* Default exit sequence for state A */
  557. handle->stateConfVector[0] = ValuedEvents_last_state;
  558. handle->stateConfVectorPosition = 0;
  559. }
  560. /* Default exit sequence for state B */
  561. static void valuedEvents_exseq_integer_region_B(ValuedEvents* handle)
  562. {
  563. /* Default exit sequence for state B */
  564. handle->stateConfVector[1] = ValuedEvents_last_state;
  565. handle->stateConfVectorPosition = 1;
  566. }
  567. /* Default exit sequence for state C */
  568. static void valuedEvents_exseq_integer_region_C(ValuedEvents* handle)
  569. {
  570. /* Default exit sequence for state C */
  571. handle->stateConfVector[1] = ValuedEvents_last_state;
  572. handle->stateConfVectorPosition = 1;
  573. }
  574. /* Default exit sequence for state D */
  575. static void valuedEvents_exseq_integer_region_D(ValuedEvents* handle)
  576. {
  577. /* Default exit sequence for state D */
  578. handle->stateConfVector[1] = ValuedEvents_last_state;
  579. handle->stateConfVectorPosition = 1;
  580. }
  581. /* Default exit sequence for state B */
  582. static void valuedEvents_exseq_boolean_region_B(ValuedEvents* handle)
  583. {
  584. /* Default exit sequence for state B */
  585. handle->stateConfVector[2] = ValuedEvents_last_state;
  586. handle->stateConfVectorPosition = 2;
  587. }
  588. /* Default exit sequence for state C */
  589. static void valuedEvents_exseq_boolean_region_C(ValuedEvents* handle)
  590. {
  591. /* Default exit sequence for state C */
  592. handle->stateConfVector[2] = ValuedEvents_last_state;
  593. handle->stateConfVectorPosition = 2;
  594. }
  595. /* Default exit sequence for state D */
  596. static void valuedEvents_exseq_boolean_region_D(ValuedEvents* handle)
  597. {
  598. /* Default exit sequence for state D */
  599. handle->stateConfVector[2] = ValuedEvents_last_state;
  600. handle->stateConfVectorPosition = 2;
  601. }
  602. /* Default exit sequence for state B */
  603. static void valuedEvents_exseq_real_region_B(ValuedEvents* handle)
  604. {
  605. /* Default exit sequence for state B */
  606. handle->stateConfVector[3] = ValuedEvents_last_state;
  607. handle->stateConfVectorPosition = 3;
  608. }
  609. /* Default exit sequence for state C */
  610. static void valuedEvents_exseq_real_region_C(ValuedEvents* handle)
  611. {
  612. /* Default exit sequence for state C */
  613. handle->stateConfVector[3] = ValuedEvents_last_state;
  614. handle->stateConfVectorPosition = 3;
  615. }
  616. /* Default exit sequence for state D */
  617. static void valuedEvents_exseq_real_region_D(ValuedEvents* handle)
  618. {
  619. /* Default exit sequence for state D */
  620. handle->stateConfVector[3] = ValuedEvents_last_state;
  621. handle->stateConfVectorPosition = 3;
  622. }
  623. /* Default exit sequence for state B */
  624. static void valuedEvents_exseq_string_region_B(ValuedEvents* handle)
  625. {
  626. /* Default exit sequence for state B */
  627. handle->stateConfVector[4] = ValuedEvents_last_state;
  628. handle->stateConfVectorPosition = 4;
  629. }
  630. /* Default exit sequence for state C */
  631. static void valuedEvents_exseq_string_region_C(ValuedEvents* handle)
  632. {
  633. /* Default exit sequence for state C */
  634. handle->stateConfVector[4] = ValuedEvents_last_state;
  635. handle->stateConfVectorPosition = 4;
  636. }
  637. /* Default exit sequence for state D */
  638. static void valuedEvents_exseq_string_region_D(ValuedEvents* handle)
  639. {
  640. /* Default exit sequence for state D */
  641. handle->stateConfVector[4] = ValuedEvents_last_state;
  642. handle->stateConfVectorPosition = 4;
  643. }
  644. /* Default exit sequence for region main region1 */
  645. static void valuedEvents_exseq_main_region1(ValuedEvents* handle)
  646. {
  647. /* Default exit sequence for region main region1 */
  648. /* Handle exit of all possible states (of ValuedEvents.main_region1) at position 0... */
  649. switch(handle->stateConfVector[ 0 ])
  650. {
  651. case ValuedEvents_main_region1_A :
  652. {
  653. valuedEvents_exseq_main_region1_A(handle);
  654. break;
  655. }
  656. default: break;
  657. }
  658. }
  659. /* Default exit sequence for region integer_region */
  660. static void valuedEvents_exseq_integer_region(ValuedEvents* handle)
  661. {
  662. /* Default exit sequence for region integer_region */
  663. /* Handle exit of all possible states (of ValuedEvents.integer_region) at position 1... */
  664. switch(handle->stateConfVector[ 1 ])
  665. {
  666. case ValuedEvents_integer_region_B :
  667. {
  668. valuedEvents_exseq_integer_region_B(handle);
  669. break;
  670. }
  671. case ValuedEvents_integer_region_C :
  672. {
  673. valuedEvents_exseq_integer_region_C(handle);
  674. break;
  675. }
  676. case ValuedEvents_integer_region_D :
  677. {
  678. valuedEvents_exseq_integer_region_D(handle);
  679. break;
  680. }
  681. default: break;
  682. }
  683. }
  684. /* Default exit sequence for region boolean_region */
  685. static void valuedEvents_exseq_boolean_region(ValuedEvents* handle)
  686. {
  687. /* Default exit sequence for region boolean_region */
  688. /* Handle exit of all possible states (of ValuedEvents.boolean_region) at position 2... */
  689. switch(handle->stateConfVector[ 2 ])
  690. {
  691. case ValuedEvents_boolean_region_B :
  692. {
  693. valuedEvents_exseq_boolean_region_B(handle);
  694. break;
  695. }
  696. case ValuedEvents_boolean_region_C :
  697. {
  698. valuedEvents_exseq_boolean_region_C(handle);
  699. break;
  700. }
  701. case ValuedEvents_boolean_region_D :
  702. {
  703. valuedEvents_exseq_boolean_region_D(handle);
  704. break;
  705. }
  706. default: break;
  707. }
  708. }
  709. /* Default exit sequence for region real_region */
  710. static void valuedEvents_exseq_real_region(ValuedEvents* handle)
  711. {
  712. /* Default exit sequence for region real_region */
  713. /* Handle exit of all possible states (of ValuedEvents.real_region) at position 3... */
  714. switch(handle->stateConfVector[ 3 ])
  715. {
  716. case ValuedEvents_real_region_B :
  717. {
  718. valuedEvents_exseq_real_region_B(handle);
  719. break;
  720. }
  721. case ValuedEvents_real_region_C :
  722. {
  723. valuedEvents_exseq_real_region_C(handle);
  724. break;
  725. }
  726. case ValuedEvents_real_region_D :
  727. {
  728. valuedEvents_exseq_real_region_D(handle);
  729. break;
  730. }
  731. default: break;
  732. }
  733. }
  734. /* Default exit sequence for region string_region */
  735. static void valuedEvents_exseq_string_region(ValuedEvents* handle)
  736. {
  737. /* Default exit sequence for region string_region */
  738. /* Handle exit of all possible states (of ValuedEvents.string_region) at position 4... */
  739. switch(handle->stateConfVector[ 4 ])
  740. {
  741. case ValuedEvents_string_region_B :
  742. {
  743. valuedEvents_exseq_string_region_B(handle);
  744. break;
  745. }
  746. case ValuedEvents_string_region_C :
  747. {
  748. valuedEvents_exseq_string_region_C(handle);
  749. break;
  750. }
  751. case ValuedEvents_string_region_D :
  752. {
  753. valuedEvents_exseq_string_region_D(handle);
  754. break;
  755. }
  756. default: break;
  757. }
  758. }
  759. /* The reactions of state A. */
  760. static void valuedEvents_react_main_region1_A(ValuedEvents* handle)
  761. {
  762. /* The reactions of state A. */
  763. }
  764. /* The reactions of state B. */
  765. static void valuedEvents_react_integer_region_B(ValuedEvents* handle)
  766. {
  767. /* The reactions of state B. */
  768. if (valuedEvents_check_integer_region_B_tr0_tr0(handle) == bool_true)
  769. {
  770. valuedEvents_effect_integer_region_B_tr0(handle);
  771. }
  772. }
  773. /* The reactions of state C. */
  774. static void valuedEvents_react_integer_region_C(ValuedEvents* handle)
  775. {
  776. /* The reactions of state C. */
  777. if (valuedEvents_check_integer_region_C_tr0_tr0(handle) == bool_true)
  778. {
  779. valuedEvents_effect_integer_region_C_tr0(handle);
  780. }
  781. }
  782. /* The reactions of state D. */
  783. static void valuedEvents_react_integer_region_D(ValuedEvents* handle)
  784. {
  785. }
  786. /* The reactions of state B. */
  787. static void valuedEvents_react_boolean_region_B(ValuedEvents* handle)
  788. {
  789. /* The reactions of state B. */
  790. if (valuedEvents_check_boolean_region_B_tr0_tr0(handle) == bool_true)
  791. {
  792. valuedEvents_effect_boolean_region_B_tr0(handle);
  793. }
  794. }
  795. /* The reactions of state C. */
  796. static void valuedEvents_react_boolean_region_C(ValuedEvents* handle)
  797. {
  798. /* The reactions of state C. */
  799. if (valuedEvents_check_boolean_region_C_tr0_tr0(handle) == bool_true)
  800. {
  801. valuedEvents_effect_boolean_region_C_tr0(handle);
  802. }
  803. }
  804. /* The reactions of state D. */
  805. static void valuedEvents_react_boolean_region_D(ValuedEvents* handle)
  806. {
  807. }
  808. /* The reactions of state B. */
  809. static void valuedEvents_react_real_region_B(ValuedEvents* handle)
  810. {
  811. /* The reactions of state B. */
  812. if (valuedEvents_check_real_region_B_tr0_tr0(handle) == bool_true)
  813. {
  814. valuedEvents_effect_real_region_B_tr0(handle);
  815. }
  816. }
  817. /* The reactions of state C. */
  818. static void valuedEvents_react_real_region_C(ValuedEvents* handle)
  819. {
  820. /* The reactions of state C. */
  821. if (valuedEvents_check_real_region_C_tr0_tr0(handle) == bool_true)
  822. {
  823. valuedEvents_effect_real_region_C_tr0(handle);
  824. }
  825. }
  826. /* The reactions of state D. */
  827. static void valuedEvents_react_real_region_D(ValuedEvents* handle)
  828. {
  829. }
  830. /* The reactions of state B. */
  831. static void valuedEvents_react_string_region_B(ValuedEvents* handle)
  832. {
  833. /* The reactions of state B. */
  834. if (valuedEvents_check_string_region_B_tr0_tr0(handle) == bool_true)
  835. {
  836. valuedEvents_effect_string_region_B_tr0(handle);
  837. }
  838. }
  839. /* The reactions of state C. */
  840. static void valuedEvents_react_string_region_C(ValuedEvents* handle)
  841. {
  842. /* The reactions of state C. */
  843. if (valuedEvents_check_string_region_C_tr0_tr0(handle) == bool_true)
  844. {
  845. valuedEvents_effect_string_region_C_tr0(handle);
  846. }
  847. }
  848. /* The reactions of state D. */
  849. static void valuedEvents_react_string_region_D(ValuedEvents* handle)
  850. {
  851. }
  852. /* Default react sequence for initial entry */
  853. static void valuedEvents_react_main_region1__entry_Default(ValuedEvents* handle)
  854. {
  855. /* Default react sequence for initial entry */
  856. valuedEvents_enseq_main_region1_A_default(handle);
  857. }
  858. /* Default react sequence for initial entry */
  859. static void valuedEvents_react_integer_region__entry_Default(ValuedEvents* handle)
  860. {
  861. /* Default react sequence for initial entry */
  862. valuedEvents_enseq_integer_region_B_default(handle);
  863. }
  864. /* Default react sequence for initial entry */
  865. static void valuedEvents_react_boolean_region__entry_Default(ValuedEvents* handle)
  866. {
  867. /* Default react sequence for initial entry */
  868. valuedEvents_enseq_boolean_region_B_default(handle);
  869. }
  870. /* Default react sequence for initial entry */
  871. static void valuedEvents_react_real_region__entry_Default(ValuedEvents* handle)
  872. {
  873. /* Default react sequence for initial entry */
  874. valuedEvents_enseq_real_region_B_default(handle);
  875. }
  876. /* Default react sequence for initial entry */
  877. static void valuedEvents_react_string_region__entry_Default(ValuedEvents* handle)
  878. {
  879. /* Default react sequence for initial entry */
  880. valuedEvents_enseq_string_region_B_default(handle);
  881. }