AssignmentAsExpression.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. #ifndef ASSIGNMENTASEXPRESSION_H_
  2. #define ASSIGNMENTASEXPRESSION_H_
  3. #include "sc_types.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /*! \file Header of the state machine 'AssignmentAsExpression'.
  8. */
  9. /*! Enumeration of all states */
  10. typedef enum
  11. {
  12. AssignmentAsExpression_main_region_Add,
  13. AssignmentAsExpression_main_region_Multiply,
  14. AssignmentAsExpression_main_region_Divide,
  15. AssignmentAsExpression_main_region_Modulo,
  16. AssignmentAsExpression_main_region_Shift,
  17. AssignmentAsExpression_main_region_boolean_And,
  18. AssignmentAsExpression_main_region_boolean_Or,
  19. AssignmentAsExpression_main_region_boolean_Xor,
  20. AssignmentAsExpression_main_region_Subtract,
  21. AssignmentAsExpression_last_state
  22. } AssignmentAsExpressionStates;
  23. /*! Type definition of the data structure for the AssignmentAsExpressionIface interface scope. */
  24. typedef struct
  25. {
  26. sc_integer a;
  27. sc_integer b;
  28. sc_integer c;
  29. sc_integer d;
  30. sc_integer e;
  31. sc_integer f;
  32. sc_integer g;
  33. sc_integer h;
  34. sc_integer i;
  35. sc_integer i1;
  36. sc_integer j;
  37. sc_integer j1;
  38. sc_integer k;
  39. sc_integer k1;
  40. sc_integer l;
  41. sc_integer m;
  42. sc_integer n;
  43. sc_integer p;
  44. sc_integer r;
  45. sc_integer t;
  46. sc_integer u;
  47. sc_integer v;
  48. sc_integer w;
  49. } AssignmentAsExpressionIface;
  50. /*! Define dimension of the state configuration vector for orthogonal states. */
  51. #define ASSIGNMENTASEXPRESSION_MAX_ORTHOGONAL_STATES 1
  52. /*!
  53. * Type definition of the data structure for the AssignmentAsExpression state machine.
  54. * This data structure has to be allocated by the client code.
  55. */
  56. typedef struct
  57. {
  58. AssignmentAsExpressionStates stateConfVector[ASSIGNMENTASEXPRESSION_MAX_ORTHOGONAL_STATES];
  59. sc_ushort stateConfVectorPosition;
  60. AssignmentAsExpressionIface iface;
  61. } AssignmentAsExpression;
  62. /*! Initializes the AssignmentAsExpression state machine data structures. Must be called before first usage.*/
  63. extern void assignmentAsExpression_init(AssignmentAsExpression* handle);
  64. /*! Activates the state machine */
  65. extern void assignmentAsExpression_enter(AssignmentAsExpression* handle);
  66. /*! Deactivates the state machine */
  67. extern void assignmentAsExpression_exit(AssignmentAsExpression* handle);
  68. /*! Performs a 'run to completion' step. */
  69. extern void assignmentAsExpression_runCycle(AssignmentAsExpression* handle);
  70. /*! Gets the value of the variable 'a' that is defined in the default interface scope. */
  71. extern sc_integer assignmentAsExpressionIface_get_a(const AssignmentAsExpression* handle);
  72. /*! Sets the value of the variable 'a' that is defined in the default interface scope. */
  73. extern void assignmentAsExpressionIface_set_a(AssignmentAsExpression* handle, sc_integer value);
  74. /*! Gets the value of the variable 'b' that is defined in the default interface scope. */
  75. extern sc_integer assignmentAsExpressionIface_get_b(const AssignmentAsExpression* handle);
  76. /*! Sets the value of the variable 'b' that is defined in the default interface scope. */
  77. extern void assignmentAsExpressionIface_set_b(AssignmentAsExpression* handle, sc_integer value);
  78. /*! Gets the value of the variable 'c' that is defined in the default interface scope. */
  79. extern sc_integer assignmentAsExpressionIface_get_c(const AssignmentAsExpression* handle);
  80. /*! Sets the value of the variable 'c' that is defined in the default interface scope. */
  81. extern void assignmentAsExpressionIface_set_c(AssignmentAsExpression* handle, sc_integer value);
  82. /*! Gets the value of the variable 'd' that is defined in the default interface scope. */
  83. extern sc_integer assignmentAsExpressionIface_get_d(const AssignmentAsExpression* handle);
  84. /*! Sets the value of the variable 'd' that is defined in the default interface scope. */
  85. extern void assignmentAsExpressionIface_set_d(AssignmentAsExpression* handle, sc_integer value);
  86. /*! Gets the value of the variable 'e' that is defined in the default interface scope. */
  87. extern sc_integer assignmentAsExpressionIface_get_e(const AssignmentAsExpression* handle);
  88. /*! Sets the value of the variable 'e' that is defined in the default interface scope. */
  89. extern void assignmentAsExpressionIface_set_e(AssignmentAsExpression* handle, sc_integer value);
  90. /*! Gets the value of the variable 'f' that is defined in the default interface scope. */
  91. extern sc_integer assignmentAsExpressionIface_get_f(const AssignmentAsExpression* handle);
  92. /*! Sets the value of the variable 'f' that is defined in the default interface scope. */
  93. extern void assignmentAsExpressionIface_set_f(AssignmentAsExpression* handle, sc_integer value);
  94. /*! Gets the value of the variable 'g' that is defined in the default interface scope. */
  95. extern sc_integer assignmentAsExpressionIface_get_g(const AssignmentAsExpression* handle);
  96. /*! Sets the value of the variable 'g' that is defined in the default interface scope. */
  97. extern void assignmentAsExpressionIface_set_g(AssignmentAsExpression* handle, sc_integer value);
  98. /*! Gets the value of the variable 'h' that is defined in the default interface scope. */
  99. extern sc_integer assignmentAsExpressionIface_get_h(const AssignmentAsExpression* handle);
  100. /*! Sets the value of the variable 'h' that is defined in the default interface scope. */
  101. extern void assignmentAsExpressionIface_set_h(AssignmentAsExpression* handle, sc_integer value);
  102. /*! Gets the value of the variable 'i' that is defined in the default interface scope. */
  103. extern sc_integer assignmentAsExpressionIface_get_i(const AssignmentAsExpression* handle);
  104. /*! Sets the value of the variable 'i' that is defined in the default interface scope. */
  105. extern void assignmentAsExpressionIface_set_i(AssignmentAsExpression* handle, sc_integer value);
  106. /*! Gets the value of the variable 'i1' that is defined in the default interface scope. */
  107. extern sc_integer assignmentAsExpressionIface_get_i1(const AssignmentAsExpression* handle);
  108. /*! Sets the value of the variable 'i1' that is defined in the default interface scope. */
  109. extern void assignmentAsExpressionIface_set_i1(AssignmentAsExpression* handle, sc_integer value);
  110. /*! Gets the value of the variable 'j' that is defined in the default interface scope. */
  111. extern sc_integer assignmentAsExpressionIface_get_j(const AssignmentAsExpression* handle);
  112. /*! Sets the value of the variable 'j' that is defined in the default interface scope. */
  113. extern void assignmentAsExpressionIface_set_j(AssignmentAsExpression* handle, sc_integer value);
  114. /*! Gets the value of the variable 'j1' that is defined in the default interface scope. */
  115. extern sc_integer assignmentAsExpressionIface_get_j1(const AssignmentAsExpression* handle);
  116. /*! Sets the value of the variable 'j1' that is defined in the default interface scope. */
  117. extern void assignmentAsExpressionIface_set_j1(AssignmentAsExpression* handle, sc_integer value);
  118. /*! Gets the value of the variable 'k' that is defined in the default interface scope. */
  119. extern sc_integer assignmentAsExpressionIface_get_k(const AssignmentAsExpression* handle);
  120. /*! Sets the value of the variable 'k' that is defined in the default interface scope. */
  121. extern void assignmentAsExpressionIface_set_k(AssignmentAsExpression* handle, sc_integer value);
  122. /*! Gets the value of the variable 'k1' that is defined in the default interface scope. */
  123. extern sc_integer assignmentAsExpressionIface_get_k1(const AssignmentAsExpression* handle);
  124. /*! Sets the value of the variable 'k1' that is defined in the default interface scope. */
  125. extern void assignmentAsExpressionIface_set_k1(AssignmentAsExpression* handle, sc_integer value);
  126. /*! Gets the value of the variable 'l' that is defined in the default interface scope. */
  127. extern sc_integer assignmentAsExpressionIface_get_l(const AssignmentAsExpression* handle);
  128. /*! Sets the value of the variable 'l' that is defined in the default interface scope. */
  129. extern void assignmentAsExpressionIface_set_l(AssignmentAsExpression* handle, sc_integer value);
  130. /*! Gets the value of the variable 'm' that is defined in the default interface scope. */
  131. extern sc_integer assignmentAsExpressionIface_get_m(const AssignmentAsExpression* handle);
  132. /*! Sets the value of the variable 'm' that is defined in the default interface scope. */
  133. extern void assignmentAsExpressionIface_set_m(AssignmentAsExpression* handle, sc_integer value);
  134. /*! Gets the value of the variable 'n' that is defined in the default interface scope. */
  135. extern sc_integer assignmentAsExpressionIface_get_n(const AssignmentAsExpression* handle);
  136. /*! Sets the value of the variable 'n' that is defined in the default interface scope. */
  137. extern void assignmentAsExpressionIface_set_n(AssignmentAsExpression* handle, sc_integer value);
  138. /*! Gets the value of the variable 'p' that is defined in the default interface scope. */
  139. extern sc_integer assignmentAsExpressionIface_get_p(const AssignmentAsExpression* handle);
  140. /*! Sets the value of the variable 'p' that is defined in the default interface scope. */
  141. extern void assignmentAsExpressionIface_set_p(AssignmentAsExpression* handle, sc_integer value);
  142. /*! Gets the value of the variable 'r' that is defined in the default interface scope. */
  143. extern sc_integer assignmentAsExpressionIface_get_r(const AssignmentAsExpression* handle);
  144. /*! Sets the value of the variable 'r' that is defined in the default interface scope. */
  145. extern void assignmentAsExpressionIface_set_r(AssignmentAsExpression* handle, sc_integer value);
  146. /*! Gets the value of the variable 't' that is defined in the default interface scope. */
  147. extern sc_integer assignmentAsExpressionIface_get_t(const AssignmentAsExpression* handle);
  148. /*! Sets the value of the variable 't' that is defined in the default interface scope. */
  149. extern void assignmentAsExpressionIface_set_t(AssignmentAsExpression* handle, sc_integer value);
  150. /*! Gets the value of the variable 'u' that is defined in the default interface scope. */
  151. extern sc_integer assignmentAsExpressionIface_get_u(const AssignmentAsExpression* handle);
  152. /*! Sets the value of the variable 'u' that is defined in the default interface scope. */
  153. extern void assignmentAsExpressionIface_set_u(AssignmentAsExpression* handle, sc_integer value);
  154. /*! Gets the value of the variable 'v' that is defined in the default interface scope. */
  155. extern sc_integer assignmentAsExpressionIface_get_v(const AssignmentAsExpression* handle);
  156. /*! Sets the value of the variable 'v' that is defined in the default interface scope. */
  157. extern void assignmentAsExpressionIface_set_v(AssignmentAsExpression* handle, sc_integer value);
  158. /*! Gets the value of the variable 'w' that is defined in the default interface scope. */
  159. extern sc_integer assignmentAsExpressionIface_get_w(const AssignmentAsExpression* handle);
  160. /*! Sets the value of the variable 'w' that is defined in the default interface scope. */
  161. extern void assignmentAsExpressionIface_set_w(AssignmentAsExpression* handle, sc_integer value);
  162. /*!
  163. * Checks whether the state machine is active (until 2.4.1 this method was used for states).
  164. * A state machine is active if it was entered. It is inactive if it has not been entered at all or if it has been exited.
  165. */
  166. extern sc_boolean assignmentAsExpression_isActive(const AssignmentAsExpression* handle);
  167. /*!
  168. * Checks if all active states are final.
  169. * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
  170. */
  171. extern sc_boolean assignmentAsExpression_isFinal(const AssignmentAsExpression* handle);
  172. /*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
  173. extern sc_boolean assignmentAsExpression_isStateActive(const AssignmentAsExpression* handle, AssignmentAsExpressionStates state);
  174. #ifdef __cplusplus
  175. }
  176. #endif
  177. #endif /* ASSIGNMENTASEXPRESSION_H_ */