STextKeywordsInStatesAndRegions.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. #ifndef STEXTKEYWORDSINSTATESANDREGIONS_H_
  2. #define STEXTKEYWORDSINSTATESANDREGIONS_H_
  3. #include "sc_types.h"
  4. #include "StatemachineInterface.h"
  5. /*! \file Header of the state machine 'STextKeywordsInStatesAndRegions'.
  6. */
  7. class STextKeywordsInStatesAndRegions : public StatemachineInterface
  8. {
  9. public:
  10. STextKeywordsInStatesAndRegions();
  11. ~STextKeywordsInStatesAndRegions();
  12. /*! Enumeration of all states */
  13. typedef enum
  14. {
  15. default_namespace,
  16. operation_interface,
  17. operation_internal,
  18. namespace_event,
  19. namespace_local,
  20. local_in,
  21. local_out,
  22. interface_var,
  23. interface_readonly,
  24. internal_external,
  25. internal_operation,
  26. event_default,
  27. event_else,
  28. in_entry,
  29. in_exit,
  30. out_always,
  31. out_oncycle,
  32. var_raise,
  33. var_valueof,
  34. readonly_active,
  35. readonly_namespace,
  36. external_interface,
  37. external_internal,
  38. else_event,
  39. else_local,
  40. entry_in,
  41. entry_out,
  42. exit_var,
  43. exit_readonly,
  44. always_external,
  45. always_operation,
  46. oncycle_default,
  47. oncycle_else,
  48. raise_entry,
  49. raise_exit,
  50. valueof_always,
  51. valueof_oncycle,
  52. active_raise,
  53. active_valueof,
  54. STextKeywordsInStatesAndRegions_last_state
  55. } STextKeywordsInStatesAndRegionsStates;
  56. //! Inner class for default interface scope.
  57. class DefaultSCI
  58. {
  59. public:
  60. /*! Raises the in event 'e1' that is defined in the default interface scope. */
  61. void raise_e1();
  62. /*! Raises the in event 'e2' that is defined in the default interface scope. */
  63. void raise_e2();
  64. private:
  65. friend class STextKeywordsInStatesAndRegions;
  66. sc_boolean e1_raised;
  67. sc_boolean e2_raised;
  68. };
  69. /*! Returns an instance of the interface class 'DefaultSCI'. */
  70. DefaultSCI* getDefaultSCI();
  71. /*! Raises the in event 'e1' that is defined in the default interface scope. */
  72. void raise_e1();
  73. /*! Raises the in event 'e2' that is defined in the default interface scope. */
  74. void raise_e2();
  75. /*
  76. * Functions inherited from StatemachineInterface
  77. */
  78. virtual void init();
  79. virtual void enter();
  80. virtual void exit();
  81. virtual void runCycle();
  82. /*!
  83. * Checks if the state machine is active (until 2.4.1 this method was used for states).
  84. * A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
  85. */
  86. virtual sc_boolean isActive() const;
  87. /*!
  88. * Checks if all active states are final.
  89. * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
  90. */
  91. virtual sc_boolean isFinal() const;
  92. /*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
  93. sc_boolean isStateActive(STextKeywordsInStatesAndRegionsStates state) const;
  94. private:
  95. //! the maximum number of orthogonal states defines the dimension of the state configuration vector.
  96. static const sc_integer maxOrthogonalStates = 20;
  97. STextKeywordsInStatesAndRegionsStates stateConfVector[maxOrthogonalStates];
  98. sc_ushort stateConfVectorPosition;
  99. DefaultSCI iface;
  100. // prototypes of all internal functions
  101. sc_boolean check_operation_interface_tr0_tr0();
  102. sc_boolean check_namespace_event_tr0_tr0();
  103. sc_boolean check_local_in_tr0_tr0();
  104. sc_boolean check_interface_var_tr0_tr0();
  105. sc_boolean check_internal_external_tr0_tr0();
  106. sc_boolean check_event_default_tr0_tr0();
  107. sc_boolean check_in_entry_tr0_tr0();
  108. sc_boolean check_out_always_tr0_tr0();
  109. sc_boolean check_var_raise_tr0_tr0();
  110. sc_boolean check_readonly_active_tr0_tr0();
  111. sc_boolean check_external_interface_tr0_tr0();
  112. sc_boolean check_else_event_tr0_tr0();
  113. sc_boolean check_entry_in_tr0_tr0();
  114. sc_boolean check_exit_var_tr0_tr0();
  115. sc_boolean check_always_external_tr0_tr0();
  116. sc_boolean check_oncycle_default_tr0_tr0();
  117. sc_boolean check_raise_entry_tr0_tr0();
  118. sc_boolean check_valueof_always_tr0_tr0();
  119. sc_boolean check_active_raise_tr0_tr0();
  120. void effect_operation_interface_tr0();
  121. void effect_namespace_event_tr0();
  122. void effect_local_in_tr0();
  123. void effect_interface_var_tr0();
  124. void effect_internal_external_tr0();
  125. void effect_event_default_tr0();
  126. void effect_in_entry_tr0();
  127. void effect_out_always_tr0();
  128. void effect_var_raise_tr0();
  129. void effect_readonly_active_tr0();
  130. void effect_external_interface_tr0();
  131. void effect_else_event_tr0();
  132. void effect_entry_in_tr0();
  133. void effect_exit_var_tr0();
  134. void effect_always_external_tr0();
  135. void effect_oncycle_default_tr0();
  136. void effect_raise_entry_tr0();
  137. void effect_valueof_always_tr0();
  138. void effect_active_raise_tr0();
  139. void enseq_default_namespace_default();
  140. void enseq_operation_interface_default();
  141. void enseq_operation_internal_default();
  142. void enseq_namespace_event_default();
  143. void enseq_namespace_local_default();
  144. void enseq_local_in_default();
  145. void enseq_local_out_default();
  146. void enseq_interface_var_default();
  147. void enseq_interface_readonly_default();
  148. void enseq_internal_external_default();
  149. void enseq_internal_operation_default();
  150. void enseq_event_default_default();
  151. void enseq_event_else_default();
  152. void enseq_in_entry_default();
  153. void enseq_in_exit_default();
  154. void enseq_out_always_default();
  155. void enseq_out_oncycle_default();
  156. void enseq_var_raise_default();
  157. void enseq_var_valueof_default();
  158. void enseq_readonly_active_default();
  159. void enseq_readonly_namespace_default();
  160. void enseq_external_interface_default();
  161. void enseq_external_internal_default();
  162. void enseq_else_event_default();
  163. void enseq_else_local_default();
  164. void enseq_entry_in_default();
  165. void enseq_entry_out_default();
  166. void enseq_exit_var_default();
  167. void enseq_exit_readonly_default();
  168. void enseq_always_external_default();
  169. void enseq_always_operation_default();
  170. void enseq_oncycle_default_default();
  171. void enseq_oncycle_else_default();
  172. void enseq_raise_entry_default();
  173. void enseq_raise_exit_default();
  174. void enseq_valueof_always_default();
  175. void enseq_valueof_oncycle_default();
  176. void enseq_active_raise_default();
  177. void enseq_active_valueof_default();
  178. void enseq_default_default();
  179. void enseq_operation_default();
  180. void enseq_namespace_default();
  181. void enseq_local_default();
  182. void enseq_interface_default();
  183. void enseq_internal_default();
  184. void enseq_event_default();
  185. void enseq_in_default();
  186. void enseq_out_default();
  187. void enseq_var_default();
  188. void enseq_readonly_default();
  189. void enseq_external_default();
  190. void enseq_else_default();
  191. void enseq_entry_default();
  192. void enseq_exit_default();
  193. void enseq_always_default();
  194. void enseq_oncycle_default();
  195. void enseq_raise_default();
  196. void enseq_valueof_default();
  197. void enseq_active_default();
  198. void exseq_default_namespace();
  199. void exseq_operation_interface();
  200. void exseq_operation_internal();
  201. void exseq_namespace_event();
  202. void exseq_namespace_local();
  203. void exseq_local_in();
  204. void exseq_local_out();
  205. void exseq_interface_var();
  206. void exseq_interface_readonly();
  207. void exseq_internal_external();
  208. void exseq_internal_operation();
  209. void exseq_event_default();
  210. void exseq_event_else();
  211. void exseq_in_entry();
  212. void exseq_in_exit();
  213. void exseq_out_always();
  214. void exseq_out_oncycle();
  215. void exseq_var_raise();
  216. void exseq_var_valueof();
  217. void exseq_readonly_active();
  218. void exseq_readonly_namespace();
  219. void exseq_external_interface();
  220. void exseq_external_internal();
  221. void exseq_else_event();
  222. void exseq_else_local();
  223. void exseq_entry_in();
  224. void exseq_entry_out();
  225. void exseq_exit_var();
  226. void exseq_exit_readonly();
  227. void exseq_always_external();
  228. void exseq_always_operation();
  229. void exseq_oncycle_default();
  230. void exseq_oncycle_else();
  231. void exseq_raise_entry();
  232. void exseq_raise_exit();
  233. void exseq_valueof_always();
  234. void exseq_valueof_oncycle();
  235. void exseq_active_raise();
  236. void exseq_active_valueof();
  237. void exseq_default();
  238. void exseq_operation();
  239. void exseq_namespace();
  240. void exseq_local();
  241. void exseq_interface();
  242. void exseq_internal();
  243. void exseq_event();
  244. void exseq_in();
  245. void exseq_out();
  246. void exseq_var();
  247. void exseq_readonly();
  248. void exseq_external();
  249. void exseq_else();
  250. void exseq_entry();
  251. void exseq_exit();
  252. void exseq_always();
  253. void exseq_oncycle();
  254. void exseq_raise();
  255. void exseq_valueof();
  256. void exseq_active();
  257. void react_default_namespace();
  258. void react_operation_interface();
  259. void react_operation_internal();
  260. void react_namespace_event();
  261. void react_namespace_local();
  262. void react_local_in();
  263. void react_local_out();
  264. void react_interface_var();
  265. void react_interface_readonly();
  266. void react_internal_external();
  267. void react_internal_operation();
  268. void react_event_default();
  269. void react_event_else();
  270. void react_in_entry();
  271. void react_in_exit();
  272. void react_out_always();
  273. void react_out_oncycle();
  274. void react_var_raise();
  275. void react_var_valueof();
  276. void react_readonly_active();
  277. void react_readonly_namespace();
  278. void react_external_interface();
  279. void react_external_internal();
  280. void react_else_event();
  281. void react_else_local();
  282. void react_entry_in();
  283. void react_entry_out();
  284. void react_exit_var();
  285. void react_exit_readonly();
  286. void react_always_external();
  287. void react_always_operation();
  288. void react_oncycle_default();
  289. void react_oncycle_else();
  290. void react_raise_entry();
  291. void react_raise_exit();
  292. void react_valueof_always();
  293. void react_valueof_oncycle();
  294. void react_active_raise();
  295. void react_active_valueof();
  296. void react_default__entry_Default();
  297. void react_operation__entry_Default();
  298. void react_namespace__entry_Default();
  299. void react_local__entry_Default();
  300. void react_interface__entry_Default();
  301. void react_internal__entry_Default();
  302. void react_event__entry_Default();
  303. void react_in__entry_Default();
  304. void react_out__entry_Default();
  305. void react_var__entry_Default();
  306. void react_readonly__entry_Default();
  307. void react_external__entry_Default();
  308. void react_else__entry_Default();
  309. void react_entry__entry_Default();
  310. void react_exit__entry_Default();
  311. void react_always__entry_Default();
  312. void react_oncycle__entry_Default();
  313. void react_raise__entry_Default();
  314. void react_valueof__entry_Default();
  315. void react_active__entry_Default();
  316. void clearInEvents();
  317. void clearOutEvents();
  318. };
  319. #endif /* STEXTKEYWORDSINSTATESANDREGIONS_H_ */