Browse Source

Newly generate the GTests and the sgen Files

jthoene 8 years ago
parent
commit
93de4e498c
100 changed files with 14099 additions and 71 deletions
  1. 319 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/AlwaysOncycle.c
  2. 86 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/AlwaysOncycle.h
  3. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/AlwaysOncycle.sgen
  4. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/sc_types.h
  5. 893 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.c
  6. 198 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.h
  7. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.sgen
  8. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/sc_types.h
  9. 337 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/BitExpressions.c
  10. 120 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/BitExpressions.h
  11. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/BitExpressions.sgen
  12. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/sc_types.h
  13. 327 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/BooleanExpressions.c
  14. 115 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/BooleanExpressions.h
  15. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/BooleanExpressions.sgen
  16. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/sc_types.h
  17. 694 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/CKeywords.c
  18. 219 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/CKeywords.h
  19. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/CKeywords.sgen
  20. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/sc_types.h
  21. 325 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/CastExpressions.c
  22. 87 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/CastExpressions.h
  23. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/CastExpressions.sgen
  24. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/sc_types.h
  25. 541 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/Choice.c
  26. 98 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/Choice.h
  27. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/Choice.sgen
  28. 7 7
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/ChoiceTest.cc
  29. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/sc_types.h
  30. 5 3
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/ConditionalExpression.cc
  31. 277 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/ConditionalExpressions.c
  32. 90 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/ConditionalExpressions.h
  33. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/sc_types.h
  34. 311 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScope.c
  35. 90 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScope.h
  36. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScope.sgen
  37. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/sc_types.h
  38. 301 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScope.c
  39. 82 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScope.h
  40. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScope.sgen
  41. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/sc_types.h
  42. 311 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScope.c
  43. 90 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScope.h
  44. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScope.sgen
  45. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/sc_types.h
  46. 371 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/Constants.c
  47. 107 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/Constants.h
  48. 9 7
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/ConstantsTests.cc
  49. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/sc_types.h
  50. 525 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/Declarations.c
  51. 221 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/Declarations.h
  52. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/Declarations.sgen
  53. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/sc_types.h
  54. 807 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/DeepEntry.c
  55. 110 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/DeepEntry.h
  56. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/DeepEntry.sgen
  57. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/sc_types.h
  58. 911 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/DeepHistory.c
  59. 122 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/DeepHistory.h
  60. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/DeepHistory.sgen
  61. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/sc_types.h
  62. 334 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/DynamicChoice.c
  63. 86 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/DynamicChoice.h
  64. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/DynamicChoice.sgen
  65. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/sc_types.h
  66. 216 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/EmptyTransition.c
  67. 70 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/EmptyTransition.h
  68. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/EmptyTransition.sgen
  69. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/sc_types.h
  70. 409 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/EnterState.c
  71. 90 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/EnterState.h
  72. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/EnterState.sgen
  73. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/sc_types.h
  74. 197 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/EntryChoice.c
  75. 69 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/EntryChoice.h
  76. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/EntryChoice.sgen
  77. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/sc_types.h
  78. 385 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransition.c
  79. 95 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransition.h
  80. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransition.sgen
  81. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransitionTest.cc
  82. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/sc_types.h
  83. 588 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionAction.c
  84. 110 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionAction.h
  85. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionAction.sgen
  86. 8 8
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionActionTest.cc
  87. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/sc_types.h
  88. 318 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.c
  89. 94 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.h
  90. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.sgen
  91. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/sc_types.h
  92. 418 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/ExitState.c
  93. 90 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/ExitState.h
  94. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/ExitState.sgen
  95. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/sc_types.h
  96. 277 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/FeatureCalls.c
  97. 85 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/FeatureCalls.h
  98. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/FeatureCalls.sgen
  99. 42 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/sc_types.h
  100. 0 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FinalStateTest/FinalState.c

+ 319 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/AlwaysOncycle.c

@@ -0,0 +1,319 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "AlwaysOncycle.h"
+/*! \file Implementation of the state machine 'AlwaysOncycle'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean alwaysOncycle_check_main_region_StateA_tr0_tr0(const AlwaysOncycle* handle);
+static sc_boolean alwaysOncycle_check_main_region_StateA_lr1_lr1(const AlwaysOncycle* handle);
+static sc_boolean alwaysOncycle_check_main_region_StateB_tr0_tr0(const AlwaysOncycle* handle);
+static sc_boolean alwaysOncycle_check_main_region_StateB_lr0_lr0(const AlwaysOncycle* handle);
+static void alwaysOncycle_effect_main_region_StateA_tr0(AlwaysOncycle* handle);
+static void alwaysOncycle_effect_main_region_StateA_lr1_lr1(AlwaysOncycle* handle);
+static void alwaysOncycle_effect_main_region_StateB_tr0(AlwaysOncycle* handle);
+static void alwaysOncycle_effect_main_region_StateB_lr0_lr0(AlwaysOncycle* handle);
+static void alwaysOncycle_enact_main_region_StateA(AlwaysOncycle* handle);
+static void alwaysOncycle_exact_main_region_StateA(AlwaysOncycle* handle);
+static void alwaysOncycle_enseq_main_region_StateA_default(AlwaysOncycle* handle);
+static void alwaysOncycle_enseq_main_region_StateB_default(AlwaysOncycle* handle);
+static void alwaysOncycle_enseq_main_region_default(AlwaysOncycle* handle);
+static void alwaysOncycle_exseq_main_region_StateA(AlwaysOncycle* handle);
+static void alwaysOncycle_exseq_main_region_StateB(AlwaysOncycle* handle);
+static void alwaysOncycle_exseq_main_region(AlwaysOncycle* handle);
+static void alwaysOncycle_react_main_region_StateA(AlwaysOncycle* handle);
+static void alwaysOncycle_react_main_region_StateB(AlwaysOncycle* handle);
+static void alwaysOncycle_react_main_region__entry_Default(AlwaysOncycle* handle);
+static void alwaysOncycle_clearInEvents(AlwaysOncycle* handle);
+static void alwaysOncycle_clearOutEvents(AlwaysOncycle* handle);
+
+
+void alwaysOncycle_init(AlwaysOncycle* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < ALWAYSONCYCLE_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = AlwaysOncycle_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	alwaysOncycle_clearInEvents(handle);
+	alwaysOncycle_clearOutEvents(handle);
+
+	/* Default init sequence for statechart AlwaysOncycle */
+	handle->iface.value = 0;
+	handle->iface.v2 = bool_false;
+
+}
+
+void alwaysOncycle_enter(AlwaysOncycle* handle)
+{
+	/* Default enter sequence for statechart AlwaysOncycle */
+	alwaysOncycle_enseq_main_region_default(handle);
+}
+
+void alwaysOncycle_exit(AlwaysOncycle* handle)
+{
+	/* Default exit sequence for statechart AlwaysOncycle */
+	alwaysOncycle_exseq_main_region(handle);
+}
+
+sc_boolean alwaysOncycle_isActive(const AlwaysOncycle* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != AlwaysOncycle_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean alwaysOncycle_isFinal(const AlwaysOncycle* handle)
+{
+   return bool_false;
+}
+
+static void alwaysOncycle_clearInEvents(AlwaysOncycle* handle)
+{
+}
+
+static void alwaysOncycle_clearOutEvents(AlwaysOncycle* handle)
+{
+}
+
+void alwaysOncycle_runCycle(AlwaysOncycle* handle)
+{
+	
+	alwaysOncycle_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < ALWAYSONCYCLE_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case AlwaysOncycle_main_region_StateA :
+		{
+			alwaysOncycle_react_main_region_StateA(handle);
+			break;
+		}
+		case AlwaysOncycle_main_region_StateB :
+		{
+			alwaysOncycle_react_main_region_StateB(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	alwaysOncycle_clearInEvents(handle);
+}
+
+
+sc_boolean alwaysOncycle_isStateActive(const AlwaysOncycle* handle, AlwaysOncycleStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case AlwaysOncycle_main_region_StateA :
+			result = (sc_boolean) (handle->stateConfVector[0] == AlwaysOncycle_main_region_StateA
+			);
+			break;
+		case AlwaysOncycle_main_region_StateB :
+			result = (sc_boolean) (handle->stateConfVector[0] == AlwaysOncycle_main_region_StateB
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+
+
+sc_integer alwaysOncycleIface_get_value(const AlwaysOncycle* handle)
+{
+	return handle->iface.value;
+}
+void alwaysOncycleIface_set_value(AlwaysOncycle* handle, sc_integer value)
+{
+	handle->iface.value = value;
+}
+sc_boolean alwaysOncycleIface_get_v2(const AlwaysOncycle* handle)
+{
+	return handle->iface.v2;
+}
+void alwaysOncycleIface_set_v2(AlwaysOncycle* handle, sc_boolean value)
+{
+	handle->iface.v2 = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean alwaysOncycle_check_main_region_StateA_tr0_tr0(const AlwaysOncycle* handle)
+{
+	return (handle->iface.value == 5) ? bool_true : bool_false;
+}
+
+static sc_boolean alwaysOncycle_check_main_region_StateA_lr1_lr1(const AlwaysOncycle* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean alwaysOncycle_check_main_region_StateB_tr0_tr0(const AlwaysOncycle* handle)
+{
+	return (handle->iface.value == 5) ? bool_true : bool_false;
+}
+
+static sc_boolean alwaysOncycle_check_main_region_StateB_lr0_lr0(const AlwaysOncycle* handle)
+{
+	return bool_true;
+}
+
+static void alwaysOncycle_effect_main_region_StateA_tr0(AlwaysOncycle* handle)
+{
+	alwaysOncycle_exseq_main_region_StateA(handle);
+	alwaysOncycle_enseq_main_region_StateB_default(handle);
+}
+
+static void alwaysOncycle_effect_main_region_StateA_lr1_lr1(AlwaysOncycle* handle)
+{
+	handle->iface.value += 1;
+}
+
+static void alwaysOncycle_effect_main_region_StateB_tr0(AlwaysOncycle* handle)
+{
+	alwaysOncycle_exseq_main_region_StateB(handle);
+	alwaysOncycle_enseq_main_region_StateA_default(handle);
+}
+
+static void alwaysOncycle_effect_main_region_StateB_lr0_lr0(AlwaysOncycle* handle)
+{
+	handle->iface.value += 1;
+}
+
+/* Entry action for state 'StateA'. */
+static void alwaysOncycle_enact_main_region_StateA(AlwaysOncycle* handle)
+{
+	/* Entry action for state 'StateA'. */
+	handle->iface.value = 0;
+}
+
+/* Exit action for state 'StateA'. */
+static void alwaysOncycle_exact_main_region_StateA(AlwaysOncycle* handle)
+{
+	/* Exit action for state 'StateA'. */
+	handle->iface.value = 0;
+}
+
+/* 'default' enter sequence for state StateA */
+static void alwaysOncycle_enseq_main_region_StateA_default(AlwaysOncycle* handle)
+{
+	/* 'default' enter sequence for state StateA */
+	alwaysOncycle_enact_main_region_StateA(handle);
+	handle->stateConfVector[0] = AlwaysOncycle_main_region_StateA;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state StateB */
+static void alwaysOncycle_enseq_main_region_StateB_default(AlwaysOncycle* handle)
+{
+	/* 'default' enter sequence for state StateB */
+	handle->stateConfVector[0] = AlwaysOncycle_main_region_StateB;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void alwaysOncycle_enseq_main_region_default(AlwaysOncycle* handle)
+{
+	/* 'default' enter sequence for region main region */
+	alwaysOncycle_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state StateA */
+static void alwaysOncycle_exseq_main_region_StateA(AlwaysOncycle* handle)
+{
+	/* Default exit sequence for state StateA */
+	handle->stateConfVector[0] = AlwaysOncycle_last_state;
+	handle->stateConfVectorPosition = 0;
+	alwaysOncycle_exact_main_region_StateA(handle);
+}
+
+/* Default exit sequence for state StateB */
+static void alwaysOncycle_exseq_main_region_StateB(AlwaysOncycle* handle)
+{
+	/* Default exit sequence for state StateB */
+	handle->stateConfVector[0] = AlwaysOncycle_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void alwaysOncycle_exseq_main_region(AlwaysOncycle* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of AlwaysOncycle.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case AlwaysOncycle_main_region_StateA :
+		{
+			alwaysOncycle_exseq_main_region_StateA(handle);
+			break;
+		}
+		case AlwaysOncycle_main_region_StateB :
+		{
+			alwaysOncycle_exseq_main_region_StateB(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state StateA. */
+static void alwaysOncycle_react_main_region_StateA(AlwaysOncycle* handle)
+{
+	/* The reactions of state StateA. */
+	if (alwaysOncycle_check_main_region_StateA_tr0_tr0(handle) == bool_true)
+	{ 
+		alwaysOncycle_effect_main_region_StateA_tr0(handle);
+	}  else
+	{
+		alwaysOncycle_effect_main_region_StateA_lr1_lr1(handle);
+	}
+}
+
+/* The reactions of state StateB. */
+static void alwaysOncycle_react_main_region_StateB(AlwaysOncycle* handle)
+{
+	/* The reactions of state StateB. */
+	if (alwaysOncycle_check_main_region_StateB_tr0_tr0(handle) == bool_true)
+	{ 
+		alwaysOncycle_effect_main_region_StateB_tr0(handle);
+	}  else
+	{
+		alwaysOncycle_effect_main_region_StateB_lr0_lr0(handle);
+	}
+}
+
+/* Default react sequence for initial entry  */
+static void alwaysOncycle_react_main_region__entry_Default(AlwaysOncycle* handle)
+{
+	/* Default react sequence for initial entry  */
+	alwaysOncycle_enseq_main_region_StateA_default(handle);
+}
+
+

+ 86 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/AlwaysOncycle.h

@@ -0,0 +1,86 @@
+
+#ifndef ALWAYSONCYCLE_H_
+#define ALWAYSONCYCLE_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'AlwaysOncycle'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	AlwaysOncycle_main_region_StateA,
+	AlwaysOncycle_main_region_StateB,
+	AlwaysOncycle_last_state
+} AlwaysOncycleStates;
+
+/*! Type definition of the data structure for the AlwaysOncycleIface interface scope. */
+typedef struct
+{
+	sc_integer value;
+	sc_boolean v2;
+} AlwaysOncycleIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define ALWAYSONCYCLE_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the AlwaysOncycle state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	AlwaysOncycleStates stateConfVector[ALWAYSONCYCLE_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	AlwaysOncycleIface iface;
+} AlwaysOncycle;
+
+/*! Initializes the AlwaysOncycle state machine data structures. Must be called before first usage.*/
+extern void alwaysOncycle_init(AlwaysOncycle* handle);
+
+/*! Activates the state machine */
+extern void alwaysOncycle_enter(AlwaysOncycle* handle);
+
+/*! Deactivates the state machine */
+extern void alwaysOncycle_exit(AlwaysOncycle* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void alwaysOncycle_runCycle(AlwaysOncycle* handle);
+
+
+/*! Gets the value of the variable 'value' that is defined in the default interface scope. */ 
+extern sc_integer alwaysOncycleIface_get_value(const AlwaysOncycle* handle);
+/*! Sets the value of the variable 'value' that is defined in the default interface scope. */ 
+extern void alwaysOncycleIface_set_value(AlwaysOncycle* handle, sc_integer value);
+/*! Gets the value of the variable 'v2' that is defined in the default interface scope. */ 
+extern sc_boolean alwaysOncycleIface_get_v2(const AlwaysOncycle* handle);
+/*! Sets the value of the variable 'v2' that is defined in the default interface scope. */ 
+extern void alwaysOncycleIface_set_v2(AlwaysOncycle* handle, sc_boolean value);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean alwaysOncycle_isActive(const AlwaysOncycle* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean alwaysOncycle_isFinal(const AlwaysOncycle* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean alwaysOncycle_isStateActive(const AlwaysOncycle* handle, AlwaysOncycleStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* ALWAYSONCYCLE_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/AlwaysOncycle.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart AlwaysOncycle {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/AlwaysOncycleTest"
+			targetProject = "gtests"
+			targetFolder = "AlwaysOncycleTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 893 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.c

@@ -0,0 +1,893 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "AssignmentAsExpression.h"
+/*! \file Implementation of the state machine 'AssignmentAsExpression'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean assignmentAsExpression_check_main_region_Add_tr0_tr0(const AssignmentAsExpression* handle);
+static sc_boolean assignmentAsExpression_check_main_region_Multiply_tr0_tr0(const AssignmentAsExpression* handle);
+static sc_boolean assignmentAsExpression_check_main_region_Divide_tr0_tr0(const AssignmentAsExpression* handle);
+static sc_boolean assignmentAsExpression_check_main_region_Modulo_tr0_tr0(const AssignmentAsExpression* handle);
+static sc_boolean assignmentAsExpression_check_main_region_Shift_tr0_tr0(const AssignmentAsExpression* handle);
+static sc_boolean assignmentAsExpression_check_main_region_boolean_And_tr0_tr0(const AssignmentAsExpression* handle);
+static sc_boolean assignmentAsExpression_check_main_region_boolean_Or_tr0_tr0(const AssignmentAsExpression* handle);
+static sc_boolean assignmentAsExpression_check_main_region_Subtract_tr0_tr0(const AssignmentAsExpression* handle);
+static void assignmentAsExpression_effect_main_region_Add_tr0(AssignmentAsExpression* handle);
+static void assignmentAsExpression_effect_main_region_Multiply_tr0(AssignmentAsExpression* handle);
+static void assignmentAsExpression_effect_main_region_Divide_tr0(AssignmentAsExpression* handle);
+static void assignmentAsExpression_effect_main_region_Modulo_tr0(AssignmentAsExpression* handle);
+static void assignmentAsExpression_effect_main_region_Shift_tr0(AssignmentAsExpression* handle);
+static void assignmentAsExpression_effect_main_region_boolean_And_tr0(AssignmentAsExpression* handle);
+static void assignmentAsExpression_effect_main_region_boolean_Or_tr0(AssignmentAsExpression* handle);
+static void assignmentAsExpression_effect_main_region_Subtract_tr0(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enact_main_region_Add(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enact_main_region_Multiply(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enact_main_region_Divide(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enact_main_region_Modulo(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enact_main_region_Shift(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enact_main_region_boolean_And(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enact_main_region_boolean_Or(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enact_main_region_boolean_Xor(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enact_main_region_Subtract(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enseq_main_region_Add_default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enseq_main_region_Multiply_default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enseq_main_region_Divide_default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enseq_main_region_Modulo_default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enseq_main_region_Shift_default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enseq_main_region_boolean_And_default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enseq_main_region_boolean_Or_default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enseq_main_region_boolean_Xor_default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enseq_main_region_Subtract_default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_enseq_main_region_default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_exseq_main_region_Add(AssignmentAsExpression* handle);
+static void assignmentAsExpression_exseq_main_region_Multiply(AssignmentAsExpression* handle);
+static void assignmentAsExpression_exseq_main_region_Divide(AssignmentAsExpression* handle);
+static void assignmentAsExpression_exseq_main_region_Modulo(AssignmentAsExpression* handle);
+static void assignmentAsExpression_exseq_main_region_Shift(AssignmentAsExpression* handle);
+static void assignmentAsExpression_exseq_main_region_boolean_And(AssignmentAsExpression* handle);
+static void assignmentAsExpression_exseq_main_region_boolean_Or(AssignmentAsExpression* handle);
+static void assignmentAsExpression_exseq_main_region_boolean_Xor(AssignmentAsExpression* handle);
+static void assignmentAsExpression_exseq_main_region_Subtract(AssignmentAsExpression* handle);
+static void assignmentAsExpression_exseq_main_region(AssignmentAsExpression* handle);
+static void assignmentAsExpression_react_main_region_Add(AssignmentAsExpression* handle);
+static void assignmentAsExpression_react_main_region_Multiply(AssignmentAsExpression* handle);
+static void assignmentAsExpression_react_main_region_Divide(AssignmentAsExpression* handle);
+static void assignmentAsExpression_react_main_region_Modulo(AssignmentAsExpression* handle);
+static void assignmentAsExpression_react_main_region_Shift(AssignmentAsExpression* handle);
+static void assignmentAsExpression_react_main_region_boolean_And(AssignmentAsExpression* handle);
+static void assignmentAsExpression_react_main_region_boolean_Or(AssignmentAsExpression* handle);
+static void assignmentAsExpression_react_main_region_boolean_Xor(AssignmentAsExpression* handle);
+static void assignmentAsExpression_react_main_region_Subtract(AssignmentAsExpression* handle);
+static void assignmentAsExpression_react_main_region__entry_Default(AssignmentAsExpression* handle);
+static void assignmentAsExpression_clearInEvents(AssignmentAsExpression* handle);
+static void assignmentAsExpression_clearOutEvents(AssignmentAsExpression* handle);
+
+
+void assignmentAsExpression_init(AssignmentAsExpression* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < ASSIGNMENTASEXPRESSION_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = AssignmentAsExpression_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	assignmentAsExpression_clearInEvents(handle);
+	assignmentAsExpression_clearOutEvents(handle);
+
+	/* Default init sequence for statechart AssignmentAsExpression */
+	handle->iface.a = 0;
+	handle->iface.b = 0;
+	handle->iface.c = 0;
+	handle->iface.d = 0;
+	handle->iface.e = 1;
+	handle->iface.f = 1;
+	handle->iface.g = 4;
+	handle->iface.h = 32;
+	handle->iface.i = 7;
+	handle->iface.i1 = 7;
+	handle->iface.j = 8;
+	handle->iface.j1 = 2;
+	handle->iface.k = 8;
+	handle->iface.k1 = 4;
+	handle->iface.l = 3;
+	handle->iface.m = 7;
+	handle->iface.n = 5;
+	handle->iface.p = 0;
+	handle->iface.r = 7;
+	handle->iface.t = 10;
+	handle->iface.u = 6;
+	handle->iface.v = 13;
+	handle->iface.w = 7;
+
+}
+
+void assignmentAsExpression_enter(AssignmentAsExpression* handle)
+{
+	/* Default enter sequence for statechart AssignmentAsExpression */
+	assignmentAsExpression_enseq_main_region_default(handle);
+}
+
+void assignmentAsExpression_exit(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for statechart AssignmentAsExpression */
+	assignmentAsExpression_exseq_main_region(handle);
+}
+
+sc_boolean assignmentAsExpression_isActive(const AssignmentAsExpression* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != AssignmentAsExpression_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean assignmentAsExpression_isFinal(const AssignmentAsExpression* handle)
+{
+   return bool_false;
+}
+
+static void assignmentAsExpression_clearInEvents(AssignmentAsExpression* handle)
+{
+}
+
+static void assignmentAsExpression_clearOutEvents(AssignmentAsExpression* handle)
+{
+}
+
+void assignmentAsExpression_runCycle(AssignmentAsExpression* handle)
+{
+	
+	assignmentAsExpression_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < ASSIGNMENTASEXPRESSION_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case AssignmentAsExpression_main_region_Add :
+		{
+			assignmentAsExpression_react_main_region_Add(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_Multiply :
+		{
+			assignmentAsExpression_react_main_region_Multiply(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_Divide :
+		{
+			assignmentAsExpression_react_main_region_Divide(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_Modulo :
+		{
+			assignmentAsExpression_react_main_region_Modulo(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_Shift :
+		{
+			assignmentAsExpression_react_main_region_Shift(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_boolean_And :
+		{
+			assignmentAsExpression_react_main_region_boolean_And(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_boolean_Or :
+		{
+			assignmentAsExpression_react_main_region_boolean_Or(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_boolean_Xor :
+		{
+			assignmentAsExpression_react_main_region_boolean_Xor(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_Subtract :
+		{
+			assignmentAsExpression_react_main_region_Subtract(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	assignmentAsExpression_clearInEvents(handle);
+}
+
+
+sc_boolean assignmentAsExpression_isStateActive(const AssignmentAsExpression* handle, AssignmentAsExpressionStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case AssignmentAsExpression_main_region_Add :
+			result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Add
+			);
+			break;
+		case AssignmentAsExpression_main_region_Multiply :
+			result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Multiply
+			);
+			break;
+		case AssignmentAsExpression_main_region_Divide :
+			result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Divide
+			);
+			break;
+		case AssignmentAsExpression_main_region_Modulo :
+			result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Modulo
+			);
+			break;
+		case AssignmentAsExpression_main_region_Shift :
+			result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Shift
+			);
+			break;
+		case AssignmentAsExpression_main_region_boolean_And :
+			result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_boolean_And
+			);
+			break;
+		case AssignmentAsExpression_main_region_boolean_Or :
+			result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_boolean_Or
+			);
+			break;
+		case AssignmentAsExpression_main_region_boolean_Xor :
+			result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_boolean_Xor
+			);
+			break;
+		case AssignmentAsExpression_main_region_Subtract :
+			result = (sc_boolean) (handle->stateConfVector[0] == AssignmentAsExpression_main_region_Subtract
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+
+
+sc_integer assignmentAsExpressionIface_get_a(const AssignmentAsExpression* handle)
+{
+	return handle->iface.a;
+}
+void assignmentAsExpressionIface_set_a(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.a = value;
+}
+sc_integer assignmentAsExpressionIface_get_b(const AssignmentAsExpression* handle)
+{
+	return handle->iface.b;
+}
+void assignmentAsExpressionIface_set_b(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.b = value;
+}
+sc_integer assignmentAsExpressionIface_get_c(const AssignmentAsExpression* handle)
+{
+	return handle->iface.c;
+}
+void assignmentAsExpressionIface_set_c(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.c = value;
+}
+sc_integer assignmentAsExpressionIface_get_d(const AssignmentAsExpression* handle)
+{
+	return handle->iface.d;
+}
+void assignmentAsExpressionIface_set_d(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.d = value;
+}
+sc_integer assignmentAsExpressionIface_get_e(const AssignmentAsExpression* handle)
+{
+	return handle->iface.e;
+}
+void assignmentAsExpressionIface_set_e(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.e = value;
+}
+sc_integer assignmentAsExpressionIface_get_f(const AssignmentAsExpression* handle)
+{
+	return handle->iface.f;
+}
+void assignmentAsExpressionIface_set_f(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.f = value;
+}
+sc_integer assignmentAsExpressionIface_get_g(const AssignmentAsExpression* handle)
+{
+	return handle->iface.g;
+}
+void assignmentAsExpressionIface_set_g(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.g = value;
+}
+sc_integer assignmentAsExpressionIface_get_h(const AssignmentAsExpression* handle)
+{
+	return handle->iface.h;
+}
+void assignmentAsExpressionIface_set_h(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.h = value;
+}
+sc_integer assignmentAsExpressionIface_get_i(const AssignmentAsExpression* handle)
+{
+	return handle->iface.i;
+}
+void assignmentAsExpressionIface_set_i(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.i = value;
+}
+sc_integer assignmentAsExpressionIface_get_i1(const AssignmentAsExpression* handle)
+{
+	return handle->iface.i1;
+}
+void assignmentAsExpressionIface_set_i1(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.i1 = value;
+}
+sc_integer assignmentAsExpressionIface_get_j(const AssignmentAsExpression* handle)
+{
+	return handle->iface.j;
+}
+void assignmentAsExpressionIface_set_j(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.j = value;
+}
+sc_integer assignmentAsExpressionIface_get_j1(const AssignmentAsExpression* handle)
+{
+	return handle->iface.j1;
+}
+void assignmentAsExpressionIface_set_j1(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.j1 = value;
+}
+sc_integer assignmentAsExpressionIface_get_k(const AssignmentAsExpression* handle)
+{
+	return handle->iface.k;
+}
+void assignmentAsExpressionIface_set_k(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.k = value;
+}
+sc_integer assignmentAsExpressionIface_get_k1(const AssignmentAsExpression* handle)
+{
+	return handle->iface.k1;
+}
+void assignmentAsExpressionIface_set_k1(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.k1 = value;
+}
+sc_integer assignmentAsExpressionIface_get_l(const AssignmentAsExpression* handle)
+{
+	return handle->iface.l;
+}
+void assignmentAsExpressionIface_set_l(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.l = value;
+}
+sc_integer assignmentAsExpressionIface_get_m(const AssignmentAsExpression* handle)
+{
+	return handle->iface.m;
+}
+void assignmentAsExpressionIface_set_m(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.m = value;
+}
+sc_integer assignmentAsExpressionIface_get_n(const AssignmentAsExpression* handle)
+{
+	return handle->iface.n;
+}
+void assignmentAsExpressionIface_set_n(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.n = value;
+}
+sc_integer assignmentAsExpressionIface_get_p(const AssignmentAsExpression* handle)
+{
+	return handle->iface.p;
+}
+void assignmentAsExpressionIface_set_p(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.p = value;
+}
+sc_integer assignmentAsExpressionIface_get_r(const AssignmentAsExpression* handle)
+{
+	return handle->iface.r;
+}
+void assignmentAsExpressionIface_set_r(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.r = value;
+}
+sc_integer assignmentAsExpressionIface_get_t(const AssignmentAsExpression* handle)
+{
+	return handle->iface.t;
+}
+void assignmentAsExpressionIface_set_t(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.t = value;
+}
+sc_integer assignmentAsExpressionIface_get_u(const AssignmentAsExpression* handle)
+{
+	return handle->iface.u;
+}
+void assignmentAsExpressionIface_set_u(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.u = value;
+}
+sc_integer assignmentAsExpressionIface_get_v(const AssignmentAsExpression* handle)
+{
+	return handle->iface.v;
+}
+void assignmentAsExpressionIface_set_v(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.v = value;
+}
+sc_integer assignmentAsExpressionIface_get_w(const AssignmentAsExpression* handle)
+{
+	return handle->iface.w;
+}
+void assignmentAsExpressionIface_set_w(AssignmentAsExpression* handle, sc_integer value)
+{
+	handle->iface.w = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean assignmentAsExpression_check_main_region_Add_tr0_tr0(const AssignmentAsExpression* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean assignmentAsExpression_check_main_region_Multiply_tr0_tr0(const AssignmentAsExpression* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean assignmentAsExpression_check_main_region_Divide_tr0_tr0(const AssignmentAsExpression* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean assignmentAsExpression_check_main_region_Modulo_tr0_tr0(const AssignmentAsExpression* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean assignmentAsExpression_check_main_region_Shift_tr0_tr0(const AssignmentAsExpression* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean assignmentAsExpression_check_main_region_boolean_And_tr0_tr0(const AssignmentAsExpression* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean assignmentAsExpression_check_main_region_boolean_Or_tr0_tr0(const AssignmentAsExpression* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean assignmentAsExpression_check_main_region_Subtract_tr0_tr0(const AssignmentAsExpression* handle)
+{
+	return bool_true;
+}
+
+static void assignmentAsExpression_effect_main_region_Add_tr0(AssignmentAsExpression* handle)
+{
+	assignmentAsExpression_exseq_main_region_Add(handle);
+	assignmentAsExpression_enseq_main_region_Subtract_default(handle);
+}
+
+static void assignmentAsExpression_effect_main_region_Multiply_tr0(AssignmentAsExpression* handle)
+{
+	assignmentAsExpression_exseq_main_region_Multiply(handle);
+	assignmentAsExpression_enseq_main_region_Divide_default(handle);
+}
+
+static void assignmentAsExpression_effect_main_region_Divide_tr0(AssignmentAsExpression* handle)
+{
+	assignmentAsExpression_exseq_main_region_Divide(handle);
+	assignmentAsExpression_enseq_main_region_Modulo_default(handle);
+}
+
+static void assignmentAsExpression_effect_main_region_Modulo_tr0(AssignmentAsExpression* handle)
+{
+	assignmentAsExpression_exseq_main_region_Modulo(handle);
+	assignmentAsExpression_enseq_main_region_Shift_default(handle);
+}
+
+static void assignmentAsExpression_effect_main_region_Shift_tr0(AssignmentAsExpression* handle)
+{
+	assignmentAsExpression_exseq_main_region_Shift(handle);
+	assignmentAsExpression_enseq_main_region_boolean_And_default(handle);
+}
+
+static void assignmentAsExpression_effect_main_region_boolean_And_tr0(AssignmentAsExpression* handle)
+{
+	assignmentAsExpression_exseq_main_region_boolean_And(handle);
+	assignmentAsExpression_enseq_main_region_boolean_Or_default(handle);
+}
+
+static void assignmentAsExpression_effect_main_region_boolean_Or_tr0(AssignmentAsExpression* handle)
+{
+	assignmentAsExpression_exseq_main_region_boolean_Or(handle);
+	assignmentAsExpression_enseq_main_region_boolean_Xor_default(handle);
+}
+
+static void assignmentAsExpression_effect_main_region_Subtract_tr0(AssignmentAsExpression* handle)
+{
+	assignmentAsExpression_exseq_main_region_Subtract(handle);
+	assignmentAsExpression_enseq_main_region_Multiply_default(handle);
+}
+
+/* Entry action for state 'Add'. */
+static void assignmentAsExpression_enact_main_region_Add(AssignmentAsExpression* handle)
+{
+	/* Entry action for state 'Add'. */
+	handle->iface.a = (handle->iface.b = 5) + 4;
+}
+
+/* Entry action for state 'Multiply'. */
+static void assignmentAsExpression_enact_main_region_Multiply(AssignmentAsExpression* handle)
+{
+	/* Entry action for state 'Multiply'. */
+	handle->iface.e *= (handle->iface.f *= 5) * 3;
+}
+
+/* Entry action for state 'Divide'. */
+static void assignmentAsExpression_enact_main_region_Divide(AssignmentAsExpression* handle)
+{
+	/* Entry action for state 'Divide'. */
+	handle->iface.g /= (handle->iface.h /= 2) / 4;
+}
+
+/* Entry action for state 'Modulo'. */
+static void assignmentAsExpression_enact_main_region_Modulo(AssignmentAsExpression* handle)
+{
+	/* Entry action for state 'Modulo'. */
+	handle->iface.i %= (handle->iface.i1 %= 4) % 4;
+}
+
+/* Entry action for state 'Shift'. */
+static void assignmentAsExpression_enact_main_region_Shift(AssignmentAsExpression* handle)
+{
+	/* Entry action for state 'Shift'. */
+	handle->iface.j <<= (handle->iface.j1 >>= 1);
+	handle->iface.k >>= (handle->iface.k1 >>= 2);
+}
+
+/* Entry action for state 'boolean And'. */
+static void assignmentAsExpression_enact_main_region_boolean_And(AssignmentAsExpression* handle)
+{
+	/* Entry action for state 'boolean And'. */
+	handle->iface.l &= (handle->iface.n &= handle->iface.m);
+}
+
+/* Entry action for state 'boolean Or'. */
+static void assignmentAsExpression_enact_main_region_boolean_Or(AssignmentAsExpression* handle)
+{
+	/* Entry action for state 'boolean Or'. */
+	handle->iface.p |= (handle->iface.r |= handle->iface.t);
+}
+
+/* Entry action for state 'boolean Xor'. */
+static void assignmentAsExpression_enact_main_region_boolean_Xor(AssignmentAsExpression* handle)
+{
+	/* Entry action for state 'boolean Xor'. */
+	handle->iface.u ^= (handle->iface.v ^= handle->iface.w);
+}
+
+/* Entry action for state 'Subtract'. */
+static void assignmentAsExpression_enact_main_region_Subtract(AssignmentAsExpression* handle)
+{
+	/* Entry action for state 'Subtract'. */
+	handle->iface.d -= (handle->iface.c -= 5) - 1;
+}
+
+/* 'default' enter sequence for state Add */
+static void assignmentAsExpression_enseq_main_region_Add_default(AssignmentAsExpression* handle)
+{
+	/* 'default' enter sequence for state Add */
+	assignmentAsExpression_enact_main_region_Add(handle);
+	handle->stateConfVector[0] = AssignmentAsExpression_main_region_Add;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state Multiply */
+static void assignmentAsExpression_enseq_main_region_Multiply_default(AssignmentAsExpression* handle)
+{
+	/* 'default' enter sequence for state Multiply */
+	assignmentAsExpression_enact_main_region_Multiply(handle);
+	handle->stateConfVector[0] = AssignmentAsExpression_main_region_Multiply;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state Divide */
+static void assignmentAsExpression_enseq_main_region_Divide_default(AssignmentAsExpression* handle)
+{
+	/* 'default' enter sequence for state Divide */
+	assignmentAsExpression_enact_main_region_Divide(handle);
+	handle->stateConfVector[0] = AssignmentAsExpression_main_region_Divide;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state Modulo */
+static void assignmentAsExpression_enseq_main_region_Modulo_default(AssignmentAsExpression* handle)
+{
+	/* 'default' enter sequence for state Modulo */
+	assignmentAsExpression_enact_main_region_Modulo(handle);
+	handle->stateConfVector[0] = AssignmentAsExpression_main_region_Modulo;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state Shift */
+static void assignmentAsExpression_enseq_main_region_Shift_default(AssignmentAsExpression* handle)
+{
+	/* 'default' enter sequence for state Shift */
+	assignmentAsExpression_enact_main_region_Shift(handle);
+	handle->stateConfVector[0] = AssignmentAsExpression_main_region_Shift;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state boolean And */
+static void assignmentAsExpression_enseq_main_region_boolean_And_default(AssignmentAsExpression* handle)
+{
+	/* 'default' enter sequence for state boolean And */
+	assignmentAsExpression_enact_main_region_boolean_And(handle);
+	handle->stateConfVector[0] = AssignmentAsExpression_main_region_boolean_And;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state boolean Or */
+static void assignmentAsExpression_enseq_main_region_boolean_Or_default(AssignmentAsExpression* handle)
+{
+	/* 'default' enter sequence for state boolean Or */
+	assignmentAsExpression_enact_main_region_boolean_Or(handle);
+	handle->stateConfVector[0] = AssignmentAsExpression_main_region_boolean_Or;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state boolean Xor */
+static void assignmentAsExpression_enseq_main_region_boolean_Xor_default(AssignmentAsExpression* handle)
+{
+	/* 'default' enter sequence for state boolean Xor */
+	assignmentAsExpression_enact_main_region_boolean_Xor(handle);
+	handle->stateConfVector[0] = AssignmentAsExpression_main_region_boolean_Xor;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state Subtract */
+static void assignmentAsExpression_enseq_main_region_Subtract_default(AssignmentAsExpression* handle)
+{
+	/* 'default' enter sequence for state Subtract */
+	assignmentAsExpression_enact_main_region_Subtract(handle);
+	handle->stateConfVector[0] = AssignmentAsExpression_main_region_Subtract;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void assignmentAsExpression_enseq_main_region_default(AssignmentAsExpression* handle)
+{
+	/* 'default' enter sequence for region main region */
+	assignmentAsExpression_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state Add */
+static void assignmentAsExpression_exseq_main_region_Add(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for state Add */
+	handle->stateConfVector[0] = AssignmentAsExpression_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state Multiply */
+static void assignmentAsExpression_exseq_main_region_Multiply(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for state Multiply */
+	handle->stateConfVector[0] = AssignmentAsExpression_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state Divide */
+static void assignmentAsExpression_exseq_main_region_Divide(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for state Divide */
+	handle->stateConfVector[0] = AssignmentAsExpression_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state Modulo */
+static void assignmentAsExpression_exseq_main_region_Modulo(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for state Modulo */
+	handle->stateConfVector[0] = AssignmentAsExpression_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state Shift */
+static void assignmentAsExpression_exseq_main_region_Shift(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for state Shift */
+	handle->stateConfVector[0] = AssignmentAsExpression_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state boolean And */
+static void assignmentAsExpression_exseq_main_region_boolean_And(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for state boolean And */
+	handle->stateConfVector[0] = AssignmentAsExpression_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state boolean Or */
+static void assignmentAsExpression_exseq_main_region_boolean_Or(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for state boolean Or */
+	handle->stateConfVector[0] = AssignmentAsExpression_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state boolean Xor */
+static void assignmentAsExpression_exseq_main_region_boolean_Xor(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for state boolean Xor */
+	handle->stateConfVector[0] = AssignmentAsExpression_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state Subtract */
+static void assignmentAsExpression_exseq_main_region_Subtract(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for state Subtract */
+	handle->stateConfVector[0] = AssignmentAsExpression_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void assignmentAsExpression_exseq_main_region(AssignmentAsExpression* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of AssignmentAsExpression.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case AssignmentAsExpression_main_region_Add :
+		{
+			assignmentAsExpression_exseq_main_region_Add(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_Multiply :
+		{
+			assignmentAsExpression_exseq_main_region_Multiply(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_Divide :
+		{
+			assignmentAsExpression_exseq_main_region_Divide(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_Modulo :
+		{
+			assignmentAsExpression_exseq_main_region_Modulo(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_Shift :
+		{
+			assignmentAsExpression_exseq_main_region_Shift(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_boolean_And :
+		{
+			assignmentAsExpression_exseq_main_region_boolean_And(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_boolean_Or :
+		{
+			assignmentAsExpression_exseq_main_region_boolean_Or(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_boolean_Xor :
+		{
+			assignmentAsExpression_exseq_main_region_boolean_Xor(handle);
+			break;
+		}
+		case AssignmentAsExpression_main_region_Subtract :
+		{
+			assignmentAsExpression_exseq_main_region_Subtract(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state Add. */
+static void assignmentAsExpression_react_main_region_Add(AssignmentAsExpression* handle)
+{
+	/* The reactions of state Add. */
+	assignmentAsExpression_effect_main_region_Add_tr0(handle);
+}
+
+/* The reactions of state Multiply. */
+static void assignmentAsExpression_react_main_region_Multiply(AssignmentAsExpression* handle)
+{
+	/* The reactions of state Multiply. */
+	assignmentAsExpression_effect_main_region_Multiply_tr0(handle);
+}
+
+/* The reactions of state Divide. */
+static void assignmentAsExpression_react_main_region_Divide(AssignmentAsExpression* handle)
+{
+	/* The reactions of state Divide. */
+	assignmentAsExpression_effect_main_region_Divide_tr0(handle);
+}
+
+/* The reactions of state Modulo. */
+static void assignmentAsExpression_react_main_region_Modulo(AssignmentAsExpression* handle)
+{
+	/* The reactions of state Modulo. */
+	assignmentAsExpression_effect_main_region_Modulo_tr0(handle);
+}
+
+/* The reactions of state Shift. */
+static void assignmentAsExpression_react_main_region_Shift(AssignmentAsExpression* handle)
+{
+	/* The reactions of state Shift. */
+	assignmentAsExpression_effect_main_region_Shift_tr0(handle);
+}
+
+/* The reactions of state boolean And. */
+static void assignmentAsExpression_react_main_region_boolean_And(AssignmentAsExpression* handle)
+{
+	/* The reactions of state boolean And. */
+	assignmentAsExpression_effect_main_region_boolean_And_tr0(handle);
+}
+
+/* The reactions of state boolean Or. */
+static void assignmentAsExpression_react_main_region_boolean_Or(AssignmentAsExpression* handle)
+{
+	/* The reactions of state boolean Or. */
+	assignmentAsExpression_effect_main_region_boolean_Or_tr0(handle);
+}
+
+/* The reactions of state boolean Xor. */
+static void assignmentAsExpression_react_main_region_boolean_Xor(AssignmentAsExpression* handle)
+{
+	/* The reactions of state boolean Xor. */
+}
+
+/* The reactions of state Subtract. */
+static void assignmentAsExpression_react_main_region_Subtract(AssignmentAsExpression* handle)
+{
+	/* The reactions of state Subtract. */
+	assignmentAsExpression_effect_main_region_Subtract_tr0(handle);
+}
+
+/* Default react sequence for initial entry  */
+static void assignmentAsExpression_react_main_region__entry_Default(AssignmentAsExpression* handle)
+{
+	/* Default react sequence for initial entry  */
+	assignmentAsExpression_enseq_main_region_Add_default(handle);
+}
+
+

+ 198 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.h

@@ -0,0 +1,198 @@
+
+#ifndef ASSIGNMENTASEXPRESSION_H_
+#define ASSIGNMENTASEXPRESSION_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'AssignmentAsExpression'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	AssignmentAsExpression_main_region_Add,
+	AssignmentAsExpression_main_region_Multiply,
+	AssignmentAsExpression_main_region_Divide,
+	AssignmentAsExpression_main_region_Modulo,
+	AssignmentAsExpression_main_region_Shift,
+	AssignmentAsExpression_main_region_boolean_And,
+	AssignmentAsExpression_main_region_boolean_Or,
+	AssignmentAsExpression_main_region_boolean_Xor,
+	AssignmentAsExpression_main_region_Subtract,
+	AssignmentAsExpression_last_state
+} AssignmentAsExpressionStates;
+
+/*! Type definition of the data structure for the AssignmentAsExpressionIface interface scope. */
+typedef struct
+{
+	sc_integer a;
+	sc_integer b;
+	sc_integer c;
+	sc_integer d;
+	sc_integer e;
+	sc_integer f;
+	sc_integer g;
+	sc_integer h;
+	sc_integer i;
+	sc_integer i1;
+	sc_integer j;
+	sc_integer j1;
+	sc_integer k;
+	sc_integer k1;
+	sc_integer l;
+	sc_integer m;
+	sc_integer n;
+	sc_integer p;
+	sc_integer r;
+	sc_integer t;
+	sc_integer u;
+	sc_integer v;
+	sc_integer w;
+} AssignmentAsExpressionIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define ASSIGNMENTASEXPRESSION_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the AssignmentAsExpression state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	AssignmentAsExpressionStates stateConfVector[ASSIGNMENTASEXPRESSION_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	AssignmentAsExpressionIface iface;
+} AssignmentAsExpression;
+
+/*! Initializes the AssignmentAsExpression state machine data structures. Must be called before first usage.*/
+extern void assignmentAsExpression_init(AssignmentAsExpression* handle);
+
+/*! Activates the state machine */
+extern void assignmentAsExpression_enter(AssignmentAsExpression* handle);
+
+/*! Deactivates the state machine */
+extern void assignmentAsExpression_exit(AssignmentAsExpression* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void assignmentAsExpression_runCycle(AssignmentAsExpression* handle);
+
+
+/*! Gets the value of the variable 'a' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_a(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'a' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_a(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'b' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_b(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'b' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_b(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'c' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_c(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'c' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_c(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'd' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_d(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'd' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_d(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'e' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_e(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'e' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_e(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'f' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_f(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'f' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_f(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'g' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_g(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'g' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_g(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'h' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_h(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'h' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_h(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'i' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_i(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'i' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_i(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'i1' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_i1(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'i1' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_i1(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'j' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_j(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'j' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_j(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'j1' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_j1(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'j1' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_j1(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'k' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_k(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'k' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_k(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'k1' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_k1(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'k1' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_k1(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'l' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_l(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'l' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_l(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'm' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_m(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'm' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_m(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'n' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_n(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'n' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_n(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'p' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_p(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'p' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_p(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'r' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_r(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'r' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_r(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 't' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_t(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 't' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_t(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'u' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_u(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'u' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_u(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'v' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_v(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'v' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_v(AssignmentAsExpression* handle, sc_integer value);
+/*! Gets the value of the variable 'w' that is defined in the default interface scope. */ 
+extern sc_integer assignmentAsExpressionIface_get_w(const AssignmentAsExpression* handle);
+/*! Sets the value of the variable 'w' that is defined in the default interface scope. */ 
+extern void assignmentAsExpressionIface_set_w(AssignmentAsExpression* handle, sc_integer value);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean assignmentAsExpression_isActive(const AssignmentAsExpression* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean assignmentAsExpression_isFinal(const AssignmentAsExpression* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean assignmentAsExpression_isStateActive(const AssignmentAsExpression* handle, AssignmentAsExpressionStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* ASSIGNMENTASEXPRESSION_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart AssignmentAsExpression {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/AssignmentAsExpressionTest"
+			targetProject = "gtests"
+			targetFolder = "AssignmentAsExpressionTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 337 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/BitExpressions.c

@@ -0,0 +1,337 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "BitExpressions.h"
+/*! \file Implementation of the state machine 'BitExpressions'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean bitExpressions_check_main_region_StateA_tr0_tr0(const BitExpressions* handle);
+static void bitExpressions_effect_main_region_StateA_tr0(BitExpressions* handle);
+static void bitExpressions_enact_main_region_StateA(BitExpressions* handle);
+static void bitExpressions_enact_main_region_StateB(BitExpressions* handle);
+static void bitExpressions_enseq_main_region_StateA_default(BitExpressions* handle);
+static void bitExpressions_enseq_main_region_StateB_default(BitExpressions* handle);
+static void bitExpressions_enseq_main_region_default(BitExpressions* handle);
+static void bitExpressions_exseq_main_region_StateA(BitExpressions* handle);
+static void bitExpressions_exseq_main_region_StateB(BitExpressions* handle);
+static void bitExpressions_exseq_main_region(BitExpressions* handle);
+static void bitExpressions_react_main_region_StateA(BitExpressions* handle);
+static void bitExpressions_react_main_region_StateB(BitExpressions* handle);
+static void bitExpressions_react_main_region__entry_Default(BitExpressions* handle);
+static void bitExpressions_clearInEvents(BitExpressions* handle);
+static void bitExpressions_clearOutEvents(BitExpressions* handle);
+
+
+void bitExpressions_init(BitExpressions* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < BITEXPRESSIONS_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = BitExpressions_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	bitExpressions_clearInEvents(handle);
+	bitExpressions_clearOutEvents(handle);
+
+	/* Default init sequence for statechart BitExpressions */
+	handle->iface.myBit1 = 0;
+	handle->iface.myBit2 = 0;
+	handle->iface.leftBitshift = 0;
+	handle->iface.rightBitshift = 0;
+	handle->iface.complementBitshift = 0;
+	handle->iface.bitwiseAnd = 0;
+	handle->iface.bitwiseOr = 0;
+	handle->iface.bitwiseXor = 0;
+
+}
+
+void bitExpressions_enter(BitExpressions* handle)
+{
+	/* Default enter sequence for statechart BitExpressions */
+	bitExpressions_enseq_main_region_default(handle);
+}
+
+void bitExpressions_exit(BitExpressions* handle)
+{
+	/* Default exit sequence for statechart BitExpressions */
+	bitExpressions_exseq_main_region(handle);
+}
+
+sc_boolean bitExpressions_isActive(const BitExpressions* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != BitExpressions_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean bitExpressions_isFinal(const BitExpressions* handle)
+{
+   return bool_false;
+}
+
+static void bitExpressions_clearInEvents(BitExpressions* handle)
+{
+	handle->iface.e1_raised = bool_false;
+}
+
+static void bitExpressions_clearOutEvents(BitExpressions* handle)
+{
+}
+
+void bitExpressions_runCycle(BitExpressions* handle)
+{
+	
+	bitExpressions_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < BITEXPRESSIONS_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case BitExpressions_main_region_StateA :
+		{
+			bitExpressions_react_main_region_StateA(handle);
+			break;
+		}
+		case BitExpressions_main_region_StateB :
+		{
+			bitExpressions_react_main_region_StateB(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	bitExpressions_clearInEvents(handle);
+}
+
+
+sc_boolean bitExpressions_isStateActive(const BitExpressions* handle, BitExpressionsStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case BitExpressions_main_region_StateA :
+			result = (sc_boolean) (handle->stateConfVector[0] == BitExpressions_main_region_StateA
+			);
+			break;
+		case BitExpressions_main_region_StateB :
+			result = (sc_boolean) (handle->stateConfVector[0] == BitExpressions_main_region_StateB
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void bitExpressionsIface_raise_e1(BitExpressions* handle)
+{
+	handle->iface.e1_raised = bool_true;
+}
+
+
+sc_integer bitExpressionsIface_get_myBit1(const BitExpressions* handle)
+{
+	return handle->iface.myBit1;
+}
+void bitExpressionsIface_set_myBit1(BitExpressions* handle, sc_integer value)
+{
+	handle->iface.myBit1 = value;
+}
+sc_integer bitExpressionsIface_get_myBit2(const BitExpressions* handle)
+{
+	return handle->iface.myBit2;
+}
+void bitExpressionsIface_set_myBit2(BitExpressions* handle, sc_integer value)
+{
+	handle->iface.myBit2 = value;
+}
+sc_integer bitExpressionsIface_get_leftBitshift(const BitExpressions* handle)
+{
+	return handle->iface.leftBitshift;
+}
+void bitExpressionsIface_set_leftBitshift(BitExpressions* handle, sc_integer value)
+{
+	handle->iface.leftBitshift = value;
+}
+sc_integer bitExpressionsIface_get_rightBitshift(const BitExpressions* handle)
+{
+	return handle->iface.rightBitshift;
+}
+void bitExpressionsIface_set_rightBitshift(BitExpressions* handle, sc_integer value)
+{
+	handle->iface.rightBitshift = value;
+}
+sc_integer bitExpressionsIface_get_complementBitshift(const BitExpressions* handle)
+{
+	return handle->iface.complementBitshift;
+}
+void bitExpressionsIface_set_complementBitshift(BitExpressions* handle, sc_integer value)
+{
+	handle->iface.complementBitshift = value;
+}
+sc_integer bitExpressionsIface_get_bitwiseAnd(const BitExpressions* handle)
+{
+	return handle->iface.bitwiseAnd;
+}
+void bitExpressionsIface_set_bitwiseAnd(BitExpressions* handle, sc_integer value)
+{
+	handle->iface.bitwiseAnd = value;
+}
+sc_integer bitExpressionsIface_get_bitwiseOr(const BitExpressions* handle)
+{
+	return handle->iface.bitwiseOr;
+}
+void bitExpressionsIface_set_bitwiseOr(BitExpressions* handle, sc_integer value)
+{
+	handle->iface.bitwiseOr = value;
+}
+sc_integer bitExpressionsIface_get_bitwiseXor(const BitExpressions* handle)
+{
+	return handle->iface.bitwiseXor;
+}
+void bitExpressionsIface_set_bitwiseXor(BitExpressions* handle, sc_integer value)
+{
+	handle->iface.bitwiseXor = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean bitExpressions_check_main_region_StateA_tr0_tr0(const BitExpressions* handle)
+{
+	return handle->iface.e1_raised;
+}
+
+static void bitExpressions_effect_main_region_StateA_tr0(BitExpressions* handle)
+{
+	bitExpressions_exseq_main_region_StateA(handle);
+	bitExpressions_enseq_main_region_StateB_default(handle);
+}
+
+/* Entry action for state 'StateA'. */
+static void bitExpressions_enact_main_region_StateA(BitExpressions* handle)
+{
+	/* Entry action for state 'StateA'. */
+	handle->iface.myBit1 = 5;
+	handle->iface.myBit2 = 7;
+}
+
+/* Entry action for state 'StateB'. */
+static void bitExpressions_enact_main_region_StateB(BitExpressions* handle)
+{
+	/* Entry action for state 'StateB'. */
+	handle->iface.leftBitshift = handle->iface.myBit1 << 1;
+	handle->iface.rightBitshift = handle->iface.myBit1 >> 1;
+	handle->iface.complementBitshift = ~handle->iface.myBit1;
+	handle->iface.bitwiseAnd = handle->iface.myBit1 & handle->iface.myBit2;
+	handle->iface.bitwiseOr = handle->iface.myBit1 | handle->iface.myBit2;
+	handle->iface.bitwiseXor = handle->iface.myBit1 ^ handle->iface.myBit2;
+}
+
+/* 'default' enter sequence for state StateA */
+static void bitExpressions_enseq_main_region_StateA_default(BitExpressions* handle)
+{
+	/* 'default' enter sequence for state StateA */
+	bitExpressions_enact_main_region_StateA(handle);
+	handle->stateConfVector[0] = BitExpressions_main_region_StateA;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state StateB */
+static void bitExpressions_enseq_main_region_StateB_default(BitExpressions* handle)
+{
+	/* 'default' enter sequence for state StateB */
+	bitExpressions_enact_main_region_StateB(handle);
+	handle->stateConfVector[0] = BitExpressions_main_region_StateB;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void bitExpressions_enseq_main_region_default(BitExpressions* handle)
+{
+	/* 'default' enter sequence for region main region */
+	bitExpressions_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state StateA */
+static void bitExpressions_exseq_main_region_StateA(BitExpressions* handle)
+{
+	/* Default exit sequence for state StateA */
+	handle->stateConfVector[0] = BitExpressions_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state StateB */
+static void bitExpressions_exseq_main_region_StateB(BitExpressions* handle)
+{
+	/* Default exit sequence for state StateB */
+	handle->stateConfVector[0] = BitExpressions_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void bitExpressions_exseq_main_region(BitExpressions* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of BitExpressions.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case BitExpressions_main_region_StateA :
+		{
+			bitExpressions_exseq_main_region_StateA(handle);
+			break;
+		}
+		case BitExpressions_main_region_StateB :
+		{
+			bitExpressions_exseq_main_region_StateB(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state StateA. */
+static void bitExpressions_react_main_region_StateA(BitExpressions* handle)
+{
+	/* The reactions of state StateA. */
+	if (bitExpressions_check_main_region_StateA_tr0_tr0(handle) == bool_true)
+	{ 
+		bitExpressions_effect_main_region_StateA_tr0(handle);
+	} 
+}
+
+/* The reactions of state StateB. */
+static void bitExpressions_react_main_region_StateB(BitExpressions* handle)
+{
+	/* The reactions of state StateB. */
+}
+
+/* Default react sequence for initial entry  */
+static void bitExpressions_react_main_region__entry_Default(BitExpressions* handle)
+{
+	/* Default react sequence for initial entry  */
+	bitExpressions_enseq_main_region_StateA_default(handle);
+}
+
+

+ 120 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/BitExpressions.h

@@ -0,0 +1,120 @@
+
+#ifndef BITEXPRESSIONS_H_
+#define BITEXPRESSIONS_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'BitExpressions'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	BitExpressions_main_region_StateA,
+	BitExpressions_main_region_StateB,
+	BitExpressions_last_state
+} BitExpressionsStates;
+
+/*! Type definition of the data structure for the BitExpressionsIface interface scope. */
+typedef struct
+{
+	sc_integer myBit1;
+	sc_integer myBit2;
+	sc_integer leftBitshift;
+	sc_integer rightBitshift;
+	sc_integer complementBitshift;
+	sc_integer bitwiseAnd;
+	sc_integer bitwiseOr;
+	sc_integer bitwiseXor;
+	sc_boolean e1_raised;
+} BitExpressionsIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define BITEXPRESSIONS_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the BitExpressions state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	BitExpressionsStates stateConfVector[BITEXPRESSIONS_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	BitExpressionsIface iface;
+} BitExpressions;
+
+/*! Initializes the BitExpressions state machine data structures. Must be called before first usage.*/
+extern void bitExpressions_init(BitExpressions* handle);
+
+/*! Activates the state machine */
+extern void bitExpressions_enter(BitExpressions* handle);
+
+/*! Deactivates the state machine */
+extern void bitExpressions_exit(BitExpressions* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void bitExpressions_runCycle(BitExpressions* handle);
+
+
+/*! Gets the value of the variable 'myBit1' that is defined in the default interface scope. */ 
+extern sc_integer bitExpressionsIface_get_myBit1(const BitExpressions* handle);
+/*! Sets the value of the variable 'myBit1' that is defined in the default interface scope. */ 
+extern void bitExpressionsIface_set_myBit1(BitExpressions* handle, sc_integer value);
+/*! Gets the value of the variable 'myBit2' that is defined in the default interface scope. */ 
+extern sc_integer bitExpressionsIface_get_myBit2(const BitExpressions* handle);
+/*! Sets the value of the variable 'myBit2' that is defined in the default interface scope. */ 
+extern void bitExpressionsIface_set_myBit2(BitExpressions* handle, sc_integer value);
+/*! Gets the value of the variable 'leftBitshift' that is defined in the default interface scope. */ 
+extern sc_integer bitExpressionsIface_get_leftBitshift(const BitExpressions* handle);
+/*! Sets the value of the variable 'leftBitshift' that is defined in the default interface scope. */ 
+extern void bitExpressionsIface_set_leftBitshift(BitExpressions* handle, sc_integer value);
+/*! Gets the value of the variable 'rightBitshift' that is defined in the default interface scope. */ 
+extern sc_integer bitExpressionsIface_get_rightBitshift(const BitExpressions* handle);
+/*! Sets the value of the variable 'rightBitshift' that is defined in the default interface scope. */ 
+extern void bitExpressionsIface_set_rightBitshift(BitExpressions* handle, sc_integer value);
+/*! Gets the value of the variable 'complementBitshift' that is defined in the default interface scope. */ 
+extern sc_integer bitExpressionsIface_get_complementBitshift(const BitExpressions* handle);
+/*! Sets the value of the variable 'complementBitshift' that is defined in the default interface scope. */ 
+extern void bitExpressionsIface_set_complementBitshift(BitExpressions* handle, sc_integer value);
+/*! Gets the value of the variable 'bitwiseAnd' that is defined in the default interface scope. */ 
+extern sc_integer bitExpressionsIface_get_bitwiseAnd(const BitExpressions* handle);
+/*! Sets the value of the variable 'bitwiseAnd' that is defined in the default interface scope. */ 
+extern void bitExpressionsIface_set_bitwiseAnd(BitExpressions* handle, sc_integer value);
+/*! Gets the value of the variable 'bitwiseOr' that is defined in the default interface scope. */ 
+extern sc_integer bitExpressionsIface_get_bitwiseOr(const BitExpressions* handle);
+/*! Sets the value of the variable 'bitwiseOr' that is defined in the default interface scope. */ 
+extern void bitExpressionsIface_set_bitwiseOr(BitExpressions* handle, sc_integer value);
+/*! Gets the value of the variable 'bitwiseXor' that is defined in the default interface scope. */ 
+extern sc_integer bitExpressionsIface_get_bitwiseXor(const BitExpressions* handle);
+/*! Sets the value of the variable 'bitwiseXor' that is defined in the default interface scope. */ 
+extern void bitExpressionsIface_set_bitwiseXor(BitExpressions* handle, sc_integer value);
+/*! Raises the in event 'e1' that is defined in the default interface scope. */ 
+extern void bitExpressionsIface_raise_e1(BitExpressions* handle);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean bitExpressions_isActive(const BitExpressions* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean bitExpressions_isFinal(const BitExpressions* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean bitExpressions_isStateActive(const BitExpressions* handle, BitExpressionsStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* BITEXPRESSIONS_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/BitExpressions.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart BitExpressions {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/BitExpressionsTest"
+			targetProject = "gtests"
+			targetFolder = "BitExpressionsTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 327 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/BooleanExpressions.c

@@ -0,0 +1,327 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "BooleanExpressions.h"
+/*! \file Implementation of the state machine 'BooleanExpressions'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean booleanExpressions_check_main_region_StateA_tr0_tr0(const BooleanExpressions* handle);
+static void booleanExpressions_effect_main_region_StateA_tr0(BooleanExpressions* handle);
+static void booleanExpressions_enact_main_region_StateA(BooleanExpressions* handle);
+static void booleanExpressions_enact_main_region_StateB(BooleanExpressions* handle);
+static void booleanExpressions_enseq_main_region_StateA_default(BooleanExpressions* handle);
+static void booleanExpressions_enseq_main_region_StateB_default(BooleanExpressions* handle);
+static void booleanExpressions_enseq_main_region_default(BooleanExpressions* handle);
+static void booleanExpressions_exseq_main_region_StateA(BooleanExpressions* handle);
+static void booleanExpressions_exseq_main_region_StateB(BooleanExpressions* handle);
+static void booleanExpressions_exseq_main_region(BooleanExpressions* handle);
+static void booleanExpressions_react_main_region_StateA(BooleanExpressions* handle);
+static void booleanExpressions_react_main_region_StateB(BooleanExpressions* handle);
+static void booleanExpressions_react_main_region__entry_Default(BooleanExpressions* handle);
+static void booleanExpressions_clearInEvents(BooleanExpressions* handle);
+static void booleanExpressions_clearOutEvents(BooleanExpressions* handle);
+
+
+void booleanExpressions_init(BooleanExpressions* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < BOOLEANEXPRESSIONS_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = BooleanExpressions_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	booleanExpressions_clearInEvents(handle);
+	booleanExpressions_clearOutEvents(handle);
+
+	/* Default init sequence for statechart BooleanExpressions */
+	handle->iface.myBool1 = bool_false;
+	handle->iface.myBool2 = bool_false;
+	handle->iface.and_ID = bool_false;
+	handle->iface.or_ID = bool_false;
+	handle->iface.not_ID = bool_false;
+	handle->iface.equal = bool_false;
+	handle->iface.notequal = bool_false;
+
+}
+
+void booleanExpressions_enter(BooleanExpressions* handle)
+{
+	/* Default enter sequence for statechart BooleanExpressions */
+	booleanExpressions_enseq_main_region_default(handle);
+}
+
+void booleanExpressions_exit(BooleanExpressions* handle)
+{
+	/* Default exit sequence for statechart BooleanExpressions */
+	booleanExpressions_exseq_main_region(handle);
+}
+
+sc_boolean booleanExpressions_isActive(const BooleanExpressions* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != BooleanExpressions_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean booleanExpressions_isFinal(const BooleanExpressions* handle)
+{
+   return bool_false;
+}
+
+static void booleanExpressions_clearInEvents(BooleanExpressions* handle)
+{
+	handle->iface.e1_raised = bool_false;
+}
+
+static void booleanExpressions_clearOutEvents(BooleanExpressions* handle)
+{
+}
+
+void booleanExpressions_runCycle(BooleanExpressions* handle)
+{
+	
+	booleanExpressions_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < BOOLEANEXPRESSIONS_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case BooleanExpressions_main_region_StateA :
+		{
+			booleanExpressions_react_main_region_StateA(handle);
+			break;
+		}
+		case BooleanExpressions_main_region_StateB :
+		{
+			booleanExpressions_react_main_region_StateB(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	booleanExpressions_clearInEvents(handle);
+}
+
+
+sc_boolean booleanExpressions_isStateActive(const BooleanExpressions* handle, BooleanExpressionsStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case BooleanExpressions_main_region_StateA :
+			result = (sc_boolean) (handle->stateConfVector[0] == BooleanExpressions_main_region_StateA
+			);
+			break;
+		case BooleanExpressions_main_region_StateB :
+			result = (sc_boolean) (handle->stateConfVector[0] == BooleanExpressions_main_region_StateB
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void booleanExpressionsIface_raise_e1(BooleanExpressions* handle)
+{
+	handle->iface.e1_raised = bool_true;
+}
+
+
+sc_boolean booleanExpressionsIface_get_myBool1(const BooleanExpressions* handle)
+{
+	return handle->iface.myBool1;
+}
+void booleanExpressionsIface_set_myBool1(BooleanExpressions* handle, sc_boolean value)
+{
+	handle->iface.myBool1 = value;
+}
+sc_boolean booleanExpressionsIface_get_myBool2(const BooleanExpressions* handle)
+{
+	return handle->iface.myBool2;
+}
+void booleanExpressionsIface_set_myBool2(BooleanExpressions* handle, sc_boolean value)
+{
+	handle->iface.myBool2 = value;
+}
+sc_boolean booleanExpressionsIface_get_and(const BooleanExpressions* handle)
+{
+	return handle->iface.and_ID;
+}
+void booleanExpressionsIface_set_and(BooleanExpressions* handle, sc_boolean value)
+{
+	handle->iface.and_ID = value;
+}
+sc_boolean booleanExpressionsIface_get_or(const BooleanExpressions* handle)
+{
+	return handle->iface.or_ID;
+}
+void booleanExpressionsIface_set_or(BooleanExpressions* handle, sc_boolean value)
+{
+	handle->iface.or_ID = value;
+}
+sc_boolean booleanExpressionsIface_get_not(const BooleanExpressions* handle)
+{
+	return handle->iface.not_ID;
+}
+void booleanExpressionsIface_set_not(BooleanExpressions* handle, sc_boolean value)
+{
+	handle->iface.not_ID = value;
+}
+sc_boolean booleanExpressionsIface_get_equal(const BooleanExpressions* handle)
+{
+	return handle->iface.equal;
+}
+void booleanExpressionsIface_set_equal(BooleanExpressions* handle, sc_boolean value)
+{
+	handle->iface.equal = value;
+}
+sc_boolean booleanExpressionsIface_get_notequal(const BooleanExpressions* handle)
+{
+	return handle->iface.notequal;
+}
+void booleanExpressionsIface_set_notequal(BooleanExpressions* handle, sc_boolean value)
+{
+	handle->iface.notequal = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean booleanExpressions_check_main_region_StateA_tr0_tr0(const BooleanExpressions* handle)
+{
+	return handle->iface.e1_raised;
+}
+
+static void booleanExpressions_effect_main_region_StateA_tr0(BooleanExpressions* handle)
+{
+	booleanExpressions_exseq_main_region_StateA(handle);
+	booleanExpressions_enseq_main_region_StateB_default(handle);
+}
+
+/* Entry action for state 'StateA'. */
+static void booleanExpressions_enact_main_region_StateA(BooleanExpressions* handle)
+{
+	/* Entry action for state 'StateA'. */
+	handle->iface.myBool1 = bool_true;
+	handle->iface.myBool2 = bool_false;
+}
+
+/* Entry action for state 'StateB'. */
+static void booleanExpressions_enact_main_region_StateB(BooleanExpressions* handle)
+{
+	/* Entry action for state 'StateB'. */
+	handle->iface.and_ID = handle->iface.myBool1 && handle->iface.myBool2;
+	handle->iface.or_ID = handle->iface.myBool1 || handle->iface.myBool2;
+	handle->iface.not_ID = !handle->iface.myBool1;
+	handle->iface.equal = handle->iface.myBool1 == handle->iface.myBool2;
+	handle->iface.notequal = (handle->iface.myBool1 != handle->iface.myBool2);
+}
+
+/* 'default' enter sequence for state StateA */
+static void booleanExpressions_enseq_main_region_StateA_default(BooleanExpressions* handle)
+{
+	/* 'default' enter sequence for state StateA */
+	booleanExpressions_enact_main_region_StateA(handle);
+	handle->stateConfVector[0] = BooleanExpressions_main_region_StateA;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state StateB */
+static void booleanExpressions_enseq_main_region_StateB_default(BooleanExpressions* handle)
+{
+	/* 'default' enter sequence for state StateB */
+	booleanExpressions_enact_main_region_StateB(handle);
+	handle->stateConfVector[0] = BooleanExpressions_main_region_StateB;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void booleanExpressions_enseq_main_region_default(BooleanExpressions* handle)
+{
+	/* 'default' enter sequence for region main region */
+	booleanExpressions_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state StateA */
+static void booleanExpressions_exseq_main_region_StateA(BooleanExpressions* handle)
+{
+	/* Default exit sequence for state StateA */
+	handle->stateConfVector[0] = BooleanExpressions_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state StateB */
+static void booleanExpressions_exseq_main_region_StateB(BooleanExpressions* handle)
+{
+	/* Default exit sequence for state StateB */
+	handle->stateConfVector[0] = BooleanExpressions_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void booleanExpressions_exseq_main_region(BooleanExpressions* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of BooleanExpressions.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case BooleanExpressions_main_region_StateA :
+		{
+			booleanExpressions_exseq_main_region_StateA(handle);
+			break;
+		}
+		case BooleanExpressions_main_region_StateB :
+		{
+			booleanExpressions_exseq_main_region_StateB(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state StateA. */
+static void booleanExpressions_react_main_region_StateA(BooleanExpressions* handle)
+{
+	/* The reactions of state StateA. */
+	if (booleanExpressions_check_main_region_StateA_tr0_tr0(handle) == bool_true)
+	{ 
+		booleanExpressions_effect_main_region_StateA_tr0(handle);
+	} 
+}
+
+/* The reactions of state StateB. */
+static void booleanExpressions_react_main_region_StateB(BooleanExpressions* handle)
+{
+	/* The reactions of state StateB. */
+}
+
+/* Default react sequence for initial entry  */
+static void booleanExpressions_react_main_region__entry_Default(BooleanExpressions* handle)
+{
+	/* Default react sequence for initial entry  */
+	booleanExpressions_enseq_main_region_StateA_default(handle);
+}
+
+

+ 115 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/BooleanExpressions.h

@@ -0,0 +1,115 @@
+
+#ifndef BOOLEANEXPRESSIONS_H_
+#define BOOLEANEXPRESSIONS_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'BooleanExpressions'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	BooleanExpressions_main_region_StateA,
+	BooleanExpressions_main_region_StateB,
+	BooleanExpressions_last_state
+} BooleanExpressionsStates;
+
+/*! Type definition of the data structure for the BooleanExpressionsIface interface scope. */
+typedef struct
+{
+	sc_boolean myBool1;
+	sc_boolean myBool2;
+	sc_boolean and_ID;
+	sc_boolean or_ID;
+	sc_boolean not_ID;
+	sc_boolean equal;
+	sc_boolean notequal;
+	sc_boolean e1_raised;
+} BooleanExpressionsIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define BOOLEANEXPRESSIONS_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the BooleanExpressions state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	BooleanExpressionsStates stateConfVector[BOOLEANEXPRESSIONS_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	BooleanExpressionsIface iface;
+} BooleanExpressions;
+
+/*! Initializes the BooleanExpressions state machine data structures. Must be called before first usage.*/
+extern void booleanExpressions_init(BooleanExpressions* handle);
+
+/*! Activates the state machine */
+extern void booleanExpressions_enter(BooleanExpressions* handle);
+
+/*! Deactivates the state machine */
+extern void booleanExpressions_exit(BooleanExpressions* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void booleanExpressions_runCycle(BooleanExpressions* handle);
+
+
+/*! Gets the value of the variable 'myBool1' that is defined in the default interface scope. */ 
+extern sc_boolean booleanExpressionsIface_get_myBool1(const BooleanExpressions* handle);
+/*! Sets the value of the variable 'myBool1' that is defined in the default interface scope. */ 
+extern void booleanExpressionsIface_set_myBool1(BooleanExpressions* handle, sc_boolean value);
+/*! Gets the value of the variable 'myBool2' that is defined in the default interface scope. */ 
+extern sc_boolean booleanExpressionsIface_get_myBool2(const BooleanExpressions* handle);
+/*! Sets the value of the variable 'myBool2' that is defined in the default interface scope. */ 
+extern void booleanExpressionsIface_set_myBool2(BooleanExpressions* handle, sc_boolean value);
+/*! Gets the value of the variable 'and' that is defined in the default interface scope. */ 
+extern sc_boolean booleanExpressionsIface_get_and(const BooleanExpressions* handle);
+/*! Sets the value of the variable 'and' that is defined in the default interface scope. */ 
+extern void booleanExpressionsIface_set_and(BooleanExpressions* handle, sc_boolean value);
+/*! Gets the value of the variable 'or' that is defined in the default interface scope. */ 
+extern sc_boolean booleanExpressionsIface_get_or(const BooleanExpressions* handle);
+/*! Sets the value of the variable 'or' that is defined in the default interface scope. */ 
+extern void booleanExpressionsIface_set_or(BooleanExpressions* handle, sc_boolean value);
+/*! Gets the value of the variable 'not' that is defined in the default interface scope. */ 
+extern sc_boolean booleanExpressionsIface_get_not(const BooleanExpressions* handle);
+/*! Sets the value of the variable 'not' that is defined in the default interface scope. */ 
+extern void booleanExpressionsIface_set_not(BooleanExpressions* handle, sc_boolean value);
+/*! Gets the value of the variable 'equal' that is defined in the default interface scope. */ 
+extern sc_boolean booleanExpressionsIface_get_equal(const BooleanExpressions* handle);
+/*! Sets the value of the variable 'equal' that is defined in the default interface scope. */ 
+extern void booleanExpressionsIface_set_equal(BooleanExpressions* handle, sc_boolean value);
+/*! Gets the value of the variable 'notequal' that is defined in the default interface scope. */ 
+extern sc_boolean booleanExpressionsIface_get_notequal(const BooleanExpressions* handle);
+/*! Sets the value of the variable 'notequal' that is defined in the default interface scope. */ 
+extern void booleanExpressionsIface_set_notequal(BooleanExpressions* handle, sc_boolean value);
+/*! Raises the in event 'e1' that is defined in the default interface scope. */ 
+extern void booleanExpressionsIface_raise_e1(BooleanExpressions* handle);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean booleanExpressions_isActive(const BooleanExpressions* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean booleanExpressions_isFinal(const BooleanExpressions* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean booleanExpressions_isStateActive(const BooleanExpressions* handle, BooleanExpressionsStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* BOOLEANEXPRESSIONS_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/BooleanExpressions.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart BooleanExpressions {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/BooleanExpressionsTest"
+			targetProject = "gtests"
+			targetFolder = "BooleanExpressionsTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 694 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/CKeywords.c

@@ -0,0 +1,694 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "CKeywords.h"
+/*! \file Implementation of the state machine 'CKeywords'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean cKeywords_check_auto_char_tr0_tr0(const CKeywords* handle);
+static void cKeywords_effect_auto_char_tr0(CKeywords* handle);
+static void cKeywords_enact_auto_char(CKeywords* handle);
+static void cKeywords_enact_auto_loop_switch_case_enum_asm(CKeywords* handle);
+static void cKeywords_enseq_auto_char_default(CKeywords* handle);
+static void cKeywords_enseq_auto_loop_default(CKeywords* handle);
+static void cKeywords_enseq_auto_loop_switch_case_default(CKeywords* handle);
+static void cKeywords_enseq_auto_loop_switch_case_enum_asm_default(CKeywords* handle);
+static void cKeywords_enseq_auto_default(CKeywords* handle);
+static void cKeywords_enseq_auto_loop_switch_default(CKeywords* handle);
+static void cKeywords_shenseq_auto_loop_switch(CKeywords* handle);
+static void cKeywords_enseq_auto_loop_switch_case_enum_default(CKeywords* handle);
+static void cKeywords_dhenseq_auto_loop_switch_case_enum(CKeywords* handle);
+static void cKeywords_exseq_auto_char(CKeywords* handle);
+static void cKeywords_exseq_auto_loop_switch_case_enum_asm(CKeywords* handle);
+static void cKeywords_exseq_auto(CKeywords* handle);
+static void cKeywords_exseq_auto_loop_switch(CKeywords* handle);
+static void cKeywords_exseq_auto_loop_switch_case_enum(CKeywords* handle);
+static void cKeywords_react_auto_char(CKeywords* handle);
+static void cKeywords_react_auto_loop_switch_case_enum_asm(CKeywords* handle);
+static void cKeywords_react_auto__entry_Default(CKeywords* handle);
+static void cKeywords_react_auto_loop_switch__entry_Default(CKeywords* handle);
+static void cKeywords_react_auto_loop_switch_case_enum__entry_Default(CKeywords* handle);
+static void cKeywords_clearInEvents(CKeywords* handle);
+static void cKeywords_clearOutEvents(CKeywords* handle);
+
+
+void cKeywords_init(CKeywords* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < CKEYWORDS_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = CKeywords_last_state;
+	}
+	
+	for (i = 0; i < CKEYWORDS_MAX_HISTORY_STATES; ++i)
+	{
+		handle->historyVector[i] = CKeywords_last_state;
+	}
+	
+	handle->stateConfVectorPosition = 0;
+
+	cKeywords_clearInEvents(handle);
+	cKeywords_clearOutEvents(handle);
+
+	/* Default init sequence for statechart CKeywords */
+	handle->iface.case_ID = bool_false;
+	handle->iface.do_ID = 0;
+	handle->iface.continue_ID = bool_false;
+	handle->iface.double_ID = bool_false;
+	handle->iface.enum_ID = bool_false;
+	handle->iface.extern_ID = bool_false;
+	handle->iface.float_ID = bool_false;
+	handle->iface.for_ID = bool_false;
+	handle->iface.goto_ID = bool_false;
+	handle->iface.if_ID = bool_false;
+	handle->iface.int_ID = bool_false;
+	handle->iface.long_ID = bool_false;
+	handle->iface.register_ID = bool_false;
+	handle->iface.return_ID = bool_false;
+	handle->iface.short_ID = bool_false;
+	handle->iface.signed_ID = bool_false;
+	handle->iface.sizeof_ID = bool_false;
+	handle->iface.static_ID = bool_false;
+	handle->iface.struct_ID = bool_false;
+	handle->iface.switch_ID = bool_false;
+	handle->iface.typedef_ID = bool_false;
+	handle->iface.union_ID = bool_false;
+	handle->iface.unsigned_ID = bool_false;
+	handle->iface.void_ID = bool_false;
+	handle->iface.volatile_ID = bool_false;
+	handle->iface.while_ID = bool_false;
+
+}
+
+void cKeywords_enter(CKeywords* handle)
+{
+	/* Default enter sequence for statechart CKeywords */
+	cKeywords_enseq_auto_default(handle);
+}
+
+void cKeywords_exit(CKeywords* handle)
+{
+	/* Default exit sequence for statechart CKeywords */
+	cKeywords_exseq_auto(handle);
+}
+
+sc_boolean cKeywords_isActive(const CKeywords* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != CKeywords_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean cKeywords_isFinal(const CKeywords* handle)
+{
+   return bool_false;
+}
+
+static void cKeywords_clearInEvents(CKeywords* handle)
+{
+	handle->iface.auto_raised = bool_false;
+	handle->iface.break_raised = bool_false;
+}
+
+static void cKeywords_clearOutEvents(CKeywords* handle)
+{
+}
+
+void cKeywords_runCycle(CKeywords* handle)
+{
+	
+	cKeywords_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < CKEYWORDS_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case CKeywords_auto_char :
+		{
+			cKeywords_react_auto_char(handle);
+			break;
+		}
+		case CKeywords_auto_loop_switch_case_enum_asm :
+		{
+			cKeywords_react_auto_loop_switch_case_enum_asm(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	cKeywords_clearInEvents(handle);
+}
+
+
+sc_boolean cKeywords_isStateActive(const CKeywords* handle, CKeywordsStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case CKeywords_auto_char :
+			result = (sc_boolean) (handle->stateConfVector[0] == CKeywords_auto_char
+			);
+			break;
+		case CKeywords_auto_loop :
+			result = (sc_boolean) (handle->stateConfVector[0] >= CKeywords_auto_loop
+				&& handle->stateConfVector[0] <= CKeywords_auto_loop_switch_case_enum_asm);
+			break;
+		case CKeywords_auto_loop_switch_case :
+			result = (sc_boolean) (handle->stateConfVector[0] >= CKeywords_auto_loop_switch_case
+				&& handle->stateConfVector[0] <= CKeywords_auto_loop_switch_case_enum_asm);
+			break;
+		case CKeywords_auto_loop_switch_case_enum_asm :
+			result = (sc_boolean) (handle->stateConfVector[0] == CKeywords_auto_loop_switch_case_enum_asm
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void cKeywordsIface_raise_auto(CKeywords* handle)
+{
+	handle->iface.auto_raised = bool_true;
+}
+void cKeywordsIface_raise_break(CKeywords* handle)
+{
+	handle->iface.break_raised = bool_true;
+}
+
+
+sc_boolean cKeywordsIface_get_case(const CKeywords* handle)
+{
+	return handle->iface.case_ID;
+}
+void cKeywordsIface_set_case(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.case_ID = value;
+}
+sc_integer cKeywordsIface_get_do(const CKeywords* handle)
+{
+	return handle->iface.do_ID;
+}
+void cKeywordsIface_set_do(CKeywords* handle, sc_integer value)
+{
+	handle->iface.do_ID = value;
+}
+sc_boolean cKeywordsIface_get_continue(const CKeywords* handle)
+{
+	return handle->iface.continue_ID;
+}
+void cKeywordsIface_set_continue(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.continue_ID = value;
+}
+sc_boolean cKeywordsIface_get_double(const CKeywords* handle)
+{
+	return handle->iface.double_ID;
+}
+void cKeywordsIface_set_double(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.double_ID = value;
+}
+sc_boolean cKeywordsIface_get_enum(const CKeywords* handle)
+{
+	return handle->iface.enum_ID;
+}
+void cKeywordsIface_set_enum(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.enum_ID = value;
+}
+sc_boolean cKeywordsIface_get_extern(const CKeywords* handle)
+{
+	return handle->iface.extern_ID;
+}
+void cKeywordsIface_set_extern(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.extern_ID = value;
+}
+sc_boolean cKeywordsIface_get_float(const CKeywords* handle)
+{
+	return handle->iface.float_ID;
+}
+void cKeywordsIface_set_float(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.float_ID = value;
+}
+sc_boolean cKeywordsIface_get_for(const CKeywords* handle)
+{
+	return handle->iface.for_ID;
+}
+void cKeywordsIface_set_for(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.for_ID = value;
+}
+sc_boolean cKeywordsIface_get_goto(const CKeywords* handle)
+{
+	return handle->iface.goto_ID;
+}
+void cKeywordsIface_set_goto(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.goto_ID = value;
+}
+sc_boolean cKeywordsIface_get_if(const CKeywords* handle)
+{
+	return handle->iface.if_ID;
+}
+void cKeywordsIface_set_if(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.if_ID = value;
+}
+sc_boolean cKeywordsIface_get_int(const CKeywords* handle)
+{
+	return handle->iface.int_ID;
+}
+void cKeywordsIface_set_int(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.int_ID = value;
+}
+sc_boolean cKeywordsIface_get_long(const CKeywords* handle)
+{
+	return handle->iface.long_ID;
+}
+void cKeywordsIface_set_long(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.long_ID = value;
+}
+sc_boolean cKeywordsIface_get_register(const CKeywords* handle)
+{
+	return handle->iface.register_ID;
+}
+void cKeywordsIface_set_register(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.register_ID = value;
+}
+sc_boolean cKeywordsIface_get_return(const CKeywords* handle)
+{
+	return handle->iface.return_ID;
+}
+void cKeywordsIface_set_return(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.return_ID = value;
+}
+sc_boolean cKeywordsIface_get_short(const CKeywords* handle)
+{
+	return handle->iface.short_ID;
+}
+void cKeywordsIface_set_short(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.short_ID = value;
+}
+sc_boolean cKeywordsIface_get_signed(const CKeywords* handle)
+{
+	return handle->iface.signed_ID;
+}
+void cKeywordsIface_set_signed(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.signed_ID = value;
+}
+sc_boolean cKeywordsIface_get_sizeof(const CKeywords* handle)
+{
+	return handle->iface.sizeof_ID;
+}
+void cKeywordsIface_set_sizeof(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.sizeof_ID = value;
+}
+sc_boolean cKeywordsIface_get_static(const CKeywords* handle)
+{
+	return handle->iface.static_ID;
+}
+void cKeywordsIface_set_static(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.static_ID = value;
+}
+sc_boolean cKeywordsIface_get_struct(const CKeywords* handle)
+{
+	return handle->iface.struct_ID;
+}
+void cKeywordsIface_set_struct(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.struct_ID = value;
+}
+sc_boolean cKeywordsIface_get_switch(const CKeywords* handle)
+{
+	return handle->iface.switch_ID;
+}
+void cKeywordsIface_set_switch(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.switch_ID = value;
+}
+sc_boolean cKeywordsIface_get_typedef(const CKeywords* handle)
+{
+	return handle->iface.typedef_ID;
+}
+void cKeywordsIface_set_typedef(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.typedef_ID = value;
+}
+sc_boolean cKeywordsIface_get_union(const CKeywords* handle)
+{
+	return handle->iface.union_ID;
+}
+void cKeywordsIface_set_union(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.union_ID = value;
+}
+sc_boolean cKeywordsIface_get_unsigned(const CKeywords* handle)
+{
+	return handle->iface.unsigned_ID;
+}
+void cKeywordsIface_set_unsigned(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.unsigned_ID = value;
+}
+sc_boolean cKeywordsIface_get_void(const CKeywords* handle)
+{
+	return handle->iface.void_ID;
+}
+void cKeywordsIface_set_void(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.void_ID = value;
+}
+sc_boolean cKeywordsIface_get_volatile(const CKeywords* handle)
+{
+	return handle->iface.volatile_ID;
+}
+void cKeywordsIface_set_volatile(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.volatile_ID = value;
+}
+sc_boolean cKeywordsIface_get_while(const CKeywords* handle)
+{
+	return handle->iface.while_ID;
+}
+void cKeywordsIface_set_while(CKeywords* handle, sc_boolean value)
+{
+	handle->iface.while_ID = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean cKeywords_check_auto_char_tr0_tr0(const CKeywords* handle)
+{
+	return ((handle->iface.auto_raised) && (handle->iface.case_ID)) ? bool_true : bool_false;
+}
+
+static void cKeywords_effect_auto_char_tr0(CKeywords* handle)
+{
+	cKeywords_exseq_auto_char(handle);
+	handle->iface.do_ID += 1;
+	cKeywords_enseq_auto_loop_default(handle);
+}
+
+/* Entry action for state 'char'. */
+static void cKeywords_enact_auto_char(CKeywords* handle)
+{
+	/* Entry action for state 'char'. */
+	handle->iface.case_ID = bool_true;
+	handle->iface.do_ID = 0;
+	handle->iface.continue_ID = bool_true;
+	handle->iface.double_ID = bool_true;
+	handle->iface.enum_ID = bool_true;
+	handle->iface.extern_ID = bool_true;
+	handle->iface.float_ID = bool_true;
+	handle->iface.for_ID = bool_true;
+	handle->iface.goto_ID = bool_true;
+	handle->iface.if_ID = bool_true;
+	handle->iface.int_ID = bool_true;
+	handle->iface.long_ID = bool_true;
+	handle->iface.register_ID = bool_true;
+	handle->iface.return_ID = bool_true;
+	handle->iface.short_ID = bool_true;
+	handle->iface.signed_ID = bool_true;
+	handle->iface.sizeof_ID = bool_true;
+	handle->iface.static_ID = bool_true;
+	handle->iface.struct_ID = bool_true;
+	handle->iface.switch_ID = bool_true;
+	handle->iface.typedef_ID = bool_true;
+	handle->iface.union_ID = bool_true;
+	handle->iface.unsigned_ID = bool_true;
+	handle->iface.void_ID = bool_true;
+	handle->iface.volatile_ID = bool_true;
+	handle->iface.while_ID = bool_true;
+}
+
+/* Entry action for state 'asm'. */
+static void cKeywords_enact_auto_loop_switch_case_enum_asm(CKeywords* handle)
+{
+	/* Entry action for state 'asm'. */
+	handle->iface.case_ID = bool_false;
+	handle->iface.do_ID = 0;
+	handle->iface.continue_ID = bool_false;
+	handle->iface.double_ID = bool_false;
+	handle->iface.enum_ID = bool_false;
+	handle->iface.extern_ID = bool_false;
+	handle->iface.float_ID = bool_false;
+	handle->iface.for_ID = bool_false;
+	handle->iface.goto_ID = bool_false;
+	handle->iface.if_ID = bool_false;
+	handle->iface.int_ID = bool_false;
+	handle->iface.long_ID = bool_false;
+	handle->iface.register_ID = bool_false;
+	handle->iface.return_ID = bool_false;
+	handle->iface.short_ID = bool_false;
+	handle->iface.signed_ID = bool_false;
+	handle->iface.sizeof_ID = bool_false;
+	handle->iface.static_ID = bool_false;
+	handle->iface.struct_ID = bool_false;
+	handle->iface.switch_ID = bool_false;
+	handle->iface.typedef_ID = bool_false;
+	handle->iface.union_ID = bool_false;
+	handle->iface.unsigned_ID = bool_false;
+	handle->iface.void_ID = bool_false;
+	handle->iface.volatile_ID = bool_false;
+	handle->iface.while_ID = bool_false;
+}
+
+/* 'default' enter sequence for state char */
+static void cKeywords_enseq_auto_char_default(CKeywords* handle)
+{
+	/* 'default' enter sequence for state char */
+	cKeywords_enact_auto_char(handle);
+	handle->stateConfVector[0] = CKeywords_auto_char;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state loop */
+static void cKeywords_enseq_auto_loop_default(CKeywords* handle)
+{
+	/* 'default' enter sequence for state loop */
+	cKeywords_enseq_auto_loop_switch_default(handle);
+}
+
+/* 'default' enter sequence for state case */
+static void cKeywords_enseq_auto_loop_switch_case_default(CKeywords* handle)
+{
+	/* 'default' enter sequence for state case */
+	cKeywords_enseq_auto_loop_switch_case_enum_default(handle);
+	handle->historyVector[0] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for state asm */
+static void cKeywords_enseq_auto_loop_switch_case_enum_asm_default(CKeywords* handle)
+{
+	/* 'default' enter sequence for state asm */
+	cKeywords_enact_auto_loop_switch_case_enum_asm(handle);
+	handle->stateConfVector[0] = CKeywords_auto_loop_switch_case_enum_asm;
+	handle->stateConfVectorPosition = 0;
+	handle->historyVector[1] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for region auto */
+static void cKeywords_enseq_auto_default(CKeywords* handle)
+{
+	/* 'default' enter sequence for region auto */
+	cKeywords_react_auto__entry_Default(handle);
+}
+
+/* 'default' enter sequence for region switch */
+static void cKeywords_enseq_auto_loop_switch_default(CKeywords* handle)
+{
+	/* 'default' enter sequence for region switch */
+	cKeywords_react_auto_loop_switch__entry_Default(handle);
+}
+
+/* shallow enterSequence with history in child switch */
+static void cKeywords_shenseq_auto_loop_switch(CKeywords* handle)
+{
+	/* shallow enterSequence with history in child switch */
+	/* Handle shallow history entry of switch */
+	switch(handle->historyVector[ 0 ])
+	{
+		case CKeywords_auto_loop_switch_case_enum_asm :
+		{
+			cKeywords_enseq_auto_loop_switch_case_default(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* 'default' enter sequence for region enum */
+static void cKeywords_enseq_auto_loop_switch_case_enum_default(CKeywords* handle)
+{
+	/* 'default' enter sequence for region enum */
+	cKeywords_react_auto_loop_switch_case_enum__entry_Default(handle);
+}
+
+/* deep enterSequence with history in child enum */
+static void cKeywords_dhenseq_auto_loop_switch_case_enum(CKeywords* handle)
+{
+	/* deep enterSequence with history in child enum */
+	/* Handle deep history entry of enum */
+	switch(handle->historyVector[ 1 ])
+	{
+		case CKeywords_auto_loop_switch_case_enum_asm :
+		{
+			/* enterSequence with history in child asm for leaf asm */
+			cKeywords_enseq_auto_loop_switch_case_enum_asm_default(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for state char */
+static void cKeywords_exseq_auto_char(CKeywords* handle)
+{
+	/* Default exit sequence for state char */
+	handle->stateConfVector[0] = CKeywords_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state asm */
+static void cKeywords_exseq_auto_loop_switch_case_enum_asm(CKeywords* handle)
+{
+	/* Default exit sequence for state asm */
+	handle->stateConfVector[0] = CKeywords_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region auto */
+static void cKeywords_exseq_auto(CKeywords* handle)
+{
+	/* Default exit sequence for region auto */
+	/* Handle exit of all possible states (of CKeywords.auto) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case CKeywords_auto_char :
+		{
+			cKeywords_exseq_auto_char(handle);
+			break;
+		}
+		case CKeywords_auto_loop_switch_case_enum_asm :
+		{
+			cKeywords_exseq_auto_loop_switch_case_enum_asm(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region switch */
+static void cKeywords_exseq_auto_loop_switch(CKeywords* handle)
+{
+	/* Default exit sequence for region switch */
+	/* Handle exit of all possible states (of CKeywords.auto.loop.switch) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case CKeywords_auto_loop_switch_case_enum_asm :
+		{
+			cKeywords_exseq_auto_loop_switch_case_enum_asm(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region enum */
+static void cKeywords_exseq_auto_loop_switch_case_enum(CKeywords* handle)
+{
+	/* Default exit sequence for region enum */
+	/* Handle exit of all possible states (of CKeywords.auto.loop.switch.case.enum) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case CKeywords_auto_loop_switch_case_enum_asm :
+		{
+			cKeywords_exseq_auto_loop_switch_case_enum_asm(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state char. */
+static void cKeywords_react_auto_char(CKeywords* handle)
+{
+	/* The reactions of state char. */
+	if (cKeywords_check_auto_char_tr0_tr0(handle) == bool_true)
+	{ 
+		cKeywords_effect_auto_char_tr0(handle);
+	} 
+}
+
+/* The reactions of state asm. */
+static void cKeywords_react_auto_loop_switch_case_enum_asm(CKeywords* handle)
+{
+	/* The reactions of state asm. */
+}
+
+/* Default react sequence for initial entry  */
+static void cKeywords_react_auto__entry_Default(CKeywords* handle)
+{
+	/* Default react sequence for initial entry  */
+	cKeywords_enseq_auto_char_default(handle);
+}
+
+/* Default react sequence for shallow history entry  */
+static void cKeywords_react_auto_loop_switch__entry_Default(CKeywords* handle)
+{
+	/* Default react sequence for shallow history entry  */
+	/* Enter the region with shallow history */
+	if (handle->historyVector[0] != CKeywords_last_state)
+	{
+		cKeywords_shenseq_auto_loop_switch(handle);
+	} else
+	{
+		cKeywords_enseq_auto_loop_switch_case_default(handle);
+	} 
+}
+
+/* Default react sequence for deep history entry  */
+static void cKeywords_react_auto_loop_switch_case_enum__entry_Default(CKeywords* handle)
+{
+	/* Default react sequence for deep history entry  */
+	/* Enter the region with deep history */
+	if (handle->historyVector[1] != CKeywords_last_state)
+	{
+		cKeywords_dhenseq_auto_loop_switch_case_enum(handle);
+	} else
+	{
+		cKeywords_enseq_auto_loop_switch_case_enum_asm_default(handle);
+	} 
+}
+
+

+ 219 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/CKeywords.h

@@ -0,0 +1,219 @@
+
+#ifndef CKEYWORDS_H_
+#define CKEYWORDS_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'CKeywords'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	CKeywords_auto_char,
+	CKeywords_auto_loop,
+	CKeywords_auto_loop_switch_case,
+	CKeywords_auto_loop_switch_case_enum_asm,
+	CKeywords_last_state
+} CKeywordsStates;
+
+/*! Type definition of the data structure for the CKeywordsIface interface scope. */
+typedef struct
+{
+	sc_boolean auto_raised;
+	sc_boolean break_raised;
+	sc_boolean case_ID;
+	sc_integer do_ID;
+	sc_boolean continue_ID;
+	sc_boolean double_ID;
+	sc_boolean enum_ID;
+	sc_boolean extern_ID;
+	sc_boolean float_ID;
+	sc_boolean for_ID;
+	sc_boolean goto_ID;
+	sc_boolean if_ID;
+	sc_boolean int_ID;
+	sc_boolean long_ID;
+	sc_boolean register_ID;
+	sc_boolean return_ID;
+	sc_boolean short_ID;
+	sc_boolean signed_ID;
+	sc_boolean sizeof_ID;
+	sc_boolean static_ID;
+	sc_boolean struct_ID;
+	sc_boolean switch_ID;
+	sc_boolean typedef_ID;
+	sc_boolean union_ID;
+	sc_boolean unsigned_ID;
+	sc_boolean void_ID;
+	sc_boolean volatile_ID;
+	sc_boolean while_ID;
+} CKeywordsIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define CKEYWORDS_MAX_ORTHOGONAL_STATES 1
+	/*! Define dimension of the state configuration vector for history states. */
+#define CKEYWORDS_MAX_HISTORY_STATES 2
+
+/*! 
+ * Type definition of the data structure for the CKeywords state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	CKeywordsStates stateConfVector[CKEYWORDS_MAX_ORTHOGONAL_STATES];
+	CKeywordsStates historyVector[CKEYWORDS_MAX_HISTORY_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	CKeywordsIface iface;
+} CKeywords;
+
+/*! Initializes the CKeywords state machine data structures. Must be called before first usage.*/
+extern void cKeywords_init(CKeywords* handle);
+
+/*! Activates the state machine */
+extern void cKeywords_enter(CKeywords* handle);
+
+/*! Deactivates the state machine */
+extern void cKeywords_exit(CKeywords* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void cKeywords_runCycle(CKeywords* handle);
+
+
+/*! Raises the in event 'auto' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_raise_auto(CKeywords* handle);
+
+/*! Raises the in event 'break' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_raise_break(CKeywords* handle);
+
+/*! Gets the value of the variable 'case' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_case(const CKeywords* handle);
+/*! Sets the value of the variable 'case' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_case(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'do' that is defined in the default interface scope. */ 
+extern sc_integer cKeywordsIface_get_do(const CKeywords* handle);
+/*! Sets the value of the variable 'do' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_do(CKeywords* handle, sc_integer value);
+/*! Gets the value of the variable 'continue' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_continue(const CKeywords* handle);
+/*! Sets the value of the variable 'continue' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_continue(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'double' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_double(const CKeywords* handle);
+/*! Sets the value of the variable 'double' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_double(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'enum' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_enum(const CKeywords* handle);
+/*! Sets the value of the variable 'enum' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_enum(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'extern' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_extern(const CKeywords* handle);
+/*! Sets the value of the variable 'extern' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_extern(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'float' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_float(const CKeywords* handle);
+/*! Sets the value of the variable 'float' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_float(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'for' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_for(const CKeywords* handle);
+/*! Sets the value of the variable 'for' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_for(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'goto' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_goto(const CKeywords* handle);
+/*! Sets the value of the variable 'goto' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_goto(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'if' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_if(const CKeywords* handle);
+/*! Sets the value of the variable 'if' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_if(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'int' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_int(const CKeywords* handle);
+/*! Sets the value of the variable 'int' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_int(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'long' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_long(const CKeywords* handle);
+/*! Sets the value of the variable 'long' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_long(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'register' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_register(const CKeywords* handle);
+/*! Sets the value of the variable 'register' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_register(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'return' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_return(const CKeywords* handle);
+/*! Sets the value of the variable 'return' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_return(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'short' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_short(const CKeywords* handle);
+/*! Sets the value of the variable 'short' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_short(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'signed' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_signed(const CKeywords* handle);
+/*! Sets the value of the variable 'signed' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_signed(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'sizeof' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_sizeof(const CKeywords* handle);
+/*! Sets the value of the variable 'sizeof' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_sizeof(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'static' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_static(const CKeywords* handle);
+/*! Sets the value of the variable 'static' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_static(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'struct' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_struct(const CKeywords* handle);
+/*! Sets the value of the variable 'struct' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_struct(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'switch' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_switch(const CKeywords* handle);
+/*! Sets the value of the variable 'switch' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_switch(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'typedef' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_typedef(const CKeywords* handle);
+/*! Sets the value of the variable 'typedef' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_typedef(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'union' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_union(const CKeywords* handle);
+/*! Sets the value of the variable 'union' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_union(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'unsigned' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_unsigned(const CKeywords* handle);
+/*! Sets the value of the variable 'unsigned' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_unsigned(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'void' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_void(const CKeywords* handle);
+/*! Sets the value of the variable 'void' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_void(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'volatile' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_volatile(const CKeywords* handle);
+/*! Sets the value of the variable 'volatile' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_volatile(CKeywords* handle, sc_boolean value);
+/*! Gets the value of the variable 'while' that is defined in the default interface scope. */ 
+extern sc_boolean cKeywordsIface_get_while(const CKeywords* handle);
+/*! Sets the value of the variable 'while' that is defined in the default interface scope. */ 
+extern void cKeywordsIface_set_while(CKeywords* handle, sc_boolean value);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean cKeywords_isActive(const CKeywords* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean cKeywords_isFinal(const CKeywords* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean cKeywords_isStateActive(const CKeywords* handle, CKeywordsStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* CKEYWORDS_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/CKeywords.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart CKeywords {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/CKeywordsTest"
+			targetProject = "gtests"
+			targetFolder = "CKeywordsTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 325 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/CastExpressions.c

@@ -0,0 +1,325 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "CastExpressions.h"
+/*! \file Implementation of the state machine 'CastExpressions'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean castExpressions_check_main_region_A_tr0_tr0(const CastExpressions* handle);
+static sc_boolean castExpressions_check_main_region_B_tr0_tr0(const CastExpressions* handle);
+static void castExpressions_effect_main_region_A_tr0(CastExpressions* handle);
+static void castExpressions_effect_main_region_B_tr0(CastExpressions* handle);
+static void castExpressions_enact_main_region_B(CastExpressions* handle);
+static void castExpressions_enact_main_region_C(CastExpressions* handle);
+static void castExpressions_enseq_main_region_A_default(CastExpressions* handle);
+static void castExpressions_enseq_main_region_B_default(CastExpressions* handle);
+static void castExpressions_enseq_main_region_C_default(CastExpressions* handle);
+static void castExpressions_enseq_main_region_default(CastExpressions* handle);
+static void castExpressions_exseq_main_region_A(CastExpressions* handle);
+static void castExpressions_exseq_main_region_B(CastExpressions* handle);
+static void castExpressions_exseq_main_region_C(CastExpressions* handle);
+static void castExpressions_exseq_main_region(CastExpressions* handle);
+static void castExpressions_react_main_region_A(CastExpressions* handle);
+static void castExpressions_react_main_region_B(CastExpressions* handle);
+static void castExpressions_react_main_region_C(CastExpressions* handle);
+static void castExpressions_react_main_region__entry_Default(CastExpressions* handle);
+static void castExpressions_clearInEvents(CastExpressions* handle);
+static void castExpressions_clearOutEvents(CastExpressions* handle);
+
+
+void castExpressions_init(CastExpressions* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < CASTEXPRESSIONS_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = CastExpressions_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	castExpressions_clearInEvents(handle);
+	castExpressions_clearOutEvents(handle);
+
+	/* Default init sequence for statechart CastExpressions */
+	handle->iface.realValue = (((sc_real) 5));
+	handle->iface.intValue = (((sc_integer) 5.5));
+
+}
+
+void castExpressions_enter(CastExpressions* handle)
+{
+	/* Default enter sequence for statechart CastExpressions */
+	castExpressions_enseq_main_region_default(handle);
+}
+
+void castExpressions_exit(CastExpressions* handle)
+{
+	/* Default exit sequence for statechart CastExpressions */
+	castExpressions_exseq_main_region(handle);
+}
+
+sc_boolean castExpressions_isActive(const CastExpressions* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != CastExpressions_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean castExpressions_isFinal(const CastExpressions* handle)
+{
+   return bool_false;
+}
+
+static void castExpressions_clearInEvents(CastExpressions* handle)
+{
+}
+
+static void castExpressions_clearOutEvents(CastExpressions* handle)
+{
+}
+
+void castExpressions_runCycle(CastExpressions* handle)
+{
+	
+	castExpressions_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < CASTEXPRESSIONS_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case CastExpressions_main_region_A :
+		{
+			castExpressions_react_main_region_A(handle);
+			break;
+		}
+		case CastExpressions_main_region_B :
+		{
+			castExpressions_react_main_region_B(handle);
+			break;
+		}
+		case CastExpressions_main_region_C :
+		{
+			castExpressions_react_main_region_C(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	castExpressions_clearInEvents(handle);
+}
+
+
+sc_boolean castExpressions_isStateActive(const CastExpressions* handle, CastExpressionsStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case CastExpressions_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == CastExpressions_main_region_A
+			);
+			break;
+		case CastExpressions_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == CastExpressions_main_region_B
+			);
+			break;
+		case CastExpressions_main_region_C :
+			result = (sc_boolean) (handle->stateConfVector[0] == CastExpressions_main_region_C
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+
+
+sc_real castExpressionsIface_get_realValue(const CastExpressions* handle)
+{
+	return handle->iface.realValue;
+}
+void castExpressionsIface_set_realValue(CastExpressions* handle, sc_real value)
+{
+	handle->iface.realValue = value;
+}
+sc_integer castExpressionsIface_get_intValue(const CastExpressions* handle)
+{
+	return handle->iface.intValue;
+}
+void castExpressionsIface_set_intValue(CastExpressions* handle, sc_integer value)
+{
+	handle->iface.intValue = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean castExpressions_check_main_region_A_tr0_tr0(const CastExpressions* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean castExpressions_check_main_region_B_tr0_tr0(const CastExpressions* handle)
+{
+	return ((bool_true) && (((sc_real) (handle->iface.realValue * 0.1)) > ((sc_integer) 1.4) && ((sc_integer) (handle->iface.realValue * handle->iface.intValue)) < ((sc_real) 100))) ? bool_true : bool_false;
+}
+
+static void castExpressions_effect_main_region_A_tr0(CastExpressions* handle)
+{
+	castExpressions_exseq_main_region_A(handle);
+	castExpressions_enseq_main_region_B_default(handle);
+}
+
+static void castExpressions_effect_main_region_B_tr0(CastExpressions* handle)
+{
+	castExpressions_exseq_main_region_B(handle);
+	castExpressions_enseq_main_region_C_default(handle);
+}
+
+/* Entry action for state 'B'. */
+static void castExpressions_enact_main_region_B(CastExpressions* handle)
+{
+	/* Entry action for state 'B'. */
+	handle->iface.realValue = 3 * ((sc_integer) 5.5);
+}
+
+/* Entry action for state 'C'. */
+static void castExpressions_enact_main_region_C(CastExpressions* handle)
+{
+	/* Entry action for state 'C'. */
+	handle->iface.realValue = ((sc_integer) (handle->iface.realValue * handle->iface.intValue * 10.1));
+}
+
+/* 'default' enter sequence for state A */
+static void castExpressions_enseq_main_region_A_default(CastExpressions* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = CastExpressions_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void castExpressions_enseq_main_region_B_default(CastExpressions* handle)
+{
+	/* 'default' enter sequence for state B */
+	castExpressions_enact_main_region_B(handle);
+	handle->stateConfVector[0] = CastExpressions_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state C */
+static void castExpressions_enseq_main_region_C_default(CastExpressions* handle)
+{
+	/* 'default' enter sequence for state C */
+	castExpressions_enact_main_region_C(handle);
+	handle->stateConfVector[0] = CastExpressions_main_region_C;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void castExpressions_enseq_main_region_default(CastExpressions* handle)
+{
+	/* 'default' enter sequence for region main region */
+	castExpressions_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void castExpressions_exseq_main_region_A(CastExpressions* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = CastExpressions_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void castExpressions_exseq_main_region_B(CastExpressions* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = CastExpressions_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state C */
+static void castExpressions_exseq_main_region_C(CastExpressions* handle)
+{
+	/* Default exit sequence for state C */
+	handle->stateConfVector[0] = CastExpressions_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void castExpressions_exseq_main_region(CastExpressions* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of CastExpressions.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case CastExpressions_main_region_A :
+		{
+			castExpressions_exseq_main_region_A(handle);
+			break;
+		}
+		case CastExpressions_main_region_B :
+		{
+			castExpressions_exseq_main_region_B(handle);
+			break;
+		}
+		case CastExpressions_main_region_C :
+		{
+			castExpressions_exseq_main_region_C(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void castExpressions_react_main_region_A(CastExpressions* handle)
+{
+	/* The reactions of state A. */
+	castExpressions_effect_main_region_A_tr0(handle);
+}
+
+/* The reactions of state B. */
+static void castExpressions_react_main_region_B(CastExpressions* handle)
+{
+	/* The reactions of state B. */
+	if (castExpressions_check_main_region_B_tr0_tr0(handle) == bool_true)
+	{ 
+		castExpressions_effect_main_region_B_tr0(handle);
+	} 
+}
+
+/* The reactions of state C. */
+static void castExpressions_react_main_region_C(CastExpressions* handle)
+{
+	/* The reactions of state C. */
+}
+
+/* Default react sequence for initial entry  */
+static void castExpressions_react_main_region__entry_Default(CastExpressions* handle)
+{
+	/* Default react sequence for initial entry  */
+	castExpressions_enseq_main_region_A_default(handle);
+}
+
+

+ 87 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/CastExpressions.h

@@ -0,0 +1,87 @@
+
+#ifndef CASTEXPRESSIONS_H_
+#define CASTEXPRESSIONS_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'CastExpressions'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	CastExpressions_main_region_A,
+	CastExpressions_main_region_B,
+	CastExpressions_main_region_C,
+	CastExpressions_last_state
+} CastExpressionsStates;
+
+/*! Type definition of the data structure for the CastExpressionsIface interface scope. */
+typedef struct
+{
+	sc_real realValue;
+	sc_integer intValue;
+} CastExpressionsIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define CASTEXPRESSIONS_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the CastExpressions state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	CastExpressionsStates stateConfVector[CASTEXPRESSIONS_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	CastExpressionsIface iface;
+} CastExpressions;
+
+/*! Initializes the CastExpressions state machine data structures. Must be called before first usage.*/
+extern void castExpressions_init(CastExpressions* handle);
+
+/*! Activates the state machine */
+extern void castExpressions_enter(CastExpressions* handle);
+
+/*! Deactivates the state machine */
+extern void castExpressions_exit(CastExpressions* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void castExpressions_runCycle(CastExpressions* handle);
+
+
+/*! Gets the value of the variable 'realValue' that is defined in the default interface scope. */ 
+extern sc_real castExpressionsIface_get_realValue(const CastExpressions* handle);
+/*! Sets the value of the variable 'realValue' that is defined in the default interface scope. */ 
+extern void castExpressionsIface_set_realValue(CastExpressions* handle, sc_real value);
+/*! Gets the value of the variable 'intValue' that is defined in the default interface scope. */ 
+extern sc_integer castExpressionsIface_get_intValue(const CastExpressions* handle);
+/*! Sets the value of the variable 'intValue' that is defined in the default interface scope. */ 
+extern void castExpressionsIface_set_intValue(CastExpressions* handle, sc_integer value);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean castExpressions_isActive(const CastExpressions* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean castExpressions_isFinal(const CastExpressions* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean castExpressions_isStateActive(const CastExpressions* handle, CastExpressionsStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* CASTEXPRESSIONS_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/CastExpressions.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart CastExpressions {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/CastExpressionsTest"
+			targetProject = "gtests"
+			targetFolder = "CastExpressionsTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 541 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/Choice.c

@@ -0,0 +1,541 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "Choice.h"
+/*! \file Implementation of the state machine 'Choice'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean choice_check_main_region_A_tr0_tr0(const Choice* handle);
+static sc_boolean choice_check_main_region_A_tr1_tr1(const Choice* handle);
+static sc_boolean choice_check_main_region_A_tr2_tr2(const Choice* handle);
+static sc_boolean choice_check_main_region_A_tr3_tr3(const Choice* handle);
+static sc_boolean choice_check_main_region_B_tr0_tr0(const Choice* handle);
+static sc_boolean choice_check_main_region_C_tr0_tr0(const Choice* handle);
+static sc_boolean choice_check_main_region__choice_0_tr1_tr1(const Choice* handle);
+static sc_boolean choice_check_main_region__choice_0_tr0_tr0(const Choice* handle);
+static sc_boolean choice_check_main_region__choice_1_tr0_tr0(const Choice* handle);
+static sc_boolean choice_check_main_region__choice_1_tr1_tr1(const Choice* handle);
+static sc_boolean choice_check_main_region__choice_2_tr1_tr1(const Choice* handle);
+static sc_boolean choice_check_main_region__choice_2_tr0(const Choice* handle);
+static sc_boolean choice_check_main_region__choice_3_tr1_tr1(const Choice* handle);
+static sc_boolean choice_check_main_region__choice_3_tr0_tr0(const Choice* handle);
+static void choice_effect_main_region_A_tr0(Choice* handle);
+static void choice_effect_main_region_A_tr1(Choice* handle);
+static void choice_effect_main_region_A_tr2(Choice* handle);
+static void choice_effect_main_region_A_tr3(Choice* handle);
+static void choice_effect_main_region_B_tr0(Choice* handle);
+static void choice_effect_main_region_C_tr0(Choice* handle);
+static void choice_effect_main_region__choice_0_tr1(Choice* handle);
+static void choice_effect_main_region__choice_0_tr0(Choice* handle);
+static void choice_effect_main_region__choice_1_tr0(Choice* handle);
+static void choice_effect_main_region__choice_1_tr1(Choice* handle);
+static void choice_effect_main_region__choice_2_tr1(Choice* handle);
+static void choice_effect_main_region__choice_2_tr0(Choice* handle);
+static void choice_effect_main_region__choice_3_tr1(Choice* handle);
+static void choice_effect_main_region__choice_3_tr0(Choice* handle);
+static void choice_enseq_main_region_A_default(Choice* handle);
+static void choice_enseq_main_region_B_default(Choice* handle);
+static void choice_enseq_main_region_C_default(Choice* handle);
+static void choice_enseq_main_region_default(Choice* handle);
+static void choice_exseq_main_region_A(Choice* handle);
+static void choice_exseq_main_region_B(Choice* handle);
+static void choice_exseq_main_region_C(Choice* handle);
+static void choice_exseq_main_region(Choice* handle);
+static void choice_react_main_region_A(Choice* handle);
+static void choice_react_main_region_B(Choice* handle);
+static void choice_react_main_region_C(Choice* handle);
+static void choice_react_main_region__choice_0(Choice* handle);
+static void choice_react_main_region__choice_1(Choice* handle);
+static void choice_react_main_region__choice_2(Choice* handle);
+static void choice_react_main_region__choice_3(Choice* handle);
+static void choice_react_main_region__entry_Default(Choice* handle);
+static void choice_clearInEvents(Choice* handle);
+static void choice_clearOutEvents(Choice* handle);
+
+
+void choice_init(Choice* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < CHOICE_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = Choice_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	choice_clearInEvents(handle);
+	choice_clearOutEvents(handle);
+
+	/* Default init sequence for statechart Choice */
+	handle->iface.c = bool_false;
+
+}
+
+void choice_enter(Choice* handle)
+{
+	/* Default enter sequence for statechart Choice */
+	choice_enseq_main_region_default(handle);
+}
+
+void choice_exit(Choice* handle)
+{
+	/* Default exit sequence for statechart Choice */
+	choice_exseq_main_region(handle);
+}
+
+sc_boolean choice_isActive(const Choice* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != Choice_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean choice_isFinal(const Choice* handle)
+{
+   return bool_false;
+}
+
+static void choice_clearInEvents(Choice* handle)
+{
+	handle->iface.e_raised = bool_false;
+	handle->iface.f_raised = bool_false;
+	handle->iface.g_raised = bool_false;
+	handle->iface.h_raised = bool_false;
+}
+
+static void choice_clearOutEvents(Choice* handle)
+{
+}
+
+void choice_runCycle(Choice* handle)
+{
+	
+	choice_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < CHOICE_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case Choice_main_region_A :
+		{
+			choice_react_main_region_A(handle);
+			break;
+		}
+		case Choice_main_region_B :
+		{
+			choice_react_main_region_B(handle);
+			break;
+		}
+		case Choice_main_region_C :
+		{
+			choice_react_main_region_C(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	choice_clearInEvents(handle);
+}
+
+
+sc_boolean choice_isStateActive(const Choice* handle, ChoiceStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case Choice_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == Choice_main_region_A
+			);
+			break;
+		case Choice_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == Choice_main_region_B
+			);
+			break;
+		case Choice_main_region_C :
+			result = (sc_boolean) (handle->stateConfVector[0] == Choice_main_region_C
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void choiceIface_raise_e(Choice* handle)
+{
+	handle->iface.e_raised = bool_true;
+}
+void choiceIface_raise_f(Choice* handle)
+{
+	handle->iface.f_raised = bool_true;
+}
+void choiceIface_raise_g(Choice* handle)
+{
+	handle->iface.g_raised = bool_true;
+}
+void choiceIface_raise_h(Choice* handle)
+{
+	handle->iface.h_raised = bool_true;
+}
+
+
+sc_boolean choiceIface_get_c(const Choice* handle)
+{
+	return handle->iface.c;
+}
+void choiceIface_set_c(Choice* handle, sc_boolean value)
+{
+	handle->iface.c = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean choice_check_main_region_A_tr0_tr0(const Choice* handle)
+{
+	return handle->iface.e_raised;
+}
+
+static sc_boolean choice_check_main_region_A_tr1_tr1(const Choice* handle)
+{
+	return handle->iface.f_raised;
+}
+
+static sc_boolean choice_check_main_region_A_tr2_tr2(const Choice* handle)
+{
+	return handle->iface.g_raised;
+}
+
+static sc_boolean choice_check_main_region_A_tr3_tr3(const Choice* handle)
+{
+	return handle->iface.h_raised;
+}
+
+static sc_boolean choice_check_main_region_B_tr0_tr0(const Choice* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean choice_check_main_region_C_tr0_tr0(const Choice* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean choice_check_main_region__choice_0_tr1_tr1(const Choice* handle)
+{
+	return handle->iface.c;
+}
+
+static sc_boolean choice_check_main_region__choice_0_tr0_tr0(const Choice* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean choice_check_main_region__choice_1_tr0_tr0(const Choice* handle)
+{
+	return handle->iface.c;
+}
+
+static sc_boolean choice_check_main_region__choice_1_tr1_tr1(const Choice* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean choice_check_main_region__choice_2_tr1_tr1(const Choice* handle)
+{
+	return handle->iface.c;
+}
+
+static sc_boolean choice_check_main_region__choice_2_tr0(const Choice* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean choice_check_main_region__choice_3_tr1_tr1(const Choice* handle)
+{
+	return handle->iface.c;
+}
+
+static sc_boolean choice_check_main_region__choice_3_tr0_tr0(const Choice* handle)
+{
+	return bool_true;
+}
+
+static void choice_effect_main_region_A_tr0(Choice* handle)
+{
+	choice_exseq_main_region_A(handle);
+	choice_react_main_region__choice_0(handle);
+}
+
+static void choice_effect_main_region_A_tr1(Choice* handle)
+{
+	choice_exseq_main_region_A(handle);
+	choice_react_main_region__choice_2(handle);
+}
+
+static void choice_effect_main_region_A_tr2(Choice* handle)
+{
+	choice_exseq_main_region_A(handle);
+	choice_react_main_region__choice_1(handle);
+}
+
+static void choice_effect_main_region_A_tr3(Choice* handle)
+{
+	choice_exseq_main_region_A(handle);
+	choice_react_main_region__choice_3(handle);
+}
+
+static void choice_effect_main_region_B_tr0(Choice* handle)
+{
+	choice_exseq_main_region_B(handle);
+	choice_enseq_main_region_A_default(handle);
+}
+
+static void choice_effect_main_region_C_tr0(Choice* handle)
+{
+	choice_exseq_main_region_C(handle);
+	choice_enseq_main_region_A_default(handle);
+}
+
+static void choice_effect_main_region__choice_0_tr1(Choice* handle)
+{
+	choice_enseq_main_region_C_default(handle);
+}
+
+static void choice_effect_main_region__choice_0_tr0(Choice* handle)
+{
+	choice_enseq_main_region_B_default(handle);
+}
+
+static void choice_effect_main_region__choice_1_tr0(Choice* handle)
+{
+	choice_enseq_main_region_C_default(handle);
+}
+
+static void choice_effect_main_region__choice_1_tr1(Choice* handle)
+{
+	choice_enseq_main_region_B_default(handle);
+}
+
+static void choice_effect_main_region__choice_2_tr1(Choice* handle)
+{
+	choice_enseq_main_region_C_default(handle);
+}
+
+static void choice_effect_main_region__choice_2_tr0(Choice* handle)
+{
+	choice_enseq_main_region_B_default(handle);
+}
+
+static void choice_effect_main_region__choice_3_tr1(Choice* handle)
+{
+	choice_enseq_main_region_C_default(handle);
+}
+
+static void choice_effect_main_region__choice_3_tr0(Choice* handle)
+{
+	choice_enseq_main_region_B_default(handle);
+}
+
+/* 'default' enter sequence for state A */
+static void choice_enseq_main_region_A_default(Choice* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = Choice_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void choice_enseq_main_region_B_default(Choice* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = Choice_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state C */
+static void choice_enseq_main_region_C_default(Choice* handle)
+{
+	/* 'default' enter sequence for state C */
+	handle->stateConfVector[0] = Choice_main_region_C;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void choice_enseq_main_region_default(Choice* handle)
+{
+	/* 'default' enter sequence for region main region */
+	choice_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void choice_exseq_main_region_A(Choice* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = Choice_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void choice_exseq_main_region_B(Choice* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = Choice_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state C */
+static void choice_exseq_main_region_C(Choice* handle)
+{
+	/* Default exit sequence for state C */
+	handle->stateConfVector[0] = Choice_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void choice_exseq_main_region(Choice* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of Choice.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case Choice_main_region_A :
+		{
+			choice_exseq_main_region_A(handle);
+			break;
+		}
+		case Choice_main_region_B :
+		{
+			choice_exseq_main_region_B(handle);
+			break;
+		}
+		case Choice_main_region_C :
+		{
+			choice_exseq_main_region_C(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void choice_react_main_region_A(Choice* handle)
+{
+	/* The reactions of state A. */
+	if (choice_check_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		choice_effect_main_region_A_tr0(handle);
+	}  else
+	{
+		if (choice_check_main_region_A_tr1_tr1(handle) == bool_true)
+		{ 
+			choice_effect_main_region_A_tr1(handle);
+		}  else
+		{
+			if (choice_check_main_region_A_tr2_tr2(handle) == bool_true)
+			{ 
+				choice_effect_main_region_A_tr2(handle);
+			}  else
+			{
+				if (choice_check_main_region_A_tr3_tr3(handle) == bool_true)
+				{ 
+					choice_effect_main_region_A_tr3(handle);
+				} 
+			}
+		}
+	}
+}
+
+/* The reactions of state B. */
+static void choice_react_main_region_B(Choice* handle)
+{
+	/* The reactions of state B. */
+	choice_effect_main_region_B_tr0(handle);
+}
+
+/* The reactions of state C. */
+static void choice_react_main_region_C(Choice* handle)
+{
+	/* The reactions of state C. */
+	choice_effect_main_region_C_tr0(handle);
+}
+
+/* The reactions of state null. */
+static void choice_react_main_region__choice_0(Choice* handle)
+{
+	/* The reactions of state null. */
+	if (choice_check_main_region__choice_0_tr1_tr1(handle) == bool_true)
+	{ 
+		choice_effect_main_region__choice_0_tr1(handle);
+	}  else
+	{
+		choice_effect_main_region__choice_0_tr0(handle);
+	}
+}
+
+/* The reactions of state null. */
+static void choice_react_main_region__choice_1(Choice* handle)
+{
+	/* The reactions of state null. */
+	if (choice_check_main_region__choice_1_tr0_tr0(handle) == bool_true)
+	{ 
+		choice_effect_main_region__choice_1_tr0(handle);
+	}  else
+	{
+		choice_effect_main_region__choice_1_tr1(handle);
+	}
+}
+
+/* The reactions of state null. */
+static void choice_react_main_region__choice_2(Choice* handle)
+{
+	/* The reactions of state null. */
+	if (choice_check_main_region__choice_2_tr1_tr1(handle) == bool_true)
+	{ 
+		choice_effect_main_region__choice_2_tr1(handle);
+	}  else
+	{
+		choice_effect_main_region__choice_2_tr0(handle);
+	}
+}
+
+/* The reactions of state null. */
+static void choice_react_main_region__choice_3(Choice* handle)
+{
+	/* The reactions of state null. */
+	if (choice_check_main_region__choice_3_tr1_tr1(handle) == bool_true)
+	{ 
+		choice_effect_main_region__choice_3_tr1(handle);
+	}  else
+	{
+		choice_effect_main_region__choice_3_tr0(handle);
+	}
+}
+
+/* Default react sequence for initial entry  */
+static void choice_react_main_region__entry_Default(Choice* handle)
+{
+	/* Default react sequence for initial entry  */
+	choice_enseq_main_region_A_default(handle);
+}
+
+

+ 98 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/Choice.h

@@ -0,0 +1,98 @@
+
+#ifndef CHOICE_H_
+#define CHOICE_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'Choice'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	Choice_main_region_A,
+	Choice_main_region_B,
+	Choice_main_region_C,
+	Choice_last_state
+} ChoiceStates;
+
+/*! Type definition of the data structure for the ChoiceIface interface scope. */
+typedef struct
+{
+	sc_boolean e_raised;
+	sc_boolean f_raised;
+	sc_boolean g_raised;
+	sc_boolean h_raised;
+	sc_boolean c;
+} ChoiceIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define CHOICE_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the Choice state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	ChoiceStates stateConfVector[CHOICE_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	ChoiceIface iface;
+} Choice;
+
+/*! Initializes the Choice state machine data structures. Must be called before first usage.*/
+extern void choice_init(Choice* handle);
+
+/*! Activates the state machine */
+extern void choice_enter(Choice* handle);
+
+/*! Deactivates the state machine */
+extern void choice_exit(Choice* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void choice_runCycle(Choice* handle);
+
+
+/*! Raises the in event 'e' that is defined in the default interface scope. */ 
+extern void choiceIface_raise_e(Choice* handle);
+
+/*! Raises the in event 'f' that is defined in the default interface scope. */ 
+extern void choiceIface_raise_f(Choice* handle);
+
+/*! Raises the in event 'g' that is defined in the default interface scope. */ 
+extern void choiceIface_raise_g(Choice* handle);
+
+/*! Raises the in event 'h' that is defined in the default interface scope. */ 
+extern void choiceIface_raise_h(Choice* handle);
+
+/*! Gets the value of the variable 'c' that is defined in the default interface scope. */ 
+extern sc_boolean choiceIface_get_c(const Choice* handle);
+/*! Sets the value of the variable 'c' that is defined in the default interface scope. */ 
+extern void choiceIface_set_c(Choice* handle, sc_boolean value);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean choice_isActive(const Choice* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean choice_isFinal(const Choice* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean choice_isStateActive(const Choice* handle, ChoiceStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* CHOICE_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/Choice.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart Choice {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/ChoiceTest"
+			targetProject = "gtests"
+			targetFolder = "ChoiceTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 7 - 7
test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/ChoiceTest.cc

@@ -19,7 +19,7 @@ TEST(StatemachineTest, elseChoiceUsingNonDefaultTransition) {
 	
 	choice_enter(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_A));
-	choiceIface_set_c(true);
+	choiceIface_set_c(&handle,true);
 	choiceIface_raise_e(&handle);
 	choice_runCycle(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_C));
@@ -29,7 +29,7 @@ TEST(StatemachineTest, elseChoiceUsingDefaultTransition) {
 	
 	choice_enter(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_A));
-	choiceIface_set_c(false);
+	choiceIface_set_c(&handle,false);
 	choiceIface_raise_e(&handle);
 	choice_runCycle(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_B));
@@ -39,7 +39,7 @@ TEST(StatemachineTest, defaultChoiceUsingNonDefaultTransition) {
 	
 	choice_enter(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_A));
-	choiceIface_set_c(true);
+	choiceIface_set_c(&handle,true);
 	choiceIface_raise_g(&handle);
 	choice_runCycle(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_C));
@@ -49,7 +49,7 @@ TEST(StatemachineTest, defaultChoiceUsingDefaultTransition) {
 	
 	choice_enter(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_A));
-	choiceIface_set_c(false);
+	choiceIface_set_c(&handle,false);
 	choiceIface_raise_g(&handle);
 	choice_runCycle(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_B));
@@ -59,7 +59,7 @@ TEST(StatemachineTest, uncheckedChoiceUsingNonDefaultTransition) {
 	
 	choice_enter(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_A));
-	choiceIface_set_c(true);
+	choiceIface_set_c(&handle,true);
 	choiceIface_raise_f(&handle);
 	choice_runCycle(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_C));
@@ -69,7 +69,7 @@ TEST(StatemachineTest, uncheckedChoiceUsingDefaultTransition) {
 	
 	choice_enter(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_A));
-	choiceIface_set_c(false);
+	choiceIface_set_c(&handle,false);
 	choiceIface_raise_f(&handle);
 	choice_runCycle(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_B));
@@ -79,7 +79,7 @@ TEST(StatemachineTest, alwaysTrueTransitionInChoice) {
 	
 	choice_enter(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_A));
-	choiceIface_set_c(true);
+	choiceIface_set_c(&handle,true);
 	choiceIface_raise_h(&handle);
 	choice_runCycle(&handle);
 	EXPECT_TRUE(choice_isStateActive(&handle, Choice_main_region_C));

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 5 - 3
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/ConditionalExpression.cc

@@ -1,5 +1,5 @@
 /**
-* Copyright (c) 2016 committers of YAKINDU and others.
+* Copyright (c) 2017 committers of YAKINDU and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
@@ -16,12 +16,14 @@ ConditionalExpressions handle;
 
 TEST(StatemachineTest, ConditionalExpressionTest) {
 	conditionalExpressions_init(&handle);
+	
 	conditionalExpressions_enter(&handle);
 	EXPECT_TRUE(conditionalExpressions_isStateActive(&handle, ConditionalExpressions_main_region_A));
-	EXPECT_TRUE(conditionalExpressionsIface_get_condition(&handle) == 1l);
+	EXPECT_TRUE(conditionalExpressionsIface_get_condition(&handle)== 1l);
 	conditionalExpressionsIface_raise_e(&handle);
 	conditionalExpressions_runCycle(&handle);
 	EXPECT_TRUE(conditionalExpressions_isStateActive(&handle, ConditionalExpressions_main_region_B));
-	EXPECT_TRUE(conditionalExpressionsIface_get_condition(&handle) == 2l);
+	EXPECT_TRUE(conditionalExpressionsIface_get_condition(&handle)== 2l);
 }
 
+

+ 277 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/ConditionalExpressions.c

@@ -0,0 +1,277 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "ConditionalExpressions.h"
+/*! \file Implementation of the state machine 'ConditionalExpressions'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean conditionalExpressions_check_main_region_A_tr0_tr0(const ConditionalExpressions* handle);
+static void conditionalExpressions_effect_main_region_A_tr0(ConditionalExpressions* handle);
+static void conditionalExpressions_enact_main_region_A(ConditionalExpressions* handle);
+static void conditionalExpressions_enact_main_region_B(ConditionalExpressions* handle);
+static void conditionalExpressions_enseq_main_region_A_default(ConditionalExpressions* handle);
+static void conditionalExpressions_enseq_main_region_B_default(ConditionalExpressions* handle);
+static void conditionalExpressions_enseq_main_region_default(ConditionalExpressions* handle);
+static void conditionalExpressions_exseq_main_region_A(ConditionalExpressions* handle);
+static void conditionalExpressions_exseq_main_region_B(ConditionalExpressions* handle);
+static void conditionalExpressions_exseq_main_region(ConditionalExpressions* handle);
+static void conditionalExpressions_react_main_region_A(ConditionalExpressions* handle);
+static void conditionalExpressions_react_main_region_B(ConditionalExpressions* handle);
+static void conditionalExpressions_react_main_region__entry_Default(ConditionalExpressions* handle);
+static void conditionalExpressions_clearInEvents(ConditionalExpressions* handle);
+static void conditionalExpressions_clearOutEvents(ConditionalExpressions* handle);
+
+
+void conditionalExpressions_init(ConditionalExpressions* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < CONDITIONALEXPRESSIONS_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = ConditionalExpressions_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	conditionalExpressions_clearInEvents(handle);
+	conditionalExpressions_clearOutEvents(handle);
+
+	/* Default init sequence for statechart ConditionalExpressions */
+	handle->iface.condition = handle->iface.boolVar ? 3 : 2;
+	handle->iface.boolVar = bool_true;
+
+}
+
+void conditionalExpressions_enter(ConditionalExpressions* handle)
+{
+	/* Default enter sequence for statechart ConditionalExpressions */
+	conditionalExpressions_enseq_main_region_default(handle);
+}
+
+void conditionalExpressions_exit(ConditionalExpressions* handle)
+{
+	/* Default exit sequence for statechart ConditionalExpressions */
+	conditionalExpressions_exseq_main_region(handle);
+}
+
+sc_boolean conditionalExpressions_isActive(const ConditionalExpressions* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != ConditionalExpressions_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean conditionalExpressions_isFinal(const ConditionalExpressions* handle)
+{
+   return bool_false;
+}
+
+static void conditionalExpressions_clearInEvents(ConditionalExpressions* handle)
+{
+	handle->iface.e_raised = bool_false;
+}
+
+static void conditionalExpressions_clearOutEvents(ConditionalExpressions* handle)
+{
+}
+
+void conditionalExpressions_runCycle(ConditionalExpressions* handle)
+{
+	
+	conditionalExpressions_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < CONDITIONALEXPRESSIONS_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case ConditionalExpressions_main_region_A :
+		{
+			conditionalExpressions_react_main_region_A(handle);
+			break;
+		}
+		case ConditionalExpressions_main_region_B :
+		{
+			conditionalExpressions_react_main_region_B(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	conditionalExpressions_clearInEvents(handle);
+}
+
+
+sc_boolean conditionalExpressions_isStateActive(const ConditionalExpressions* handle, ConditionalExpressionsStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case ConditionalExpressions_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConditionalExpressions_main_region_A
+			);
+			break;
+		case ConditionalExpressions_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConditionalExpressions_main_region_B
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void conditionalExpressionsIface_raise_e(ConditionalExpressions* handle)
+{
+	handle->iface.e_raised = bool_true;
+}
+
+
+sc_integer conditionalExpressionsIface_get_condition(const ConditionalExpressions* handle)
+{
+	return handle->iface.condition;
+}
+void conditionalExpressionsIface_set_condition(ConditionalExpressions* handle, sc_integer value)
+{
+	handle->iface.condition = value;
+}
+sc_boolean conditionalExpressionsIface_get_boolVar(const ConditionalExpressions* handle)
+{
+	return handle->iface.boolVar;
+}
+void conditionalExpressionsIface_set_boolVar(ConditionalExpressions* handle, sc_boolean value)
+{
+	handle->iface.boolVar = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean conditionalExpressions_check_main_region_A_tr0_tr0(const ConditionalExpressions* handle)
+{
+	return ((handle->iface.e_raised) && (1 == (handle->iface.boolVar ? 1 : 0))) ? bool_true : bool_false;
+}
+
+static void conditionalExpressions_effect_main_region_A_tr0(ConditionalExpressions* handle)
+{
+	conditionalExpressions_exseq_main_region_A(handle);
+	conditionalExpressions_enseq_main_region_B_default(handle);
+}
+
+/* Entry action for state 'A'. */
+static void conditionalExpressions_enact_main_region_A(ConditionalExpressions* handle)
+{
+	/* Entry action for state 'A'. */
+	handle->iface.condition = handle->iface.boolVar ? 1 : 0;
+}
+
+/* Entry action for state 'B'. */
+static void conditionalExpressions_enact_main_region_B(ConditionalExpressions* handle)
+{
+	/* Entry action for state 'B'. */
+	handle->iface.condition = ((handle->iface.condition == 2) ? 1 : 2);
+}
+
+/* 'default' enter sequence for state A */
+static void conditionalExpressions_enseq_main_region_A_default(ConditionalExpressions* handle)
+{
+	/* 'default' enter sequence for state A */
+	conditionalExpressions_enact_main_region_A(handle);
+	handle->stateConfVector[0] = ConditionalExpressions_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void conditionalExpressions_enseq_main_region_B_default(ConditionalExpressions* handle)
+{
+	/* 'default' enter sequence for state B */
+	conditionalExpressions_enact_main_region_B(handle);
+	handle->stateConfVector[0] = ConditionalExpressions_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void conditionalExpressions_enseq_main_region_default(ConditionalExpressions* handle)
+{
+	/* 'default' enter sequence for region main region */
+	conditionalExpressions_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void conditionalExpressions_exseq_main_region_A(ConditionalExpressions* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = ConditionalExpressions_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void conditionalExpressions_exseq_main_region_B(ConditionalExpressions* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = ConditionalExpressions_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void conditionalExpressions_exseq_main_region(ConditionalExpressions* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of ConditionalExpressions.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case ConditionalExpressions_main_region_A :
+		{
+			conditionalExpressions_exseq_main_region_A(handle);
+			break;
+		}
+		case ConditionalExpressions_main_region_B :
+		{
+			conditionalExpressions_exseq_main_region_B(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void conditionalExpressions_react_main_region_A(ConditionalExpressions* handle)
+{
+	/* The reactions of state A. */
+	if (conditionalExpressions_check_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		conditionalExpressions_effect_main_region_A_tr0(handle);
+	} 
+}
+
+/* The reactions of state B. */
+static void conditionalExpressions_react_main_region_B(ConditionalExpressions* handle)
+{
+	/* The reactions of state B. */
+}
+
+/* Default react sequence for initial entry  */
+static void conditionalExpressions_react_main_region__entry_Default(ConditionalExpressions* handle)
+{
+	/* Default react sequence for initial entry  */
+	conditionalExpressions_enseq_main_region_A_default(handle);
+}
+
+

+ 90 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/ConditionalExpressions.h

@@ -0,0 +1,90 @@
+
+#ifndef CONDITIONALEXPRESSIONS_H_
+#define CONDITIONALEXPRESSIONS_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'ConditionalExpressions'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	ConditionalExpressions_main_region_A,
+	ConditionalExpressions_main_region_B,
+	ConditionalExpressions_last_state
+} ConditionalExpressionsStates;
+
+/*! Type definition of the data structure for the ConditionalExpressionsIface interface scope. */
+typedef struct
+{
+	sc_boolean e_raised;
+	sc_integer condition;
+	sc_boolean boolVar;
+} ConditionalExpressionsIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define CONDITIONALEXPRESSIONS_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the ConditionalExpressions state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	ConditionalExpressionsStates stateConfVector[CONDITIONALEXPRESSIONS_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	ConditionalExpressionsIface iface;
+} ConditionalExpressions;
+
+/*! Initializes the ConditionalExpressions state machine data structures. Must be called before first usage.*/
+extern void conditionalExpressions_init(ConditionalExpressions* handle);
+
+/*! Activates the state machine */
+extern void conditionalExpressions_enter(ConditionalExpressions* handle);
+
+/*! Deactivates the state machine */
+extern void conditionalExpressions_exit(ConditionalExpressions* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void conditionalExpressions_runCycle(ConditionalExpressions* handle);
+
+
+/*! Raises the in event 'e' that is defined in the default interface scope. */ 
+extern void conditionalExpressionsIface_raise_e(ConditionalExpressions* handle);
+
+/*! Gets the value of the variable 'condition' that is defined in the default interface scope. */ 
+extern sc_integer conditionalExpressionsIface_get_condition(const ConditionalExpressions* handle);
+/*! Sets the value of the variable 'condition' that is defined in the default interface scope. */ 
+extern void conditionalExpressionsIface_set_condition(ConditionalExpressions* handle, sc_integer value);
+/*! Gets the value of the variable 'boolVar' that is defined in the default interface scope. */ 
+extern sc_boolean conditionalExpressionsIface_get_boolVar(const ConditionalExpressions* handle);
+/*! Sets the value of the variable 'boolVar' that is defined in the default interface scope. */ 
+extern void conditionalExpressionsIface_set_boolVar(ConditionalExpressions* handle, sc_boolean value);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean conditionalExpressions_isActive(const ConditionalExpressions* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean conditionalExpressions_isFinal(const ConditionalExpressions* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean conditionalExpressions_isStateActive(const ConditionalExpressions* handle, ConditionalExpressionsStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* CONDITIONALEXPRESSIONS_H_ */

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 311 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScope.c

@@ -0,0 +1,311 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "ConstOnlyDefaultScope.h"
+/*! \file Implementation of the state machine 'ConstOnlyDefaultScope'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean constOnlyDefaultScope_check_ConstOnlyDefaultScope_main_region_A_tr0_tr0(const ConstOnlyDefaultScope* handle);
+static sc_boolean constOnlyDefaultScope_check_ConstOnlyDefaultScope_main_region_A_tr1_tr1(const ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_effect_ConstOnlyDefaultScope_main_region_A_tr0(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_effect_ConstOnlyDefaultScope_main_region_A_tr1(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_A_default(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_B_default(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_C_default(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_default(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_A(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_B(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_C(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region_A(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region_B(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region_C(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region__entry_Default(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_clearInEvents(ConstOnlyDefaultScope* handle);
+static void constOnlyDefaultScope_clearOutEvents(ConstOnlyDefaultScope* handle);
+
+const sc_integer CONSTONLYDEFAULTSCOPE_CONSTONLYDEFAULTSCOPEIFACE_B = 1;
+const sc_integer CONSTONLYDEFAULTSCOPE_CONSTONLYDEFAULTSCOPEIFACE_C = 2;
+
+void constOnlyDefaultScope_init(ConstOnlyDefaultScope* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < CONSTONLYDEFAULTSCOPE_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = ConstOnlyDefaultScope_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	constOnlyDefaultScope_clearInEvents(handle);
+	constOnlyDefaultScope_clearOutEvents(handle);
+
+
+}
+
+void constOnlyDefaultScope_enter(ConstOnlyDefaultScope* handle)
+{
+	/* Default enter sequence for statechart ConstOnlyDefaultScope */
+	constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_default(handle);
+}
+
+void constOnlyDefaultScope_exit(ConstOnlyDefaultScope* handle)
+{
+	/* Default exit sequence for statechart ConstOnlyDefaultScope */
+	constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region(handle);
+}
+
+sc_boolean constOnlyDefaultScope_isActive(const ConstOnlyDefaultScope* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != ConstOnlyDefaultScope_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean constOnlyDefaultScope_isFinal(const ConstOnlyDefaultScope* handle)
+{
+   return bool_false;
+}
+
+static void constOnlyDefaultScope_clearInEvents(ConstOnlyDefaultScope* handle)
+{
+	handle->ifaceA.e_raised = bool_false;
+}
+
+static void constOnlyDefaultScope_clearOutEvents(ConstOnlyDefaultScope* handle)
+{
+}
+
+void constOnlyDefaultScope_runCycle(ConstOnlyDefaultScope* handle)
+{
+	
+	constOnlyDefaultScope_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < CONSTONLYDEFAULTSCOPE_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_A :
+		{
+			constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region_A(handle);
+			break;
+		}
+		case ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_B :
+		{
+			constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region_B(handle);
+			break;
+		}
+		case ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_C :
+		{
+			constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region_C(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	constOnlyDefaultScope_clearInEvents(handle);
+}
+
+
+sc_boolean constOnlyDefaultScope_isStateActive(const ConstOnlyDefaultScope* handle, ConstOnlyDefaultScopeStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_A
+			);
+			break;
+		case ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_B
+			);
+			break;
+		case ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_C :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_C
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+
+
+const sc_integer constOnlyDefaultScopeIface_get_b(const ConstOnlyDefaultScope* handle)
+{
+	return CONSTONLYDEFAULTSCOPE_CONSTONLYDEFAULTSCOPEIFACE_B;
+}
+const sc_integer constOnlyDefaultScopeIface_get_c(const ConstOnlyDefaultScope* handle)
+{
+	return CONSTONLYDEFAULTSCOPE_CONSTONLYDEFAULTSCOPEIFACE_C;
+}
+void constOnlyDefaultScopeIfaceA_raise_e(ConstOnlyDefaultScope* handle, sc_integer value)
+{
+	handle->ifaceA.e_value = value;
+	handle->ifaceA.e_raised = bool_true;
+}
+
+
+
+/* implementations of all internal functions */
+
+static sc_boolean constOnlyDefaultScope_check_ConstOnlyDefaultScope_main_region_A_tr0_tr0(const ConstOnlyDefaultScope* handle)
+{
+	return ((handle->ifaceA.e_raised) && (handle->ifaceA.e_value == CONSTONLYDEFAULTSCOPE_CONSTONLYDEFAULTSCOPEIFACE_B)) ? bool_true : bool_false;
+}
+
+static sc_boolean constOnlyDefaultScope_check_ConstOnlyDefaultScope_main_region_A_tr1_tr1(const ConstOnlyDefaultScope* handle)
+{
+	return ((handle->ifaceA.e_raised) && (handle->ifaceA.e_value == CONSTONLYDEFAULTSCOPE_CONSTONLYDEFAULTSCOPEIFACE_C)) ? bool_true : bool_false;
+}
+
+static void constOnlyDefaultScope_effect_ConstOnlyDefaultScope_main_region_A_tr0(ConstOnlyDefaultScope* handle)
+{
+	constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_A(handle);
+	constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_B_default(handle);
+}
+
+static void constOnlyDefaultScope_effect_ConstOnlyDefaultScope_main_region_A_tr1(ConstOnlyDefaultScope* handle)
+{
+	constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_A(handle);
+	constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_C_default(handle);
+}
+
+/* 'default' enter sequence for state A */
+static void constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_A_default(ConstOnlyDefaultScope* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_B_default(ConstOnlyDefaultScope* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state C */
+static void constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_C_default(ConstOnlyDefaultScope* handle)
+{
+	/* 'default' enter sequence for state C */
+	handle->stateConfVector[0] = ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_C;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_default(ConstOnlyDefaultScope* handle)
+{
+	/* 'default' enter sequence for region main region */
+	constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_A(ConstOnlyDefaultScope* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = ConstOnlyDefaultScope_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_B(ConstOnlyDefaultScope* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = ConstOnlyDefaultScope_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state C */
+static void constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_C(ConstOnlyDefaultScope* handle)
+{
+	/* Default exit sequence for state C */
+	handle->stateConfVector[0] = ConstOnlyDefaultScope_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region(ConstOnlyDefaultScope* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of declarations.ConstOnlyDefaultScope.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_A :
+		{
+			constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_A(handle);
+			break;
+		}
+		case ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_B :
+		{
+			constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_B(handle);
+			break;
+		}
+		case ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_C :
+		{
+			constOnlyDefaultScope_exseq_ConstOnlyDefaultScope_main_region_C(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region_A(ConstOnlyDefaultScope* handle)
+{
+	/* The reactions of state A. */
+	if (constOnlyDefaultScope_check_ConstOnlyDefaultScope_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		constOnlyDefaultScope_effect_ConstOnlyDefaultScope_main_region_A_tr0(handle);
+	}  else
+	{
+		if (constOnlyDefaultScope_check_ConstOnlyDefaultScope_main_region_A_tr1_tr1(handle) == bool_true)
+		{ 
+			constOnlyDefaultScope_effect_ConstOnlyDefaultScope_main_region_A_tr1(handle);
+		} 
+	}
+}
+
+/* The reactions of state B. */
+static void constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region_B(ConstOnlyDefaultScope* handle)
+{
+	/* The reactions of state B. */
+}
+
+/* The reactions of state C. */
+static void constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region_C(ConstOnlyDefaultScope* handle)
+{
+	/* The reactions of state C. */
+}
+
+/* Default react sequence for initial entry  */
+static void constOnlyDefaultScope_react_ConstOnlyDefaultScope_main_region__entry_Default(ConstOnlyDefaultScope* handle)
+{
+	/* Default react sequence for initial entry  */
+	constOnlyDefaultScope_enseq_ConstOnlyDefaultScope_main_region_A_default(handle);
+}
+
+

+ 90 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScope.h

@@ -0,0 +1,90 @@
+
+#ifndef CONSTONLYDEFAULTSCOPE_H_
+#define CONSTONLYDEFAULTSCOPE_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'ConstOnlyDefaultScope'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_A,
+	ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_B,
+	ConstOnlyDefaultScope_ConstOnlyDefaultScope_main_region_C,
+	ConstOnlyDefaultScope_last_state
+} ConstOnlyDefaultScopeStates;
+
+/* Declaration of constants for scope ConstOnlyDefaultScopeIface. */
+extern const sc_integer CONSTONLYDEFAULTSCOPE_CONSTONLYDEFAULTSCOPEIFACE_B;
+extern const sc_integer CONSTONLYDEFAULTSCOPE_CONSTONLYDEFAULTSCOPEIFACE_C;
+
+/*! Type definition of the data structure for the ConstOnlyDefaultScopeIfaceA interface scope. */
+typedef struct
+{
+	sc_boolean e_raised;
+	sc_integer e_value;
+} ConstOnlyDefaultScopeIfaceA;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define CONSTONLYDEFAULTSCOPE_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the ConstOnlyDefaultScope state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	ConstOnlyDefaultScopeStates stateConfVector[CONSTONLYDEFAULTSCOPE_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	ConstOnlyDefaultScopeIfaceA ifaceA;
+} ConstOnlyDefaultScope;
+
+/*! Initializes the ConstOnlyDefaultScope state machine data structures. Must be called before first usage.*/
+extern void constOnlyDefaultScope_init(ConstOnlyDefaultScope* handle);
+
+/*! Activates the state machine */
+extern void constOnlyDefaultScope_enter(ConstOnlyDefaultScope* handle);
+
+/*! Deactivates the state machine */
+extern void constOnlyDefaultScope_exit(ConstOnlyDefaultScope* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void constOnlyDefaultScope_runCycle(ConstOnlyDefaultScope* handle);
+
+
+/*! Gets the value of the variable 'B' that is defined in the default interface scope. */ 
+extern const sc_integer constOnlyDefaultScopeIface_get_b(const ConstOnlyDefaultScope* handle);
+/*! Gets the value of the variable 'C' that is defined in the default interface scope. */ 
+extern const sc_integer constOnlyDefaultScopeIface_get_c(const ConstOnlyDefaultScope* handle);
+/*! Raises the in event 'e' that is defined in the interface scope 'A'. */ 
+extern void constOnlyDefaultScopeIfaceA_raise_e(ConstOnlyDefaultScope* handle, sc_integer value);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean constOnlyDefaultScope_isActive(const ConstOnlyDefaultScope* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean constOnlyDefaultScope_isFinal(const ConstOnlyDefaultScope* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean constOnlyDefaultScope_isStateActive(const ConstOnlyDefaultScope* handle, ConstOnlyDefaultScopeStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* CONSTONLYDEFAULTSCOPE_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScope.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart declarations.ConstOnlyDefaultScope {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/ConstOnlyDefaultScopeTest"
+			targetProject = "gtests"
+			targetFolder = "ConstOnlyDefaultScopeTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 301 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScope.c

@@ -0,0 +1,301 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "ConstOnlyInternalScope.h"
+/*! \file Implementation of the state machine 'ConstOnlyInternalScope'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean constOnlyInternalScope_check_ConstOnlyInternalScope_main_region_A_tr0_tr0(const ConstOnlyInternalScope* handle);
+static sc_boolean constOnlyInternalScope_check_ConstOnlyInternalScope_main_region_A_tr1_tr1(const ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_effect_ConstOnlyInternalScope_main_region_A_tr0(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_effect_ConstOnlyInternalScope_main_region_A_tr1(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_A_default(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_B_default(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_C_default(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_default(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_A(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_B(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_C(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_react_ConstOnlyInternalScope_main_region_A(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_react_ConstOnlyInternalScope_main_region_B(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_react_ConstOnlyInternalScope_main_region_C(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_react_ConstOnlyInternalScope_main_region__entry_Default(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_clearInEvents(ConstOnlyInternalScope* handle);
+static void constOnlyInternalScope_clearOutEvents(ConstOnlyInternalScope* handle);
+
+const sc_integer CONSTONLYINTERNALSCOPE_CONSTONLYINTERNALSCOPEINTERNAL_B = 1;
+const sc_integer CONSTONLYINTERNALSCOPE_CONSTONLYINTERNALSCOPEINTERNAL_C = 2;
+
+void constOnlyInternalScope_init(ConstOnlyInternalScope* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < CONSTONLYINTERNALSCOPE_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = ConstOnlyInternalScope_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	constOnlyInternalScope_clearInEvents(handle);
+	constOnlyInternalScope_clearOutEvents(handle);
+
+
+}
+
+void constOnlyInternalScope_enter(ConstOnlyInternalScope* handle)
+{
+	/* Default enter sequence for statechart ConstOnlyInternalScope */
+	constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_default(handle);
+}
+
+void constOnlyInternalScope_exit(ConstOnlyInternalScope* handle)
+{
+	/* Default exit sequence for statechart ConstOnlyInternalScope */
+	constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region(handle);
+}
+
+sc_boolean constOnlyInternalScope_isActive(const ConstOnlyInternalScope* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != ConstOnlyInternalScope_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean constOnlyInternalScope_isFinal(const ConstOnlyInternalScope* handle)
+{
+   return bool_false;
+}
+
+static void constOnlyInternalScope_clearInEvents(ConstOnlyInternalScope* handle)
+{
+	handle->iface.e_raised = bool_false;
+}
+
+static void constOnlyInternalScope_clearOutEvents(ConstOnlyInternalScope* handle)
+{
+}
+
+void constOnlyInternalScope_runCycle(ConstOnlyInternalScope* handle)
+{
+	
+	constOnlyInternalScope_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < CONSTONLYINTERNALSCOPE_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_A :
+		{
+			constOnlyInternalScope_react_ConstOnlyInternalScope_main_region_A(handle);
+			break;
+		}
+		case ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_B :
+		{
+			constOnlyInternalScope_react_ConstOnlyInternalScope_main_region_B(handle);
+			break;
+		}
+		case ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_C :
+		{
+			constOnlyInternalScope_react_ConstOnlyInternalScope_main_region_C(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	constOnlyInternalScope_clearInEvents(handle);
+}
+
+
+sc_boolean constOnlyInternalScope_isStateActive(const ConstOnlyInternalScope* handle, ConstOnlyInternalScopeStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_A
+			);
+			break;
+		case ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_B
+			);
+			break;
+		case ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_C :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_C
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void constOnlyInternalScopeIface_raise_e(ConstOnlyInternalScope* handle, sc_integer value)
+{
+	handle->iface.e_value = value;
+	handle->iface.e_raised = bool_true;
+}
+
+
+
+/* implementations of all internal functions */
+
+static sc_boolean constOnlyInternalScope_check_ConstOnlyInternalScope_main_region_A_tr0_tr0(const ConstOnlyInternalScope* handle)
+{
+	return ((handle->iface.e_raised) && (handle->iface.e_value == CONSTONLYINTERNALSCOPE_CONSTONLYINTERNALSCOPEINTERNAL_B)) ? bool_true : bool_false;
+}
+
+static sc_boolean constOnlyInternalScope_check_ConstOnlyInternalScope_main_region_A_tr1_tr1(const ConstOnlyInternalScope* handle)
+{
+	return ((handle->iface.e_raised) && (handle->iface.e_value == CONSTONLYINTERNALSCOPE_CONSTONLYINTERNALSCOPEINTERNAL_C)) ? bool_true : bool_false;
+}
+
+static void constOnlyInternalScope_effect_ConstOnlyInternalScope_main_region_A_tr0(ConstOnlyInternalScope* handle)
+{
+	constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_A(handle);
+	constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_B_default(handle);
+}
+
+static void constOnlyInternalScope_effect_ConstOnlyInternalScope_main_region_A_tr1(ConstOnlyInternalScope* handle)
+{
+	constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_A(handle);
+	constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_C_default(handle);
+}
+
+/* 'default' enter sequence for state A */
+static void constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_A_default(ConstOnlyInternalScope* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_B_default(ConstOnlyInternalScope* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state C */
+static void constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_C_default(ConstOnlyInternalScope* handle)
+{
+	/* 'default' enter sequence for state C */
+	handle->stateConfVector[0] = ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_C;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_default(ConstOnlyInternalScope* handle)
+{
+	/* 'default' enter sequence for region main region */
+	constOnlyInternalScope_react_ConstOnlyInternalScope_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_A(ConstOnlyInternalScope* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = ConstOnlyInternalScope_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_B(ConstOnlyInternalScope* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = ConstOnlyInternalScope_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state C */
+static void constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_C(ConstOnlyInternalScope* handle)
+{
+	/* Default exit sequence for state C */
+	handle->stateConfVector[0] = ConstOnlyInternalScope_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region(ConstOnlyInternalScope* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of declarations.ConstOnlyInternalScope.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_A :
+		{
+			constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_A(handle);
+			break;
+		}
+		case ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_B :
+		{
+			constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_B(handle);
+			break;
+		}
+		case ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_C :
+		{
+			constOnlyInternalScope_exseq_ConstOnlyInternalScope_main_region_C(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void constOnlyInternalScope_react_ConstOnlyInternalScope_main_region_A(ConstOnlyInternalScope* handle)
+{
+	/* The reactions of state A. */
+	if (constOnlyInternalScope_check_ConstOnlyInternalScope_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		constOnlyInternalScope_effect_ConstOnlyInternalScope_main_region_A_tr0(handle);
+	}  else
+	{
+		if (constOnlyInternalScope_check_ConstOnlyInternalScope_main_region_A_tr1_tr1(handle) == bool_true)
+		{ 
+			constOnlyInternalScope_effect_ConstOnlyInternalScope_main_region_A_tr1(handle);
+		} 
+	}
+}
+
+/* The reactions of state B. */
+static void constOnlyInternalScope_react_ConstOnlyInternalScope_main_region_B(ConstOnlyInternalScope* handle)
+{
+	/* The reactions of state B. */
+}
+
+/* The reactions of state C. */
+static void constOnlyInternalScope_react_ConstOnlyInternalScope_main_region_C(ConstOnlyInternalScope* handle)
+{
+	/* The reactions of state C. */
+}
+
+/* Default react sequence for initial entry  */
+static void constOnlyInternalScope_react_ConstOnlyInternalScope_main_region__entry_Default(ConstOnlyInternalScope* handle)
+{
+	/* Default react sequence for initial entry  */
+	constOnlyInternalScope_enseq_ConstOnlyInternalScope_main_region_A_default(handle);
+}
+
+

+ 82 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScope.h

@@ -0,0 +1,82 @@
+
+#ifndef CONSTONLYINTERNALSCOPE_H_
+#define CONSTONLYINTERNALSCOPE_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'ConstOnlyInternalScope'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_A,
+	ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_B,
+	ConstOnlyInternalScope_ConstOnlyInternalScope_main_region_C,
+	ConstOnlyInternalScope_last_state
+} ConstOnlyInternalScopeStates;
+
+/*! Type definition of the data structure for the ConstOnlyInternalScopeIface interface scope. */
+typedef struct
+{
+	sc_boolean e_raised;
+	sc_integer e_value;
+} ConstOnlyInternalScopeIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define CONSTONLYINTERNALSCOPE_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the ConstOnlyInternalScope state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	ConstOnlyInternalScopeStates stateConfVector[CONSTONLYINTERNALSCOPE_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	ConstOnlyInternalScopeIface iface;
+} ConstOnlyInternalScope;
+
+/*! Initializes the ConstOnlyInternalScope state machine data structures. Must be called before first usage.*/
+extern void constOnlyInternalScope_init(ConstOnlyInternalScope* handle);
+
+/*! Activates the state machine */
+extern void constOnlyInternalScope_enter(ConstOnlyInternalScope* handle);
+
+/*! Deactivates the state machine */
+extern void constOnlyInternalScope_exit(ConstOnlyInternalScope* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void constOnlyInternalScope_runCycle(ConstOnlyInternalScope* handle);
+
+
+/*! Raises the in event 'e' that is defined in the default interface scope. */ 
+extern void constOnlyInternalScopeIface_raise_e(ConstOnlyInternalScope* handle, sc_integer value);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean constOnlyInternalScope_isActive(const ConstOnlyInternalScope* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean constOnlyInternalScope_isFinal(const ConstOnlyInternalScope* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean constOnlyInternalScope_isStateActive(const ConstOnlyInternalScope* handle, ConstOnlyInternalScopeStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* CONSTONLYINTERNALSCOPE_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScope.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart declarations.ConstOnlyInternalScope {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/ConstOnlyInternalScopeTest"
+			targetProject = "gtests"
+			targetFolder = "ConstOnlyInternalScopeTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 311 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScope.c

@@ -0,0 +1,311 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "ConstOnlyNamedScope.h"
+/*! \file Implementation of the state machine 'ConstOnlyNamedScope'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean constOnlyNamedScope_check_ConstOnlyNamedScope_main_region_A_tr0_tr0(const ConstOnlyNamedScope* handle);
+static sc_boolean constOnlyNamedScope_check_ConstOnlyNamedScope_main_region_A_tr1_tr1(const ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_effect_ConstOnlyNamedScope_main_region_A_tr0(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_effect_ConstOnlyNamedScope_main_region_A_tr1(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_A_default(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_B_default(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_C_default(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_default(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_A(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_B(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_C(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_react_ConstOnlyNamedScope_main_region_A(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_react_ConstOnlyNamedScope_main_region_B(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_react_ConstOnlyNamedScope_main_region_C(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_react_ConstOnlyNamedScope_main_region__entry_Default(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_clearInEvents(ConstOnlyNamedScope* handle);
+static void constOnlyNamedScope_clearOutEvents(ConstOnlyNamedScope* handle);
+
+const sc_integer CONSTONLYNAMEDSCOPE_CONSTONLYNAMEDSCOPEIFACEA_B = 1;
+const sc_integer CONSTONLYNAMEDSCOPE_CONSTONLYNAMEDSCOPEIFACEA_C = 2;
+
+void constOnlyNamedScope_init(ConstOnlyNamedScope* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < CONSTONLYNAMEDSCOPE_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = ConstOnlyNamedScope_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	constOnlyNamedScope_clearInEvents(handle);
+	constOnlyNamedScope_clearOutEvents(handle);
+
+
+}
+
+void constOnlyNamedScope_enter(ConstOnlyNamedScope* handle)
+{
+	/* Default enter sequence for statechart ConstOnlyNamedScope */
+	constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_default(handle);
+}
+
+void constOnlyNamedScope_exit(ConstOnlyNamedScope* handle)
+{
+	/* Default exit sequence for statechart ConstOnlyNamedScope */
+	constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region(handle);
+}
+
+sc_boolean constOnlyNamedScope_isActive(const ConstOnlyNamedScope* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != ConstOnlyNamedScope_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean constOnlyNamedScope_isFinal(const ConstOnlyNamedScope* handle)
+{
+   return bool_false;
+}
+
+static void constOnlyNamedScope_clearInEvents(ConstOnlyNamedScope* handle)
+{
+	handle->iface.e_raised = bool_false;
+}
+
+static void constOnlyNamedScope_clearOutEvents(ConstOnlyNamedScope* handle)
+{
+}
+
+void constOnlyNamedScope_runCycle(ConstOnlyNamedScope* handle)
+{
+	
+	constOnlyNamedScope_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < CONSTONLYNAMEDSCOPE_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_A :
+		{
+			constOnlyNamedScope_react_ConstOnlyNamedScope_main_region_A(handle);
+			break;
+		}
+		case ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_B :
+		{
+			constOnlyNamedScope_react_ConstOnlyNamedScope_main_region_B(handle);
+			break;
+		}
+		case ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_C :
+		{
+			constOnlyNamedScope_react_ConstOnlyNamedScope_main_region_C(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	constOnlyNamedScope_clearInEvents(handle);
+}
+
+
+sc_boolean constOnlyNamedScope_isStateActive(const ConstOnlyNamedScope* handle, ConstOnlyNamedScopeStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_A
+			);
+			break;
+		case ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_B
+			);
+			break;
+		case ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_C :
+			result = (sc_boolean) (handle->stateConfVector[0] == ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_C
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void constOnlyNamedScopeIface_raise_e(ConstOnlyNamedScope* handle, sc_integer value)
+{
+	handle->iface.e_value = value;
+	handle->iface.e_raised = bool_true;
+}
+
+
+
+
+const sc_integer constOnlyNamedScopeIfaceA_get_b(const ConstOnlyNamedScope* handle)
+{
+	return CONSTONLYNAMEDSCOPE_CONSTONLYNAMEDSCOPEIFACEA_B;
+}
+const sc_integer constOnlyNamedScopeIfaceA_get_c(const ConstOnlyNamedScope* handle)
+{
+	return CONSTONLYNAMEDSCOPE_CONSTONLYNAMEDSCOPEIFACEA_C;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean constOnlyNamedScope_check_ConstOnlyNamedScope_main_region_A_tr0_tr0(const ConstOnlyNamedScope* handle)
+{
+	return ((handle->iface.e_raised) && (handle->iface.e_value == CONSTONLYNAMEDSCOPE_CONSTONLYNAMEDSCOPEIFACEA_B)) ? bool_true : bool_false;
+}
+
+static sc_boolean constOnlyNamedScope_check_ConstOnlyNamedScope_main_region_A_tr1_tr1(const ConstOnlyNamedScope* handle)
+{
+	return ((handle->iface.e_raised) && (handle->iface.e_value == CONSTONLYNAMEDSCOPE_CONSTONLYNAMEDSCOPEIFACEA_C)) ? bool_true : bool_false;
+}
+
+static void constOnlyNamedScope_effect_ConstOnlyNamedScope_main_region_A_tr0(ConstOnlyNamedScope* handle)
+{
+	constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_A(handle);
+	constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_B_default(handle);
+}
+
+static void constOnlyNamedScope_effect_ConstOnlyNamedScope_main_region_A_tr1(ConstOnlyNamedScope* handle)
+{
+	constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_A(handle);
+	constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_C_default(handle);
+}
+
+/* 'default' enter sequence for state A */
+static void constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_A_default(ConstOnlyNamedScope* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_B_default(ConstOnlyNamedScope* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state C */
+static void constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_C_default(ConstOnlyNamedScope* handle)
+{
+	/* 'default' enter sequence for state C */
+	handle->stateConfVector[0] = ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_C;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_default(ConstOnlyNamedScope* handle)
+{
+	/* 'default' enter sequence for region main region */
+	constOnlyNamedScope_react_ConstOnlyNamedScope_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_A(ConstOnlyNamedScope* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = ConstOnlyNamedScope_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_B(ConstOnlyNamedScope* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = ConstOnlyNamedScope_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state C */
+static void constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_C(ConstOnlyNamedScope* handle)
+{
+	/* Default exit sequence for state C */
+	handle->stateConfVector[0] = ConstOnlyNamedScope_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region(ConstOnlyNamedScope* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of declarations.ConstOnlyNamedScope.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_A :
+		{
+			constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_A(handle);
+			break;
+		}
+		case ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_B :
+		{
+			constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_B(handle);
+			break;
+		}
+		case ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_C :
+		{
+			constOnlyNamedScope_exseq_ConstOnlyNamedScope_main_region_C(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void constOnlyNamedScope_react_ConstOnlyNamedScope_main_region_A(ConstOnlyNamedScope* handle)
+{
+	/* The reactions of state A. */
+	if (constOnlyNamedScope_check_ConstOnlyNamedScope_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		constOnlyNamedScope_effect_ConstOnlyNamedScope_main_region_A_tr0(handle);
+	}  else
+	{
+		if (constOnlyNamedScope_check_ConstOnlyNamedScope_main_region_A_tr1_tr1(handle) == bool_true)
+		{ 
+			constOnlyNamedScope_effect_ConstOnlyNamedScope_main_region_A_tr1(handle);
+		} 
+	}
+}
+
+/* The reactions of state B. */
+static void constOnlyNamedScope_react_ConstOnlyNamedScope_main_region_B(ConstOnlyNamedScope* handle)
+{
+	/* The reactions of state B. */
+}
+
+/* The reactions of state C. */
+static void constOnlyNamedScope_react_ConstOnlyNamedScope_main_region_C(ConstOnlyNamedScope* handle)
+{
+	/* The reactions of state C. */
+}
+
+/* Default react sequence for initial entry  */
+static void constOnlyNamedScope_react_ConstOnlyNamedScope_main_region__entry_Default(ConstOnlyNamedScope* handle)
+{
+	/* Default react sequence for initial entry  */
+	constOnlyNamedScope_enseq_ConstOnlyNamedScope_main_region_A_default(handle);
+}
+
+

+ 90 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScope.h

@@ -0,0 +1,90 @@
+
+#ifndef CONSTONLYNAMEDSCOPE_H_
+#define CONSTONLYNAMEDSCOPE_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'ConstOnlyNamedScope'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_A,
+	ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_B,
+	ConstOnlyNamedScope_ConstOnlyNamedScope_main_region_C,
+	ConstOnlyNamedScope_last_state
+} ConstOnlyNamedScopeStates;
+
+/*! Type definition of the data structure for the ConstOnlyNamedScopeIface interface scope. */
+typedef struct
+{
+	sc_boolean e_raised;
+	sc_integer e_value;
+} ConstOnlyNamedScopeIface;
+
+/* Declaration of constants for scope ConstOnlyNamedScopeIfaceA. */
+extern const sc_integer CONSTONLYNAMEDSCOPE_CONSTONLYNAMEDSCOPEIFACEA_B;
+extern const sc_integer CONSTONLYNAMEDSCOPE_CONSTONLYNAMEDSCOPEIFACEA_C;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define CONSTONLYNAMEDSCOPE_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the ConstOnlyNamedScope state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	ConstOnlyNamedScopeStates stateConfVector[CONSTONLYNAMEDSCOPE_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	ConstOnlyNamedScopeIface iface;
+} ConstOnlyNamedScope;
+
+/*! Initializes the ConstOnlyNamedScope state machine data structures. Must be called before first usage.*/
+extern void constOnlyNamedScope_init(ConstOnlyNamedScope* handle);
+
+/*! Activates the state machine */
+extern void constOnlyNamedScope_enter(ConstOnlyNamedScope* handle);
+
+/*! Deactivates the state machine */
+extern void constOnlyNamedScope_exit(ConstOnlyNamedScope* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void constOnlyNamedScope_runCycle(ConstOnlyNamedScope* handle);
+
+
+/*! Raises the in event 'e' that is defined in the default interface scope. */ 
+extern void constOnlyNamedScopeIface_raise_e(ConstOnlyNamedScope* handle, sc_integer value);
+
+/*! Gets the value of the variable 'B' that is defined in the interface scope 'A'. */ 
+extern const sc_integer constOnlyNamedScopeIfaceA_get_b(const ConstOnlyNamedScope* handle);
+/*! Gets the value of the variable 'C' that is defined in the interface scope 'A'. */ 
+extern const sc_integer constOnlyNamedScopeIfaceA_get_c(const ConstOnlyNamedScope* handle);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean constOnlyNamedScope_isActive(const ConstOnlyNamedScope* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean constOnlyNamedScope_isFinal(const ConstOnlyNamedScope* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean constOnlyNamedScope_isStateActive(const ConstOnlyNamedScope* handle, ConstOnlyNamedScopeStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* CONSTONLYNAMEDSCOPE_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScope.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart declarations.ConstOnlyNamedScope {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/ConstOnlyNamedScopeTest"
+			targetProject = "gtests"
+			targetFolder = "ConstOnlyNamedScopeTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 371 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/Constants.c

@@ -0,0 +1,371 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "Constants.h"
+/*! \file Implementation of the state machine 'Constants'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean constants_check_main_region_A_tr0_tr0(const Constants* handle);
+static sc_boolean constants_check_main_region_B_tr0_tr0(const Constants* handle);
+static sc_boolean constants_check_main_region_C_tr0_tr0(const Constants* handle);
+static void constants_effect_main_region_A_tr0(Constants* handle);
+static void constants_effect_main_region_B_tr0(Constants* handle);
+static void constants_effect_main_region_C_tr0(Constants* handle);
+static void constants_enact_main_region_B(Constants* handle);
+static void constants_enact_main_region_C(Constants* handle);
+static void constants_enseq_main_region_A_default(Constants* handle);
+static void constants_enseq_main_region_B_default(Constants* handle);
+static void constants_enseq_main_region_C_default(Constants* handle);
+static void constants_enseq_main_region_default(Constants* handle);
+static void constants_exseq_main_region_A(Constants* handle);
+static void constants_exseq_main_region_B(Constants* handle);
+static void constants_exseq_main_region_C(Constants* handle);
+static void constants_exseq_main_region(Constants* handle);
+static void constants_react_main_region_A(Constants* handle);
+static void constants_react_main_region_B(Constants* handle);
+static void constants_react_main_region_C(Constants* handle);
+static void constants_react_main_region__entry_Default(Constants* handle);
+static void constants_clearInEvents(Constants* handle);
+static void constants_clearOutEvents(Constants* handle);
+
+const sc_integer CONSTANTS_CONSTANTSIFACE_X = 10;
+const sc_integer CONSTANTS_CONSTANTSIFACE_Y = 10 * 2;
+const sc_string CONSTANTS_CONSTANTSIFACENAMED_Y = "Hello World";
+const sc_integer CONSTANTS_CONSTANTSIFACENAMED_TWO = 2;
+const sc_integer CONSTANTS_CONSTANTSINTERNAL_INTERNALCONSTANT = 5;
+
+void constants_init(Constants* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < CONSTANTS_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = Constants_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	constants_clearInEvents(handle);
+	constants_clearOutEvents(handle);
+
+	/* Default init sequence for statechart Constants */
+	handle->iface.result = 0;
+
+}
+
+void constants_enter(Constants* handle)
+{
+	/* Default enter sequence for statechart Constants */
+	constants_enseq_main_region_default(handle);
+}
+
+void constants_exit(Constants* handle)
+{
+	/* Default exit sequence for statechart Constants */
+	constants_exseq_main_region(handle);
+}
+
+sc_boolean constants_isActive(const Constants* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != Constants_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean constants_isFinal(const Constants* handle)
+{
+   return bool_false;
+}
+
+static void constants_clearInEvents(Constants* handle)
+{
+	handle->iface.e_raised = bool_false;
+	handle->iface.e2_raised = bool_false;
+}
+
+static void constants_clearOutEvents(Constants* handle)
+{
+}
+
+void constants_runCycle(Constants* handle)
+{
+	
+	constants_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < CONSTANTS_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case Constants_main_region_A :
+		{
+			constants_react_main_region_A(handle);
+			break;
+		}
+		case Constants_main_region_B :
+		{
+			constants_react_main_region_B(handle);
+			break;
+		}
+		case Constants_main_region_C :
+		{
+			constants_react_main_region_C(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	constants_clearInEvents(handle);
+}
+
+
+sc_boolean constants_isStateActive(const Constants* handle, ConstantsStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case Constants_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == Constants_main_region_A
+			);
+			break;
+		case Constants_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == Constants_main_region_B
+			);
+			break;
+		case Constants_main_region_C :
+			result = (sc_boolean) (handle->stateConfVector[0] == Constants_main_region_C
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void constantsIface_raise_e(Constants* handle)
+{
+	handle->iface.e_raised = bool_true;
+}
+void constantsIface_raise_e2(Constants* handle, sc_integer value)
+{
+	handle->iface.e2_value = value;
+	handle->iface.e2_raised = bool_true;
+}
+
+
+const sc_integer constantsIface_get_x(const Constants* handle)
+{
+	return CONSTANTS_CONSTANTSIFACE_X;
+}
+const sc_integer constantsIface_get_y(const Constants* handle)
+{
+	return CONSTANTS_CONSTANTSIFACE_Y;
+}
+sc_integer constantsIface_get_result(const Constants* handle)
+{
+	return handle->iface.result;
+}
+void constantsIface_set_result(Constants* handle, sc_integer value)
+{
+	handle->iface.result = value;
+}
+
+
+const sc_string constantsIfaceNamed_get_y(const Constants* handle)
+{
+	return CONSTANTS_CONSTANTSIFACENAMED_Y;
+}
+const sc_integer constantsIfaceNamed_get_two(const Constants* handle)
+{
+	return CONSTANTS_CONSTANTSIFACENAMED_TWO;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean constants_check_main_region_A_tr0_tr0(const Constants* handle)
+{
+	return handle->iface.e_raised;
+}
+
+static sc_boolean constants_check_main_region_B_tr0_tr0(const Constants* handle)
+{
+	return handle->iface.e_raised;
+}
+
+static sc_boolean constants_check_main_region_C_tr0_tr0(const Constants* handle)
+{
+	return handle->iface.e2_raised;
+}
+
+static void constants_effect_main_region_A_tr0(Constants* handle)
+{
+	constants_exseq_main_region_A(handle);
+	constants_enseq_main_region_B_default(handle);
+}
+
+static void constants_effect_main_region_B_tr0(Constants* handle)
+{
+	constants_exseq_main_region_B(handle);
+	constants_enseq_main_region_C_default(handle);
+}
+
+static void constants_effect_main_region_C_tr0(Constants* handle)
+{
+	constants_exseq_main_region_C(handle);
+	handle->iface.result = handle->iface.e2_value * CONSTANTS_CONSTANTSIFACE_X * CONSTANTS_CONSTANTSIFACENAMED_TWO * CONSTANTS_CONSTANTSINTERNAL_INTERNALCONSTANT;
+	constants_enseq_main_region_A_default(handle);
+}
+
+/* Entry action for state 'B'. */
+static void constants_enact_main_region_B(Constants* handle)
+{
+	/* Entry action for state 'B'. */
+	handle->iface.result = CONSTANTS_CONSTANTSIFACENAMED_TWO * CONSTANTS_CONSTANTSIFACE_X;
+}
+
+/* Entry action for state 'C'. */
+static void constants_enact_main_region_C(Constants* handle)
+{
+	/* Entry action for state 'C'. */
+	handle->iface.result = handle->iface.result * CONSTANTS_CONSTANTSINTERNAL_INTERNALCONSTANT;
+}
+
+/* 'default' enter sequence for state A */
+static void constants_enseq_main_region_A_default(Constants* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = Constants_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void constants_enseq_main_region_B_default(Constants* handle)
+{
+	/* 'default' enter sequence for state B */
+	constants_enact_main_region_B(handle);
+	handle->stateConfVector[0] = Constants_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state C */
+static void constants_enseq_main_region_C_default(Constants* handle)
+{
+	/* 'default' enter sequence for state C */
+	constants_enact_main_region_C(handle);
+	handle->stateConfVector[0] = Constants_main_region_C;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void constants_enseq_main_region_default(Constants* handle)
+{
+	/* 'default' enter sequence for region main region */
+	constants_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void constants_exseq_main_region_A(Constants* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = Constants_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void constants_exseq_main_region_B(Constants* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = Constants_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state C */
+static void constants_exseq_main_region_C(Constants* handle)
+{
+	/* Default exit sequence for state C */
+	handle->stateConfVector[0] = Constants_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void constants_exseq_main_region(Constants* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of Constants.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case Constants_main_region_A :
+		{
+			constants_exseq_main_region_A(handle);
+			break;
+		}
+		case Constants_main_region_B :
+		{
+			constants_exseq_main_region_B(handle);
+			break;
+		}
+		case Constants_main_region_C :
+		{
+			constants_exseq_main_region_C(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void constants_react_main_region_A(Constants* handle)
+{
+	/* The reactions of state A. */
+	if (constants_check_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		constants_effect_main_region_A_tr0(handle);
+	} 
+}
+
+/* The reactions of state B. */
+static void constants_react_main_region_B(Constants* handle)
+{
+	/* The reactions of state B. */
+	if (constants_check_main_region_B_tr0_tr0(handle) == bool_true)
+	{ 
+		constants_effect_main_region_B_tr0(handle);
+	} 
+}
+
+/* The reactions of state C. */
+static void constants_react_main_region_C(Constants* handle)
+{
+	/* The reactions of state C. */
+	if (constants_check_main_region_C_tr0_tr0(handle) == bool_true)
+	{ 
+		constants_effect_main_region_C_tr0(handle);
+	} 
+}
+
+/* Default react sequence for initial entry  */
+static void constants_react_main_region__entry_Default(Constants* handle)
+{
+	/* Default react sequence for initial entry  */
+	constants_enseq_main_region_A_default(handle);
+}
+
+

+ 107 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/Constants.h

@@ -0,0 +1,107 @@
+
+#ifndef CONSTANTS_H_
+#define CONSTANTS_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'Constants'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	Constants_main_region_A,
+	Constants_main_region_B,
+	Constants_main_region_C,
+	Constants_last_state
+} ConstantsStates;
+
+/*! Type definition of the data structure for the ConstantsIface interface scope. */
+typedef struct
+{
+	sc_boolean e_raised;
+	sc_boolean e2_raised;
+	sc_integer e2_value;
+	sc_integer result;
+} ConstantsIface;
+
+/* Declaration of constants for scope ConstantsIface. */
+extern const sc_integer CONSTANTS_CONSTANTSIFACE_X;
+extern const sc_integer CONSTANTS_CONSTANTSIFACE_Y;
+
+/* Declaration of constants for scope ConstantsIfaceNamed. */
+extern const sc_string CONSTANTS_CONSTANTSIFACENAMED_Y;
+extern const sc_integer CONSTANTS_CONSTANTSIFACENAMED_TWO;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define CONSTANTS_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the Constants state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	ConstantsStates stateConfVector[CONSTANTS_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	ConstantsIface iface;
+} Constants;
+
+/*! Initializes the Constants state machine data structures. Must be called before first usage.*/
+extern void constants_init(Constants* handle);
+
+/*! Activates the state machine */
+extern void constants_enter(Constants* handle);
+
+/*! Deactivates the state machine */
+extern void constants_exit(Constants* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void constants_runCycle(Constants* handle);
+
+
+/*! Raises the in event 'e' that is defined in the default interface scope. */ 
+extern void constantsIface_raise_e(Constants* handle);
+
+/*! Raises the in event 'e2' that is defined in the default interface scope. */ 
+extern void constantsIface_raise_e2(Constants* handle, sc_integer value);
+
+/*! Gets the value of the variable 'x' that is defined in the default interface scope. */ 
+extern const sc_integer constantsIface_get_x(const Constants* handle);
+/*! Gets the value of the variable 'y' that is defined in the default interface scope. */ 
+extern const sc_integer constantsIface_get_y(const Constants* handle);
+/*! Gets the value of the variable 'result' that is defined in the default interface scope. */ 
+extern sc_integer constantsIface_get_result(const Constants* handle);
+/*! Sets the value of the variable 'result' that is defined in the default interface scope. */ 
+extern void constantsIface_set_result(Constants* handle, sc_integer value);
+/*! Gets the value of the variable 'y' that is defined in the interface scope 'Named'. */ 
+extern const sc_string constantsIfaceNamed_get_y(const Constants* handle);
+/*! Gets the value of the variable 'two' that is defined in the interface scope 'Named'. */ 
+extern const sc_integer constantsIfaceNamed_get_two(const Constants* handle);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean constants_isActive(const Constants* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean constants_isFinal(const Constants* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean constants_isStateActive(const Constants* handle, ConstantsStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* CONSTANTS_H_ */

+ 9 - 7
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/ConstantsTests.cc

@@ -1,5 +1,5 @@
 /**
-* Copyright (c) 2016 committers of YAKINDU and others.
+* Copyright (c) 2017 committers of YAKINDU and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
@@ -16,21 +16,23 @@ Constants handle;
 
 TEST(StatemachineTest, constantDefinition) {
 	constants_init(&handle);
+	
 	constants_enter(&handle);
 	EXPECT_TRUE(constants_isStateActive(&handle, Constants_main_region_A));
-	EXPECT_TRUE(constantsIface_get_x(&handle) == 10l);
-	EXPECT_TRUE(constantsIface_get_y(&handle) == 20l);
+	EXPECT_TRUE(constantsIface_get_x(&handle)== 10l);
+	EXPECT_TRUE(constantsIface_get_y(&handle)== 20l);
 	EXPECT_TRUE(strcmp(constantsIfaceNamed_get_y(&handle) , "Hello World") == 0);
 	constantsIface_raise_e(&handle);
 	constants_runCycle(&handle);
-	EXPECT_TRUE(constantsIface_get_result(&handle) == 20l);
+	EXPECT_TRUE(constantsIface_get_result(&handle)== 20l);
 	constantsIface_raise_e(&handle);
 	constants_runCycle(&handle);
 	EXPECT_TRUE(constants_isStateActive(&handle, Constants_main_region_C));
-	EXPECT_TRUE(constantsIface_get_result(&handle) == 100l);
-	constantsIface_raise_e2(&handle, constantsIface_get_x(&handle) );
+	EXPECT_TRUE(constantsIface_get_result(&handle)== 100l);
+	constantsIface_raise_e2(&handle, constantsIface_get_x(&handle));
 	constants_runCycle(&handle);
-	EXPECT_TRUE(constantsIface_get_result(&handle) == 1000l);
+	EXPECT_TRUE(constantsIface_get_result(&handle)== 1000l);
 	EXPECT_TRUE(constants_isStateActive(&handle, Constants_main_region_A));
 }
 
+

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 525 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/Declarations.c

@@ -0,0 +1,525 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "Declarations.h"
+/*! \file Implementation of the state machine 'Declarations'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean declarations_check_main_region_A_tr0_tr0(const Declarations* handle);
+static sc_boolean declarations_check_main_region_A_tr1_tr1(const Declarations* handle);
+static sc_boolean declarations_check_main_region_B_tr0_tr0(const Declarations* handle);
+static sc_boolean declarations_check_main_region_B_tr1_tr1(const Declarations* handle);
+static sc_boolean declarations_check_main_region_B_tr2_tr2(const Declarations* handle);
+static sc_boolean declarations_check_main_region_B_tr3_tr3(const Declarations* handle);
+static void declarations_effect_main_region_A_tr0(Declarations* handle);
+static void declarations_effect_main_region_A_tr1(Declarations* handle);
+static void declarations_effect_main_region_B_tr0(Declarations* handle);
+static void declarations_effect_main_region_B_tr1(Declarations* handle);
+static void declarations_effect_main_region_B_tr2(Declarations* handle);
+static void declarations_effect_main_region_B_tr3(Declarations* handle);
+static void declarations_enact_main_region_A(Declarations* handle);
+static void declarations_enseq_main_region_A_default(Declarations* handle);
+static void declarations_enseq_main_region_B_default(Declarations* handle);
+static void declarations_enseq_main_region_default(Declarations* handle);
+static void declarations_exseq_main_region_A(Declarations* handle);
+static void declarations_exseq_main_region_B(Declarations* handle);
+static void declarations_exseq_main_region(Declarations* handle);
+static void declarations_react_main_region_A(Declarations* handle);
+static void declarations_react_main_region_B(Declarations* handle);
+static void declarations_react_main_region__entry_Default(Declarations* handle);
+static void declarations_clearInEvents(Declarations* handle);
+static void declarations_clearOutEvents(Declarations* handle);
+
+
+void declarations_init(Declarations* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < DECLARATIONS_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = Declarations_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	declarations_clearInEvents(handle);
+	declarations_clearOutEvents(handle);
+
+	/* Default init sequence for statechart Declarations */
+	handle->iface.varA = bool_false;
+	handle->iface.varB = 1;
+	handle->iface.varC = 1.0;
+	handle->iface.varD = "myString";
+	handle->iface.varE = 0x10;
+	handle->ifaceIfA.varA = bool_false;
+	handle->ifaceIfA.varB = 1;
+	handle->ifaceIfA.varC = 1.0;
+	handle->ifaceIfA.varD = "myString";
+	handle->ifaceIfA.varE = 0x10;
+	handle->internal.varInA = bool_false;
+	handle->internal.varInB = 1;
+	handle->internal.varInC = 1.0;
+	handle->internal.varInD = "myString";
+	handle->internal.varInE = 0x10;
+
+}
+
+void declarations_enter(Declarations* handle)
+{
+	/* Default enter sequence for statechart Declarations */
+	declarations_enseq_main_region_default(handle);
+}
+
+void declarations_exit(Declarations* handle)
+{
+	/* Default exit sequence for statechart Declarations */
+	declarations_exseq_main_region(handle);
+}
+
+sc_boolean declarations_isActive(const Declarations* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != Declarations_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean declarations_isFinal(const Declarations* handle)
+{
+   return bool_false;
+}
+
+static void declarations_clearInEvents(Declarations* handle)
+{
+	handle->iface.evA_raised = bool_false;
+	handle->iface.evC_raised = bool_false;
+	handle->iface.evE_raised = bool_false;
+	handle->ifaceIfA.evA_raised = bool_false;
+	handle->ifaceIfA.evC_raised = bool_false;
+	handle->ifaceIfA.evE_raised = bool_false;
+	handle->internal.evInA_raised = bool_false;
+	handle->internal.evInB_raised = bool_false;
+	handle->internal.evInC_raised = bool_false;
+	handle->internal.evInD_raised = bool_false;
+	handle->internal.evInE_raised = bool_false;
+	handle->internal.evInF_raised = bool_false;
+}
+
+static void declarations_clearOutEvents(Declarations* handle)
+{
+	handle->iface.evB_raised = bool_false;
+	handle->iface.evD_raised = bool_false;
+	handle->iface.evF_raised = bool_false;
+	handle->ifaceIfA.evB_raised = bool_false;
+	handle->ifaceIfA.evD_raised = bool_false;
+	handle->ifaceIfA.evF_raised = bool_false;
+}
+
+void declarations_runCycle(Declarations* handle)
+{
+	
+	declarations_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < DECLARATIONS_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case Declarations_main_region_A :
+		{
+			declarations_react_main_region_A(handle);
+			break;
+		}
+		case Declarations_main_region_B :
+		{
+			declarations_react_main_region_B(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	declarations_clearInEvents(handle);
+}
+
+
+sc_boolean declarations_isStateActive(const Declarations* handle, DeclarationsStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case Declarations_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == Declarations_main_region_A
+			);
+			break;
+		case Declarations_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == Declarations_main_region_B
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void declarationsIface_raise_evA(Declarations* handle)
+{
+	handle->iface.evA_raised = bool_true;
+}
+void declarationsIface_raise_evC(Declarations* handle, sc_boolean value)
+{
+	handle->iface.evC_value = value;
+	handle->iface.evC_raised = bool_true;
+}
+void declarationsIface_raise_evE(Declarations* handle, sc_real value)
+{
+	handle->iface.evE_value = value;
+	handle->iface.evE_raised = bool_true;
+}
+
+sc_boolean declarationsIface_israised_evB(const Declarations* handle)
+{
+	return handle->iface.evB_raised;
+}
+sc_boolean declarationsIface_israised_evD(const Declarations* handle)
+{
+	return handle->iface.evD_raised;
+}
+sc_integer declarationsIface_get_evD_value(const Declarations* handle)
+{
+	return handle->iface.evD_value;
+}
+sc_boolean declarationsIface_israised_evF(const Declarations* handle)
+{
+	return handle->iface.evF_raised;
+}
+sc_string declarationsIface_get_evF_value(const Declarations* handle)
+{
+	return handle->iface.evF_value;
+}
+
+sc_boolean declarationsIface_get_varA(const Declarations* handle)
+{
+	return handle->iface.varA;
+}
+void declarationsIface_set_varA(Declarations* handle, sc_boolean value)
+{
+	handle->iface.varA = value;
+}
+sc_integer declarationsIface_get_varB(const Declarations* handle)
+{
+	return handle->iface.varB;
+}
+void declarationsIface_set_varB(Declarations* handle, sc_integer value)
+{
+	handle->iface.varB = value;
+}
+sc_real declarationsIface_get_varC(const Declarations* handle)
+{
+	return handle->iface.varC;
+}
+void declarationsIface_set_varC(Declarations* handle, sc_real value)
+{
+	handle->iface.varC = value;
+}
+sc_string declarationsIface_get_varD(const Declarations* handle)
+{
+	return handle->iface.varD;
+}
+void declarationsIface_set_varD(Declarations* handle, sc_string value)
+{
+	handle->iface.varD = value;
+}
+sc_integer declarationsIface_get_varE(const Declarations* handle)
+{
+	return handle->iface.varE;
+}
+void declarationsIface_set_varE(Declarations* handle, sc_integer value)
+{
+	handle->iface.varE = value;
+}
+void declarationsIfaceIfA_raise_evA(Declarations* handle)
+{
+	handle->ifaceIfA.evA_raised = bool_true;
+}
+void declarationsIfaceIfA_raise_evC(Declarations* handle, sc_boolean value)
+{
+	handle->ifaceIfA.evC_value = value;
+	handle->ifaceIfA.evC_raised = bool_true;
+}
+void declarationsIfaceIfA_raise_evE(Declarations* handle, sc_real value)
+{
+	handle->ifaceIfA.evE_value = value;
+	handle->ifaceIfA.evE_raised = bool_true;
+}
+
+sc_boolean declarationsIfaceIfA_israised_evB(const Declarations* handle)
+{
+	return handle->ifaceIfA.evB_raised;
+}
+sc_boolean declarationsIfaceIfA_israised_evD(const Declarations* handle)
+{
+	return handle->ifaceIfA.evD_raised;
+}
+sc_integer declarationsIfaceIfA_get_evD_value(const Declarations* handle)
+{
+	return handle->ifaceIfA.evD_value;
+}
+sc_boolean declarationsIfaceIfA_israised_evF(const Declarations* handle)
+{
+	return handle->ifaceIfA.evF_raised;
+}
+sc_string declarationsIfaceIfA_get_evF_value(const Declarations* handle)
+{
+	return handle->ifaceIfA.evF_value;
+}
+
+sc_boolean declarationsIfaceIfA_get_varA(const Declarations* handle)
+{
+	return handle->ifaceIfA.varA;
+}
+void declarationsIfaceIfA_set_varA(Declarations* handle, sc_boolean value)
+{
+	handle->ifaceIfA.varA = value;
+}
+sc_integer declarationsIfaceIfA_get_varB(const Declarations* handle)
+{
+	return handle->ifaceIfA.varB;
+}
+void declarationsIfaceIfA_set_varB(Declarations* handle, sc_integer value)
+{
+	handle->ifaceIfA.varB = value;
+}
+sc_real declarationsIfaceIfA_get_varC(const Declarations* handle)
+{
+	return handle->ifaceIfA.varC;
+}
+void declarationsIfaceIfA_set_varC(Declarations* handle, sc_real value)
+{
+	handle->ifaceIfA.varC = value;
+}
+sc_string declarationsIfaceIfA_get_varD(const Declarations* handle)
+{
+	return handle->ifaceIfA.varD;
+}
+void declarationsIfaceIfA_set_varD(Declarations* handle, sc_string value)
+{
+	handle->ifaceIfA.varD = value;
+}
+sc_integer declarationsIfaceIfA_get_varE(const Declarations* handle)
+{
+	return handle->ifaceIfA.varE;
+}
+void declarationsIfaceIfA_set_varE(Declarations* handle, sc_integer value)
+{
+	handle->ifaceIfA.varE = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean declarations_check_main_region_A_tr0_tr0(const Declarations* handle)
+{
+	return handle->internal.evInA_raised;
+}
+
+static sc_boolean declarations_check_main_region_A_tr1_tr1(const Declarations* handle)
+{
+	return handle->internal.evInC_raised;
+}
+
+static sc_boolean declarations_check_main_region_B_tr0_tr0(const Declarations* handle)
+{
+	return handle->internal.evInB_raised;
+}
+
+static sc_boolean declarations_check_main_region_B_tr1_tr1(const Declarations* handle)
+{
+	return handle->internal.evInD_raised;
+}
+
+static sc_boolean declarations_check_main_region_B_tr2_tr2(const Declarations* handle)
+{
+	return handle->internal.evInE_raised;
+}
+
+static sc_boolean declarations_check_main_region_B_tr3_tr3(const Declarations* handle)
+{
+	return handle->internal.evInF_raised;
+}
+
+static void declarations_effect_main_region_A_tr0(Declarations* handle)
+{
+	declarations_exseq_main_region_A(handle);
+	declarations_enseq_main_region_B_default(handle);
+}
+
+static void declarations_effect_main_region_A_tr1(Declarations* handle)
+{
+	declarations_exseq_main_region_A(handle);
+	declarations_enseq_main_region_A_default(handle);
+}
+
+static void declarations_effect_main_region_B_tr0(Declarations* handle)
+{
+	declarations_exseq_main_region_B(handle);
+	declarations_enseq_main_region_A_default(handle);
+}
+
+static void declarations_effect_main_region_B_tr1(Declarations* handle)
+{
+	declarations_exseq_main_region_B(handle);
+	declarations_enseq_main_region_B_default(handle);
+}
+
+static void declarations_effect_main_region_B_tr2(Declarations* handle)
+{
+	declarations_exseq_main_region_B(handle);
+	declarations_enseq_main_region_B_default(handle);
+}
+
+static void declarations_effect_main_region_B_tr3(Declarations* handle)
+{
+	declarations_exseq_main_region_B(handle);
+	declarations_enseq_main_region_A_default(handle);
+}
+
+/* Entry action for state 'A'. */
+static void declarations_enact_main_region_A(Declarations* handle)
+{
+	/* Entry action for state 'A'. */
+	handle->internal.varInA = bool_false;
+	handle->internal.varInB = 1;
+	handle->internal.varInC = 1.1;
+	handle->internal.varInD = "blub";
+	handle->internal.varInE = 1;
+}
+
+/* 'default' enter sequence for state A */
+static void declarations_enseq_main_region_A_default(Declarations* handle)
+{
+	/* 'default' enter sequence for state A */
+	declarations_enact_main_region_A(handle);
+	handle->stateConfVector[0] = Declarations_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void declarations_enseq_main_region_B_default(Declarations* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = Declarations_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void declarations_enseq_main_region_default(Declarations* handle)
+{
+	/* 'default' enter sequence for region main region */
+	declarations_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void declarations_exseq_main_region_A(Declarations* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = Declarations_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void declarations_exseq_main_region_B(Declarations* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = Declarations_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void declarations_exseq_main_region(Declarations* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of Declarations.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case Declarations_main_region_A :
+		{
+			declarations_exseq_main_region_A(handle);
+			break;
+		}
+		case Declarations_main_region_B :
+		{
+			declarations_exseq_main_region_B(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void declarations_react_main_region_A(Declarations* handle)
+{
+	/* The reactions of state A. */
+	if (declarations_check_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		declarations_effect_main_region_A_tr0(handle);
+	}  else
+	{
+		if (declarations_check_main_region_A_tr1_tr1(handle) == bool_true)
+		{ 
+			declarations_effect_main_region_A_tr1(handle);
+		} 
+	}
+}
+
+/* The reactions of state B. */
+static void declarations_react_main_region_B(Declarations* handle)
+{
+	/* The reactions of state B. */
+	if (declarations_check_main_region_B_tr0_tr0(handle) == bool_true)
+	{ 
+		declarations_effect_main_region_B_tr0(handle);
+	}  else
+	{
+		if (declarations_check_main_region_B_tr1_tr1(handle) == bool_true)
+		{ 
+			declarations_effect_main_region_B_tr1(handle);
+		}  else
+		{
+			if (declarations_check_main_region_B_tr2_tr2(handle) == bool_true)
+			{ 
+				declarations_effect_main_region_B_tr2(handle);
+			}  else
+			{
+				if (declarations_check_main_region_B_tr3_tr3(handle) == bool_true)
+				{ 
+					declarations_effect_main_region_B_tr3(handle);
+				} 
+			}
+		}
+	}
+}
+
+/* Default react sequence for initial entry  */
+static void declarations_react_main_region__entry_Default(Declarations* handle)
+{
+	/* Default react sequence for initial entry  */
+	declarations_enseq_main_region_A_default(handle);
+}
+
+

+ 221 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/Declarations.h

@@ -0,0 +1,221 @@
+
+#ifndef DECLARATIONS_H_
+#define DECLARATIONS_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'Declarations'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	Declarations_main_region_A,
+	Declarations_main_region_B,
+	Declarations_last_state
+} DeclarationsStates;
+
+/*! Type definition of the data structure for the DeclarationsIface interface scope. */
+typedef struct
+{
+	sc_boolean evA_raised;
+	sc_boolean evB_raised;
+	sc_boolean evC_raised;
+	sc_boolean evC_value;
+	sc_boolean evD_raised;
+	sc_integer evD_value;
+	sc_boolean evE_raised;
+	sc_real evE_value;
+	sc_boolean evF_raised;
+	sc_string evF_value;
+	sc_boolean varA;
+	sc_integer varB;
+	sc_real varC;
+	sc_string varD;
+	sc_integer varE;
+} DeclarationsIface;
+
+/*! Type definition of the data structure for the DeclarationsIfaceIfA interface scope. */
+typedef struct
+{
+	sc_boolean evA_raised;
+	sc_boolean evB_raised;
+	sc_boolean evC_raised;
+	sc_boolean evC_value;
+	sc_boolean evD_raised;
+	sc_integer evD_value;
+	sc_boolean evE_raised;
+	sc_real evE_value;
+	sc_boolean evF_raised;
+	sc_string evF_value;
+	sc_boolean varA;
+	sc_integer varB;
+	sc_real varC;
+	sc_string varD;
+	sc_integer varE;
+} DeclarationsIfaceIfA;
+
+/*! Type definition of the data structure for the DeclarationsInternal interface scope. */
+typedef struct
+{
+	sc_boolean evInA_raised;
+	sc_boolean evInB_raised;
+	sc_boolean evInC_raised;
+	sc_boolean evInC_value;
+	sc_boolean evInD_raised;
+	sc_integer evInD_value;
+	sc_boolean evInE_raised;
+	sc_real evInE_value;
+	sc_boolean evInF_raised;
+	sc_string evInF_value;
+	sc_boolean varInA;
+	sc_integer varInB;
+	sc_real varInC;
+	sc_string varInD;
+	sc_integer varInE;
+} DeclarationsInternal;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define DECLARATIONS_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the Declarations state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	DeclarationsStates stateConfVector[DECLARATIONS_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	DeclarationsIface iface;
+	DeclarationsIfaceIfA ifaceIfA;
+	DeclarationsInternal internal;
+} Declarations;
+
+/*! Initializes the Declarations state machine data structures. Must be called before first usage.*/
+extern void declarations_init(Declarations* handle);
+
+/*! Activates the state machine */
+extern void declarations_enter(Declarations* handle);
+
+/*! Deactivates the state machine */
+extern void declarations_exit(Declarations* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void declarations_runCycle(Declarations* handle);
+
+
+/*! Raises the in event 'evA' that is defined in the default interface scope. */ 
+extern void declarationsIface_raise_evA(Declarations* handle);
+
+/*! Checks if the out event 'evB' that is defined in the default interface scope has been raised. */ 
+extern sc_boolean declarationsIface_israised_evB(const Declarations* handle);
+
+/*! Raises the in event 'evC' that is defined in the default interface scope. */ 
+extern void declarationsIface_raise_evC(Declarations* handle, sc_boolean value);
+
+/*! Checks if the out event 'evD' that is defined in the default interface scope has been raised. */ 
+extern sc_boolean declarationsIface_israised_evD(const Declarations* handle);
+
+/*! Gets the value of the out event 'evD' that is defined in the default interface scope. */ 
+extern sc_integer declarationsIface_get_evD_value(const Declarations* handle);
+
+/*! Raises the in event 'evE' that is defined in the default interface scope. */ 
+extern void declarationsIface_raise_evE(Declarations* handle, sc_real value);
+
+/*! Checks if the out event 'evF' that is defined in the default interface scope has been raised. */ 
+extern sc_boolean declarationsIface_israised_evF(const Declarations* handle);
+
+/*! Gets the value of the out event 'evF' that is defined in the default interface scope. */ 
+extern sc_string declarationsIface_get_evF_value(const Declarations* handle);
+
+/*! Gets the value of the variable 'varA' that is defined in the default interface scope. */ 
+extern sc_boolean declarationsIface_get_varA(const Declarations* handle);
+/*! Sets the value of the variable 'varA' that is defined in the default interface scope. */ 
+extern void declarationsIface_set_varA(Declarations* handle, sc_boolean value);
+/*! Gets the value of the variable 'varB' that is defined in the default interface scope. */ 
+extern sc_integer declarationsIface_get_varB(const Declarations* handle);
+/*! Sets the value of the variable 'varB' that is defined in the default interface scope. */ 
+extern void declarationsIface_set_varB(Declarations* handle, sc_integer value);
+/*! Gets the value of the variable 'varC' that is defined in the default interface scope. */ 
+extern sc_real declarationsIface_get_varC(const Declarations* handle);
+/*! Sets the value of the variable 'varC' that is defined in the default interface scope. */ 
+extern void declarationsIface_set_varC(Declarations* handle, sc_real value);
+/*! Gets the value of the variable 'varD' that is defined in the default interface scope. */ 
+extern sc_string declarationsIface_get_varD(const Declarations* handle);
+/*! Sets the value of the variable 'varD' that is defined in the default interface scope. */ 
+extern void declarationsIface_set_varD(Declarations* handle, sc_string value);
+/*! Gets the value of the variable 'varE' that is defined in the default interface scope. */ 
+extern sc_integer declarationsIface_get_varE(const Declarations* handle);
+/*! Sets the value of the variable 'varE' that is defined in the default interface scope. */ 
+extern void declarationsIface_set_varE(Declarations* handle, sc_integer value);
+/*! Raises the in event 'evA' that is defined in the interface scope 'ifA'. */ 
+extern void declarationsIfaceIfA_raise_evA(Declarations* handle);
+
+/*! Checks if the out event 'evB' that is defined in the interface scope 'ifA' has been raised. */ 
+extern sc_boolean declarationsIfaceIfA_israised_evB(const Declarations* handle);
+
+/*! Raises the in event 'evC' that is defined in the interface scope 'ifA'. */ 
+extern void declarationsIfaceIfA_raise_evC(Declarations* handle, sc_boolean value);
+
+/*! Checks if the out event 'evD' that is defined in the interface scope 'ifA' has been raised. */ 
+extern sc_boolean declarationsIfaceIfA_israised_evD(const Declarations* handle);
+
+/*! Gets the value of the out event 'evD' that is defined in the interface scope 'ifA'. */ 
+extern sc_integer declarationsIfaceIfA_get_evD_value(const Declarations* handle);
+
+/*! Raises the in event 'evE' that is defined in the interface scope 'ifA'. */ 
+extern void declarationsIfaceIfA_raise_evE(Declarations* handle, sc_real value);
+
+/*! Checks if the out event 'evF' that is defined in the interface scope 'ifA' has been raised. */ 
+extern sc_boolean declarationsIfaceIfA_israised_evF(const Declarations* handle);
+
+/*! Gets the value of the out event 'evF' that is defined in the interface scope 'ifA'. */ 
+extern sc_string declarationsIfaceIfA_get_evF_value(const Declarations* handle);
+
+/*! Gets the value of the variable 'varA' that is defined in the interface scope 'ifA'. */ 
+extern sc_boolean declarationsIfaceIfA_get_varA(const Declarations* handle);
+/*! Sets the value of the variable 'varA' that is defined in the interface scope 'ifA'. */ 
+extern void declarationsIfaceIfA_set_varA(Declarations* handle, sc_boolean value);
+/*! Gets the value of the variable 'varB' that is defined in the interface scope 'ifA'. */ 
+extern sc_integer declarationsIfaceIfA_get_varB(const Declarations* handle);
+/*! Sets the value of the variable 'varB' that is defined in the interface scope 'ifA'. */ 
+extern void declarationsIfaceIfA_set_varB(Declarations* handle, sc_integer value);
+/*! Gets the value of the variable 'varC' that is defined in the interface scope 'ifA'. */ 
+extern sc_real declarationsIfaceIfA_get_varC(const Declarations* handle);
+/*! Sets the value of the variable 'varC' that is defined in the interface scope 'ifA'. */ 
+extern void declarationsIfaceIfA_set_varC(Declarations* handle, sc_real value);
+/*! Gets the value of the variable 'varD' that is defined in the interface scope 'ifA'. */ 
+extern sc_string declarationsIfaceIfA_get_varD(const Declarations* handle);
+/*! Sets the value of the variable 'varD' that is defined in the interface scope 'ifA'. */ 
+extern void declarationsIfaceIfA_set_varD(Declarations* handle, sc_string value);
+/*! Gets the value of the variable 'varE' that is defined in the interface scope 'ifA'. */ 
+extern sc_integer declarationsIfaceIfA_get_varE(const Declarations* handle);
+/*! Sets the value of the variable 'varE' that is defined in the interface scope 'ifA'. */ 
+extern void declarationsIfaceIfA_set_varE(Declarations* handle, sc_integer value);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean declarations_isActive(const Declarations* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean declarations_isFinal(const Declarations* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean declarations_isStateActive(const Declarations* handle, DeclarationsStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* DECLARATIONS_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/Declarations.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart Declarations {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/DeclarationsTest"
+			targetProject = "gtests"
+			targetFolder = "DeclarationsTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 807 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/DeepEntry.c

@@ -0,0 +1,807 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "DeepEntry.h"
+/*! \file Implementation of the state machine 'DeepEntry'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean deepEntry_check_r2_B_tr0_tr0(const DeepEntry* handle);
+static sc_boolean deepEntry_check_r2_B_r_BA_tr0_tr0(const DeepEntry* handle);
+static sc_boolean deepEntry_check_r2_C_tr0_tr0(const DeepEntry* handle);
+static void deepEntry_effect_r2_B_tr0(DeepEntry* handle);
+static void deepEntry_effect_r2_B_r_BA_tr0(DeepEntry* handle);
+static void deepEntry_effect_r2_C_tr0(DeepEntry* handle);
+static void deepEntry_enact_r_A(DeepEntry* handle);
+static void deepEntry_enact_r2_B_r_BA(DeepEntry* handle);
+static void deepEntry_enact_r3_D(DeepEntry* handle);
+static void deepEntry_enact_r3_D_r_DA(DeepEntry* handle);
+static void deepEntry_enseq_r_A_r_B_default(DeepEntry* handle);
+static void deepEntry_enseq_r2_B_default(DeepEntry* handle);
+static void deepEntry_enseq_r2_B_r_BA_default(DeepEntry* handle);
+static void deepEntry_enseq_r2_B_r_BA_r_BAA_default(DeepEntry* handle);
+static void deepEntry_enseq_r2_B_r_BB_default(DeepEntry* handle);
+static void deepEntry_enseq_r2_C_default(DeepEntry* handle);
+static void deepEntry_enseq_r3_D_r_DA_r_DAA_default(DeepEntry* handle);
+static void deepEntry_enseq_r_default(DeepEntry* handle);
+static void deepEntry_enseq_r2_default(DeepEntry* handle);
+static void deepEntry_enseq_r2_B_r_default(DeepEntry* handle);
+static void deepEntry_shenseq_r2_B_r(DeepEntry* handle);
+static void deepEntry_enseq_r2_B_r_BA_r_default(DeepEntry* handle);
+static void deepEntry_enseq_r3_default(DeepEntry* handle);
+static void deepEntry_dhenseq_r3(DeepEntry* handle);
+static void deepEntry_dhenseq_r3_D_r(DeepEntry* handle);
+static void deepEntry_dhenseq_r3_D_r_DA_r(DeepEntry* handle);
+static void deepEntry_exseq_r_A_r_B(DeepEntry* handle);
+static void deepEntry_exseq_r2_B(DeepEntry* handle);
+static void deepEntry_exseq_r2_B_r_BA(DeepEntry* handle);
+static void deepEntry_exseq_r2_B_r_BA_r_BAA(DeepEntry* handle);
+static void deepEntry_exseq_r2_B_r_BB(DeepEntry* handle);
+static void deepEntry_exseq_r2_C(DeepEntry* handle);
+static void deepEntry_exseq_r3_D_r_DA_r_DAA(DeepEntry* handle);
+static void deepEntry_exseq_r(DeepEntry* handle);
+static void deepEntry_exseq_r_A_r(DeepEntry* handle);
+static void deepEntry_exseq_r2(DeepEntry* handle);
+static void deepEntry_exseq_r2_B_r(DeepEntry* handle);
+static void deepEntry_exseq_r2_B_r_BA_r(DeepEntry* handle);
+static void deepEntry_exseq_r3(DeepEntry* handle);
+static void deepEntry_exseq_r3_D_r(DeepEntry* handle);
+static void deepEntry_exseq_r3_D_r_DA_r(DeepEntry* handle);
+static void deepEntry_react_r_A_r_B(DeepEntry* handle);
+static void deepEntry_react_r2_B_r_BA_r_BAA(DeepEntry* handle);
+static void deepEntry_react_r2_B_r_BB(DeepEntry* handle);
+static void deepEntry_react_r2_C(DeepEntry* handle);
+static void deepEntry_react_r3_D_r_DA_r_DAA(DeepEntry* handle);
+static void deepEntry_react_r__entry_Default(DeepEntry* handle);
+static void deepEntry_react_r2_B_r__entry_Default(DeepEntry* handle);
+static void deepEntry_react_r2_B_r_BA_r__entry_Default(DeepEntry* handle);
+static void deepEntry_react_r2__entry_Default(DeepEntry* handle);
+static void deepEntry_react_r3__entry_Default(DeepEntry* handle);
+static void deepEntry_clearInEvents(DeepEntry* handle);
+static void deepEntry_clearOutEvents(DeepEntry* handle);
+
+
+void deepEntry_init(DeepEntry* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < DEEPENTRY_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = DeepEntry_last_state;
+	}
+	
+	for (i = 0; i < DEEPENTRY_MAX_HISTORY_STATES; ++i)
+	{
+		handle->historyVector[i] = DeepEntry_last_state;
+	}
+	
+	handle->stateConfVectorPosition = 0;
+
+	deepEntry_clearInEvents(handle);
+	deepEntry_clearOutEvents(handle);
+
+	/* Default init sequence for statechart DeepEntry */
+	handle->iface.x = 0;
+	handle->iface.y = 0;
+	handle->iface.z = 0;
+
+}
+
+void deepEntry_enter(DeepEntry* handle)
+{
+	/* Default enter sequence for statechart DeepEntry */
+	deepEntry_enseq_r_default(handle);
+	deepEntry_enseq_r2_default(handle);
+	deepEntry_enseq_r3_default(handle);
+}
+
+void deepEntry_exit(DeepEntry* handle)
+{
+	/* Default exit sequence for statechart DeepEntry */
+	deepEntry_exseq_r(handle);
+	deepEntry_exseq_r2(handle);
+	deepEntry_exseq_r3(handle);
+}
+
+sc_boolean deepEntry_isActive(const DeepEntry* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != DeepEntry_last_state || handle->stateConfVector[1] != DeepEntry_last_state || handle->stateConfVector[2] != DeepEntry_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean deepEntry_isFinal(const DeepEntry* handle)
+{
+   return bool_false;
+}
+
+static void deepEntry_clearInEvents(DeepEntry* handle)
+{
+	handle->iface.e_raised = bool_false;
+	handle->iface.f_raised = bool_false;
+}
+
+static void deepEntry_clearOutEvents(DeepEntry* handle)
+{
+}
+
+void deepEntry_runCycle(DeepEntry* handle)
+{
+	
+	deepEntry_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < DEEPENTRY_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case DeepEntry_r_A_r_B :
+		{
+			deepEntry_react_r_A_r_B(handle);
+			break;
+		}
+		case DeepEntry_r2_B_r_BA_r_BAA :
+		{
+			deepEntry_react_r2_B_r_BA_r_BAA(handle);
+			break;
+		}
+		case DeepEntry_r2_B_r_BB :
+		{
+			deepEntry_react_r2_B_r_BB(handle);
+			break;
+		}
+		case DeepEntry_r2_C :
+		{
+			deepEntry_react_r2_C(handle);
+			break;
+		}
+		case DeepEntry_r3_D_r_DA_r_DAA :
+		{
+			deepEntry_react_r3_D_r_DA_r_DAA(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	deepEntry_clearInEvents(handle);
+}
+
+
+sc_boolean deepEntry_isStateActive(const DeepEntry* handle, DeepEntryStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case DeepEntry_r_A :
+			result = (sc_boolean) (handle->stateConfVector[0] >= DeepEntry_r_A
+				&& handle->stateConfVector[0] <= DeepEntry_r_A_r_B);
+			break;
+		case DeepEntry_r_A_r_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == DeepEntry_r_A_r_B
+			);
+			break;
+		case DeepEntry_r2_B :
+			result = (sc_boolean) (handle->stateConfVector[1] >= DeepEntry_r2_B
+				&& handle->stateConfVector[1] <= DeepEntry_r2_B_r_BB);
+			break;
+		case DeepEntry_r2_B_r_BA :
+			result = (sc_boolean) (handle->stateConfVector[1] >= DeepEntry_r2_B_r_BA
+				&& handle->stateConfVector[1] <= DeepEntry_r2_B_r_BA_r_BAA);
+			break;
+		case DeepEntry_r2_B_r_BA_r_BAA :
+			result = (sc_boolean) (handle->stateConfVector[1] == DeepEntry_r2_B_r_BA_r_BAA
+			);
+			break;
+		case DeepEntry_r2_B_r_BB :
+			result = (sc_boolean) (handle->stateConfVector[1] == DeepEntry_r2_B_r_BB
+			);
+			break;
+		case DeepEntry_r2_C :
+			result = (sc_boolean) (handle->stateConfVector[1] == DeepEntry_r2_C
+			);
+			break;
+		case DeepEntry_r3_D :
+			result = (sc_boolean) (handle->stateConfVector[2] >= DeepEntry_r3_D
+				&& handle->stateConfVector[2] <= DeepEntry_r3_D_r_DA_r_DAA);
+			break;
+		case DeepEntry_r3_D_r_DA :
+			result = (sc_boolean) (handle->stateConfVector[2] >= DeepEntry_r3_D_r_DA
+				&& handle->stateConfVector[2] <= DeepEntry_r3_D_r_DA_r_DAA);
+			break;
+		case DeepEntry_r3_D_r_DA_r_DAA :
+			result = (sc_boolean) (handle->stateConfVector[2] == DeepEntry_r3_D_r_DA_r_DAA
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void deepEntryIface_raise_e(DeepEntry* handle)
+{
+	handle->iface.e_raised = bool_true;
+}
+void deepEntryIface_raise_f(DeepEntry* handle)
+{
+	handle->iface.f_raised = bool_true;
+}
+
+
+sc_integer deepEntryIface_get_x(const DeepEntry* handle)
+{
+	return handle->iface.x;
+}
+void deepEntryIface_set_x(DeepEntry* handle, sc_integer value)
+{
+	handle->iface.x = value;
+}
+sc_integer deepEntryIface_get_y(const DeepEntry* handle)
+{
+	return handle->iface.y;
+}
+void deepEntryIface_set_y(DeepEntry* handle, sc_integer value)
+{
+	handle->iface.y = value;
+}
+sc_integer deepEntryIface_get_z(const DeepEntry* handle)
+{
+	return handle->iface.z;
+}
+void deepEntryIface_set_z(DeepEntry* handle, sc_integer value)
+{
+	handle->iface.z = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean deepEntry_check_r2_B_tr0_tr0(const DeepEntry* handle)
+{
+	return handle->iface.f_raised;
+}
+
+static sc_boolean deepEntry_check_r2_B_r_BA_tr0_tr0(const DeepEntry* handle)
+{
+	return handle->iface.e_raised;
+}
+
+static sc_boolean deepEntry_check_r2_C_tr0_tr0(const DeepEntry* handle)
+{
+	return handle->iface.f_raised;
+}
+
+static void deepEntry_effect_r2_B_tr0(DeepEntry* handle)
+{
+	deepEntry_exseq_r2_B(handle);
+	deepEntry_enseq_r2_C_default(handle);
+}
+
+static void deepEntry_effect_r2_B_r_BA_tr0(DeepEntry* handle)
+{
+	deepEntry_exseq_r2_B_r_BA(handle);
+	deepEntry_enseq_r2_B_r_BB_default(handle);
+}
+
+static void deepEntry_effect_r2_C_tr0(DeepEntry* handle)
+{
+	deepEntry_exseq_r2_C(handle);
+	deepEntry_enseq_r2_B_default(handle);
+}
+
+/* Entry action for state 'A'. */
+static void deepEntry_enact_r_A(DeepEntry* handle)
+{
+	/* Entry action for state 'A'. */
+	handle->iface.x += 1;
+}
+
+/* Entry action for state 'BA'. */
+static void deepEntry_enact_r2_B_r_BA(DeepEntry* handle)
+{
+	/* Entry action for state 'BA'. */
+	handle->iface.y += 1;
+}
+
+/* Entry action for state 'D'. */
+static void deepEntry_enact_r3_D(DeepEntry* handle)
+{
+	/* Entry action for state 'D'. */
+	handle->iface.z += 1;
+}
+
+/* Entry action for state 'DA'. */
+static void deepEntry_enact_r3_D_r_DA(DeepEntry* handle)
+{
+	/* Entry action for state 'DA'. */
+	handle->iface.z += 1;
+}
+
+/* 'default' enter sequence for state B */
+static void deepEntry_enseq_r_A_r_B_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = DeepEntry_r_A_r_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void deepEntry_enseq_r2_B_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for state B */
+	deepEntry_enseq_r2_B_r_default(handle);
+}
+
+/* 'default' enter sequence for state BA */
+static void deepEntry_enseq_r2_B_r_BA_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for state BA */
+	deepEntry_enact_r2_B_r_BA(handle);
+	deepEntry_enseq_r2_B_r_BA_r_default(handle);
+	handle->historyVector[0] = handle->stateConfVector[1];
+}
+
+/* 'default' enter sequence for state BAA */
+static void deepEntry_enseq_r2_B_r_BA_r_BAA_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for state BAA */
+	handle->stateConfVector[1] = DeepEntry_r2_B_r_BA_r_BAA;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* 'default' enter sequence for state BB */
+static void deepEntry_enseq_r2_B_r_BB_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for state BB */
+	handle->stateConfVector[1] = DeepEntry_r2_B_r_BB;
+	handle->stateConfVectorPosition = 1;
+	handle->historyVector[0] = handle->stateConfVector[1];
+}
+
+/* 'default' enter sequence for state C */
+static void deepEntry_enseq_r2_C_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for state C */
+	handle->stateConfVector[1] = DeepEntry_r2_C;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* 'default' enter sequence for state DAA */
+static void deepEntry_enseq_r3_D_r_DA_r_DAA_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for state DAA */
+	handle->stateConfVector[2] = DeepEntry_r3_D_r_DA_r_DAA;
+	handle->stateConfVectorPosition = 2;
+	handle->historyVector[3] = handle->stateConfVector[2];
+}
+
+/* 'default' enter sequence for region r */
+static void deepEntry_enseq_r_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for region r */
+	deepEntry_react_r__entry_Default(handle);
+}
+
+/* 'default' enter sequence for region r2 */
+static void deepEntry_enseq_r2_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for region r2 */
+	deepEntry_react_r2__entry_Default(handle);
+}
+
+/* 'default' enter sequence for region r */
+static void deepEntry_enseq_r2_B_r_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for region r */
+	deepEntry_react_r2_B_r__entry_Default(handle);
+}
+
+/* shallow enterSequence with history in child r */
+static void deepEntry_shenseq_r2_B_r(DeepEntry* handle)
+{
+	/* shallow enterSequence with history in child r */
+	/* Handle shallow history entry of r */
+	switch(handle->historyVector[ 0 ])
+	{
+		case DeepEntry_r2_B_r_BA_r_BAA :
+		{
+			deepEntry_enseq_r2_B_r_BA_default(handle);
+			break;
+		}
+		case DeepEntry_r2_B_r_BB :
+		{
+			deepEntry_enseq_r2_B_r_BB_default(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* 'default' enter sequence for region r */
+static void deepEntry_enseq_r2_B_r_BA_r_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for region r */
+	deepEntry_react_r2_B_r_BA_r__entry_Default(handle);
+}
+
+/* 'default' enter sequence for region r3 */
+static void deepEntry_enseq_r3_default(DeepEntry* handle)
+{
+	/* 'default' enter sequence for region r3 */
+	deepEntry_react_r3__entry_Default(handle);
+}
+
+/* deep enterSequence with history in child r3 */
+static void deepEntry_dhenseq_r3(DeepEntry* handle)
+{
+	/* deep enterSequence with history in child r3 */
+	/* Handle deep history entry of r3 */
+	switch(handle->historyVector[ 1 ])
+	{
+		case DeepEntry_r3_D_r_DA_r_DAA :
+		{
+			/* enterSequence with history in child D for leaf DAA */
+			deepEntry_enact_r3_D(handle);
+			deepEntry_dhenseq_r3_D_r(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* deep enterSequence with history in child r */
+static void deepEntry_dhenseq_r3_D_r(DeepEntry* handle)
+{
+	/* deep enterSequence with history in child r */
+	/* Handle deep history entry of r */
+	switch(handle->historyVector[ 2 ])
+	{
+		case DeepEntry_r3_D_r_DA_r_DAA :
+		{
+			/* enterSequence with history in child DA for leaf DAA */
+			deepEntry_enact_r3_D_r_DA(handle);
+			deepEntry_dhenseq_r3_D_r_DA_r(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* deep enterSequence with history in child r */
+static void deepEntry_dhenseq_r3_D_r_DA_r(DeepEntry* handle)
+{
+	/* deep enterSequence with history in child r */
+	/* Handle deep history entry of r */
+	switch(handle->historyVector[ 3 ])
+	{
+		case DeepEntry_r3_D_r_DA_r_DAA :
+		{
+			/* enterSequence with history in child DAA for leaf DAA */
+			deepEntry_enseq_r3_D_r_DA_r_DAA_default(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for state B */
+static void deepEntry_exseq_r_A_r_B(DeepEntry* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = DeepEntry_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void deepEntry_exseq_r2_B(DeepEntry* handle)
+{
+	/* Default exit sequence for state B */
+	deepEntry_exseq_r2_B_r(handle);
+}
+
+/* Default exit sequence for state BA */
+static void deepEntry_exseq_r2_B_r_BA(DeepEntry* handle)
+{
+	/* Default exit sequence for state BA */
+	deepEntry_exseq_r2_B_r_BA_r(handle);
+}
+
+/* Default exit sequence for state BAA */
+static void deepEntry_exseq_r2_B_r_BA_r_BAA(DeepEntry* handle)
+{
+	/* Default exit sequence for state BAA */
+	handle->stateConfVector[1] = DeepEntry_last_state;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* Default exit sequence for state BB */
+static void deepEntry_exseq_r2_B_r_BB(DeepEntry* handle)
+{
+	/* Default exit sequence for state BB */
+	handle->stateConfVector[1] = DeepEntry_last_state;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* Default exit sequence for state C */
+static void deepEntry_exseq_r2_C(DeepEntry* handle)
+{
+	/* Default exit sequence for state C */
+	handle->stateConfVector[1] = DeepEntry_last_state;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* Default exit sequence for state DAA */
+static void deepEntry_exseq_r3_D_r_DA_r_DAA(DeepEntry* handle)
+{
+	/* Default exit sequence for state DAA */
+	handle->stateConfVector[2] = DeepEntry_last_state;
+	handle->stateConfVectorPosition = 2;
+}
+
+/* Default exit sequence for region r */
+static void deepEntry_exseq_r(DeepEntry* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of DeepEntry.r) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case DeepEntry_r_A_r_B :
+		{
+			deepEntry_exseq_r_A_r_B(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r */
+static void deepEntry_exseq_r_A_r(DeepEntry* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of DeepEntry.r.A.r) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case DeepEntry_r_A_r_B :
+		{
+			deepEntry_exseq_r_A_r_B(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r2 */
+static void deepEntry_exseq_r2(DeepEntry* handle)
+{
+	/* Default exit sequence for region r2 */
+	/* Handle exit of all possible states (of DeepEntry.r2) at position 1... */
+	switch(handle->stateConfVector[ 1 ])
+	{
+		case DeepEntry_r2_B_r_BA_r_BAA :
+		{
+			deepEntry_exseq_r2_B_r_BA_r_BAA(handle);
+			break;
+		}
+		case DeepEntry_r2_B_r_BB :
+		{
+			deepEntry_exseq_r2_B_r_BB(handle);
+			break;
+		}
+		case DeepEntry_r2_C :
+		{
+			deepEntry_exseq_r2_C(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r */
+static void deepEntry_exseq_r2_B_r(DeepEntry* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of DeepEntry.r2.B.r) at position 1... */
+	switch(handle->stateConfVector[ 1 ])
+	{
+		case DeepEntry_r2_B_r_BA_r_BAA :
+		{
+			deepEntry_exseq_r2_B_r_BA_r_BAA(handle);
+			break;
+		}
+		case DeepEntry_r2_B_r_BB :
+		{
+			deepEntry_exseq_r2_B_r_BB(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r */
+static void deepEntry_exseq_r2_B_r_BA_r(DeepEntry* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of DeepEntry.r2.B.r.BA.r) at position 1... */
+	switch(handle->stateConfVector[ 1 ])
+	{
+		case DeepEntry_r2_B_r_BA_r_BAA :
+		{
+			deepEntry_exseq_r2_B_r_BA_r_BAA(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r3 */
+static void deepEntry_exseq_r3(DeepEntry* handle)
+{
+	/* Default exit sequence for region r3 */
+	/* Handle exit of all possible states (of DeepEntry.r3) at position 2... */
+	switch(handle->stateConfVector[ 2 ])
+	{
+		case DeepEntry_r3_D_r_DA_r_DAA :
+		{
+			deepEntry_exseq_r3_D_r_DA_r_DAA(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r */
+static void deepEntry_exseq_r3_D_r(DeepEntry* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of DeepEntry.r3.D.r) at position 2... */
+	switch(handle->stateConfVector[ 2 ])
+	{
+		case DeepEntry_r3_D_r_DA_r_DAA :
+		{
+			deepEntry_exseq_r3_D_r_DA_r_DAA(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r */
+static void deepEntry_exseq_r3_D_r_DA_r(DeepEntry* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of DeepEntry.r3.D.r.DA.r) at position 2... */
+	switch(handle->stateConfVector[ 2 ])
+	{
+		case DeepEntry_r3_D_r_DA_r_DAA :
+		{
+			deepEntry_exseq_r3_D_r_DA_r_DAA(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state B. */
+static void deepEntry_react_r_A_r_B(DeepEntry* handle)
+{
+	/* The reactions of state B. */
+}
+
+/* The reactions of state BAA. */
+static void deepEntry_react_r2_B_r_BA_r_BAA(DeepEntry* handle)
+{
+	/* The reactions of state BAA. */
+	if (deepEntry_check_r2_B_tr0_tr0(handle) == bool_true)
+	{ 
+		deepEntry_effect_r2_B_tr0(handle);
+	}  else
+	{
+		if (deepEntry_check_r2_B_r_BA_tr0_tr0(handle) == bool_true)
+		{ 
+			deepEntry_effect_r2_B_r_BA_tr0(handle);
+		}  else
+		{
+		}
+	}
+}
+
+/* The reactions of state BB. */
+static void deepEntry_react_r2_B_r_BB(DeepEntry* handle)
+{
+	/* The reactions of state BB. */
+	if (deepEntry_check_r2_B_tr0_tr0(handle) == bool_true)
+	{ 
+		deepEntry_effect_r2_B_tr0(handle);
+	}  else
+	{
+	}
+}
+
+/* The reactions of state C. */
+static void deepEntry_react_r2_C(DeepEntry* handle)
+{
+	/* The reactions of state C. */
+	if (deepEntry_check_r2_C_tr0_tr0(handle) == bool_true)
+	{ 
+		deepEntry_effect_r2_C_tr0(handle);
+	} 
+}
+
+/* The reactions of state DAA. */
+static void deepEntry_react_r3_D_r_DA_r_DAA(DeepEntry* handle)
+{
+	/* The reactions of state DAA. */
+}
+
+/* Default react sequence for initial entry  */
+static void deepEntry_react_r__entry_Default(DeepEntry* handle)
+{
+	/* Default react sequence for initial entry  */
+	deepEntry_enact_r_A(handle);
+	deepEntry_enseq_r_A_r_B_default(handle);
+}
+
+/* Default react sequence for shallow history entry  */
+static void deepEntry_react_r2_B_r__entry_Default(DeepEntry* handle)
+{
+	/* Default react sequence for shallow history entry  */
+	/* Enter the region with shallow history */
+	if (handle->historyVector[0] != DeepEntry_last_state)
+	{
+		deepEntry_shenseq_r2_B_r(handle);
+	} else
+	{
+		deepEntry_enact_r2_B_r_BA(handle);
+		deepEntry_enseq_r2_B_r_BA_r_BAA_default(handle);
+		handle->historyVector[0] = handle->stateConfVector[1];
+	} 
+}
+
+/* Default react sequence for initial entry  */
+static void deepEntry_react_r2_B_r_BA_r__entry_Default(DeepEntry* handle)
+{
+	/* Default react sequence for initial entry  */
+	deepEntry_enseq_r2_B_r_BA_r_BAA_default(handle);
+}
+
+/* Default react sequence for initial entry  */
+static void deepEntry_react_r2__entry_Default(DeepEntry* handle)
+{
+	/* Default react sequence for initial entry  */
+	deepEntry_enseq_r2_B_default(handle);
+}
+
+/* Default react sequence for deep history entry  */
+static void deepEntry_react_r3__entry_Default(DeepEntry* handle)
+{
+	/* Default react sequence for deep history entry  */
+	/* Enter the region with deep history */
+	if (handle->historyVector[1] != DeepEntry_last_state)
+	{
+		deepEntry_dhenseq_r3(handle);
+	} else
+	{
+		deepEntry_enact_r3_D(handle);
+		deepEntry_enact_r3_D_r_DA(handle);
+		deepEntry_enseq_r3_D_r_DA_r_DAA_default(handle);
+		handle->historyVector[2] = handle->stateConfVector[2];
+		handle->historyVector[1] = handle->stateConfVector[2];
+	} 
+}
+
+

+ 110 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/DeepEntry.h

@@ -0,0 +1,110 @@
+
+#ifndef DEEPENTRY_H_
+#define DEEPENTRY_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'DeepEntry'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	DeepEntry_r_A,
+	DeepEntry_r_A_r_B,
+	DeepEntry_r2_B,
+	DeepEntry_r2_B_r_BA,
+	DeepEntry_r2_B_r_BA_r_BAA,
+	DeepEntry_r2_B_r_BB,
+	DeepEntry_r2_C,
+	DeepEntry_r3_D,
+	DeepEntry_r3_D_r_DA,
+	DeepEntry_r3_D_r_DA_r_DAA,
+	DeepEntry_last_state
+} DeepEntryStates;
+
+/*! Type definition of the data structure for the DeepEntryIface interface scope. */
+typedef struct
+{
+	sc_integer x;
+	sc_integer y;
+	sc_integer z;
+	sc_boolean e_raised;
+	sc_boolean f_raised;
+} DeepEntryIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define DEEPENTRY_MAX_ORTHOGONAL_STATES 3
+	/*! Define dimension of the state configuration vector for history states. */
+#define DEEPENTRY_MAX_HISTORY_STATES 4
+
+/*! 
+ * Type definition of the data structure for the DeepEntry state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	DeepEntryStates stateConfVector[DEEPENTRY_MAX_ORTHOGONAL_STATES];
+	DeepEntryStates historyVector[DEEPENTRY_MAX_HISTORY_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	DeepEntryIface iface;
+} DeepEntry;
+
+/*! Initializes the DeepEntry state machine data structures. Must be called before first usage.*/
+extern void deepEntry_init(DeepEntry* handle);
+
+/*! Activates the state machine */
+extern void deepEntry_enter(DeepEntry* handle);
+
+/*! Deactivates the state machine */
+extern void deepEntry_exit(DeepEntry* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void deepEntry_runCycle(DeepEntry* handle);
+
+
+/*! Gets the value of the variable 'x' that is defined in the default interface scope. */ 
+extern sc_integer deepEntryIface_get_x(const DeepEntry* handle);
+/*! Sets the value of the variable 'x' that is defined in the default interface scope. */ 
+extern void deepEntryIface_set_x(DeepEntry* handle, sc_integer value);
+/*! Gets the value of the variable 'y' that is defined in the default interface scope. */ 
+extern sc_integer deepEntryIface_get_y(const DeepEntry* handle);
+/*! Sets the value of the variable 'y' that is defined in the default interface scope. */ 
+extern void deepEntryIface_set_y(DeepEntry* handle, sc_integer value);
+/*! Gets the value of the variable 'z' that is defined in the default interface scope. */ 
+extern sc_integer deepEntryIface_get_z(const DeepEntry* handle);
+/*! Sets the value of the variable 'z' that is defined in the default interface scope. */ 
+extern void deepEntryIface_set_z(DeepEntry* handle, sc_integer value);
+/*! Raises the in event 'e' that is defined in the default interface scope. */ 
+extern void deepEntryIface_raise_e(DeepEntry* handle);
+
+/*! Raises the in event 'f' that is defined in the default interface scope. */ 
+extern void deepEntryIface_raise_f(DeepEntry* handle);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean deepEntry_isActive(const DeepEntry* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean deepEntry_isFinal(const DeepEntry* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean deepEntry_isStateActive(const DeepEntry* handle, DeepEntryStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* DEEPENTRY_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/DeepEntry.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart DeepEntry {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/DeepEntryTest"
+			targetProject = "gtests"
+			targetFolder = "DeepEntryTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 911 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/DeepHistory.c

@@ -0,0 +1,911 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "DeepHistory.h"
+/*! \file Implementation of the state machine 'DeepHistory'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean deepHistory_check_mainRegion_State1_tr0_tr0(const DeepHistory* handle);
+static sc_boolean deepHistory_check_mainRegion_State2_tr0_tr0(const DeepHistory* handle);
+static sc_boolean deepHistory_check_mainRegion_State2__region0_a_tr0_tr0(const DeepHistory* handle);
+static sc_boolean deepHistory_check_mainRegion_State2__region0_State4_tr0_tr0(const DeepHistory* handle);
+static sc_boolean deepHistory_check_mainRegion_State2__region0_State4__region0_State6_tr0_tr0(const DeepHistory* handle);
+static sc_boolean deepHistory_check_mainRegion_State2__region0_State4__region0_State7_tr0_tr0(const DeepHistory* handle);
+static sc_boolean deepHistory_check_mainRegion_State2__region0_State4__region0_State7__region0_State8_tr0_tr0(const DeepHistory* handle);
+static sc_boolean deepHistory_check_mainRegion_State2__region0_State4__region0_State7__region0_State9_tr0_tr0(const DeepHistory* handle);
+static void deepHistory_effect_mainRegion_State1_tr0(DeepHistory* handle);
+static void deepHistory_effect_mainRegion_State2_tr0(DeepHistory* handle);
+static void deepHistory_effect_mainRegion_State2__region0_a_tr0(DeepHistory* handle);
+static void deepHistory_effect_mainRegion_State2__region0_State4_tr0(DeepHistory* handle);
+static void deepHistory_effect_mainRegion_State2__region0_State4__region0_State6_tr0(DeepHistory* handle);
+static void deepHistory_effect_mainRegion_State2__region0_State4__region0_State7_tr0(DeepHistory* handle);
+static void deepHistory_effect_mainRegion_State2__region0_State4__region0_State7__region0_State8_tr0(DeepHistory* handle);
+static void deepHistory_effect_mainRegion_State2__region0_State4__region0_State7__region0_State9_tr0(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State1_default(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2_default(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2__region0_a_default(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2__region0_State4_default(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_State6_default(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7_default(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_State8_default(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_State9_default(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2__region0_State5_default(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_default(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2__region0_default(DeepHistory* handle);
+static void deepHistory_dhenseq_mainRegion_State2__region0(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_default(DeepHistory* handle);
+static void deepHistory_dhenseq_mainRegion_State2__region0_State4__region0(DeepHistory* handle);
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_default(DeepHistory* handle);
+static void deepHistory_dhenseq_mainRegion_State2__region0_State4__region0_State7__region0(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State1(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2__region0_a(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2__region0_State4(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0_State6(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State8(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State9(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2__region0_State5(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2__region0(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0(DeepHistory* handle);
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0(DeepHistory* handle);
+static void deepHistory_react_mainRegion_State1(DeepHistory* handle);
+static void deepHistory_react_mainRegion_State2__region0_a(DeepHistory* handle);
+static void deepHistory_react_mainRegion_State2__region0_State4__region0_State6(DeepHistory* handle);
+static void deepHistory_react_mainRegion_State2__region0_State4__region0_State7__region0_State8(DeepHistory* handle);
+static void deepHistory_react_mainRegion_State2__region0_State4__region0_State7__region0_State9(DeepHistory* handle);
+static void deepHistory_react_mainRegion_State2__region0_State5(DeepHistory* handle);
+static void deepHistory_react_mainRegion__entry_Default(DeepHistory* handle);
+static void deepHistory_react_mainRegion_State2__region0_State4__region0__entry_Default(DeepHistory* handle);
+static void deepHistory_react_mainRegion_State2__region0_State4__region0_State7__region0__entry_Default(DeepHistory* handle);
+static void deepHistory_react_mainRegion_State2__region0__entry_Default(DeepHistory* handle);
+static void deepHistory_clearInEvents(DeepHistory* handle);
+static void deepHistory_clearOutEvents(DeepHistory* handle);
+
+
+void deepHistory_init(DeepHistory* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < DEEPHISTORY_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = DeepHistory_last_state;
+	}
+	
+	for (i = 0; i < DEEPHISTORY_MAX_HISTORY_STATES; ++i)
+	{
+		handle->historyVector[i] = DeepHistory_last_state;
+	}
+	
+	handle->stateConfVectorPosition = 0;
+
+	deepHistory_clearInEvents(handle);
+	deepHistory_clearOutEvents(handle);
+
+
+}
+
+void deepHistory_enter(DeepHistory* handle)
+{
+	/* Default enter sequence for statechart DeepHistory */
+	deepHistory_enseq_mainRegion_default(handle);
+}
+
+void deepHistory_exit(DeepHistory* handle)
+{
+	/* Default exit sequence for statechart DeepHistory */
+	deepHistory_exseq_mainRegion(handle);
+}
+
+sc_boolean deepHistory_isActive(const DeepHistory* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != DeepHistory_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean deepHistory_isFinal(const DeepHistory* handle)
+{
+   return bool_false;
+}
+
+static void deepHistory_clearInEvents(DeepHistory* handle)
+{
+	handle->iface.event1_raised = bool_false;
+	handle->iface.event2_raised = bool_false;
+	handle->iface.event3_raised = bool_false;
+	handle->iface.event4_raised = bool_false;
+	handle->iface.event5_raised = bool_false;
+	handle->iface.event6_raised = bool_false;
+	handle->iface.event7_raised = bool_false;
+	handle->iface.event8_raised = bool_false;
+	handle->iface.event9_raised = bool_false;
+}
+
+static void deepHistory_clearOutEvents(DeepHistory* handle)
+{
+}
+
+void deepHistory_runCycle(DeepHistory* handle)
+{
+	
+	deepHistory_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < DEEPHISTORY_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case DeepHistory_mainRegion_State1 :
+		{
+			deepHistory_react_mainRegion_State1(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_a :
+		{
+			deepHistory_react_mainRegion_State2__region0_a(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State6 :
+		{
+			deepHistory_react_mainRegion_State2__region0_State4__region0_State6(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 :
+		{
+			deepHistory_react_mainRegion_State2__region0_State4__region0_State7__region0_State8(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 :
+		{
+			deepHistory_react_mainRegion_State2__region0_State4__region0_State7__region0_State9(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State5 :
+		{
+			deepHistory_react_mainRegion_State2__region0_State5(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	deepHistory_clearInEvents(handle);
+}
+
+
+sc_boolean deepHistory_isStateActive(const DeepHistory* handle, DeepHistoryStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case DeepHistory_mainRegion_State1 :
+			result = (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State1
+			);
+			break;
+		case DeepHistory_mainRegion_State2 :
+			result = (sc_boolean) (handle->stateConfVector[0] >= DeepHistory_mainRegion_State2
+				&& handle->stateConfVector[0] <= DeepHistory_mainRegion_State2__region0_State5);
+			break;
+		case DeepHistory_mainRegion_State2__region0_a :
+			result = (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State2__region0_a
+			);
+			break;
+		case DeepHistory_mainRegion_State2__region0_State4 :
+			result = (sc_boolean) (handle->stateConfVector[0] >= DeepHistory_mainRegion_State2__region0_State4
+				&& handle->stateConfVector[0] <= DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9);
+			break;
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State6 :
+			result = (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State2__region0_State4__region0_State6
+			);
+			break;
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7 :
+			result = (sc_boolean) (handle->stateConfVector[0] >= DeepHistory_mainRegion_State2__region0_State4__region0_State7
+				&& handle->stateConfVector[0] <= DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9);
+			break;
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 :
+			result = (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8
+			);
+			break;
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 :
+			result = (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9
+			);
+			break;
+		case DeepHistory_mainRegion_State2__region0_State5 :
+			result = (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State2__region0_State5
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void deepHistoryIface_raise_event1(DeepHistory* handle)
+{
+	handle->iface.event1_raised = bool_true;
+}
+void deepHistoryIface_raise_event2(DeepHistory* handle)
+{
+	handle->iface.event2_raised = bool_true;
+}
+void deepHistoryIface_raise_event3(DeepHistory* handle)
+{
+	handle->iface.event3_raised = bool_true;
+}
+void deepHistoryIface_raise_event4(DeepHistory* handle)
+{
+	handle->iface.event4_raised = bool_true;
+}
+void deepHistoryIface_raise_event5(DeepHistory* handle)
+{
+	handle->iface.event5_raised = bool_true;
+}
+void deepHistoryIface_raise_event6(DeepHistory* handle)
+{
+	handle->iface.event6_raised = bool_true;
+}
+void deepHistoryIface_raise_event7(DeepHistory* handle)
+{
+	handle->iface.event7_raised = bool_true;
+}
+void deepHistoryIface_raise_event8(DeepHistory* handle)
+{
+	handle->iface.event8_raised = bool_true;
+}
+void deepHistoryIface_raise_event9(DeepHistory* handle)
+{
+	handle->iface.event9_raised = bool_true;
+}
+
+
+
+/* implementations of all internal functions */
+
+static sc_boolean deepHistory_check_mainRegion_State1_tr0_tr0(const DeepHistory* handle)
+{
+	return handle->iface.event1_raised;
+}
+
+static sc_boolean deepHistory_check_mainRegion_State2_tr0_tr0(const DeepHistory* handle)
+{
+	return handle->iface.event2_raised;
+}
+
+static sc_boolean deepHistory_check_mainRegion_State2__region0_a_tr0_tr0(const DeepHistory* handle)
+{
+	return handle->iface.event3_raised;
+}
+
+static sc_boolean deepHistory_check_mainRegion_State2__region0_State4_tr0_tr0(const DeepHistory* handle)
+{
+	return handle->iface.event4_raised;
+}
+
+static sc_boolean deepHistory_check_mainRegion_State2__region0_State4__region0_State6_tr0_tr0(const DeepHistory* handle)
+{
+	return handle->iface.event5_raised;
+}
+
+static sc_boolean deepHistory_check_mainRegion_State2__region0_State4__region0_State7_tr0_tr0(const DeepHistory* handle)
+{
+	return handle->iface.event6_raised;
+}
+
+static sc_boolean deepHistory_check_mainRegion_State2__region0_State4__region0_State7__region0_State8_tr0_tr0(const DeepHistory* handle)
+{
+	return handle->iface.event7_raised;
+}
+
+static sc_boolean deepHistory_check_mainRegion_State2__region0_State4__region0_State7__region0_State9_tr0_tr0(const DeepHistory* handle)
+{
+	return handle->iface.event8_raised;
+}
+
+static void deepHistory_effect_mainRegion_State1_tr0(DeepHistory* handle)
+{
+	deepHistory_exseq_mainRegion_State1(handle);
+	deepHistory_enseq_mainRegion_State2_default(handle);
+}
+
+static void deepHistory_effect_mainRegion_State2_tr0(DeepHistory* handle)
+{
+	deepHistory_exseq_mainRegion_State2(handle);
+	deepHistory_enseq_mainRegion_State1_default(handle);
+}
+
+static void deepHistory_effect_mainRegion_State2__region0_a_tr0(DeepHistory* handle)
+{
+	deepHistory_exseq_mainRegion_State2__region0_a(handle);
+	deepHistory_enseq_mainRegion_State2__region0_State4_default(handle);
+}
+
+static void deepHistory_effect_mainRegion_State2__region0_State4_tr0(DeepHistory* handle)
+{
+	deepHistory_exseq_mainRegion_State2__region0_State4(handle);
+	deepHistory_enseq_mainRegion_State2__region0_State5_default(handle);
+}
+
+static void deepHistory_effect_mainRegion_State2__region0_State4__region0_State6_tr0(DeepHistory* handle)
+{
+	deepHistory_exseq_mainRegion_State2__region0_State4__region0_State6(handle);
+	deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7_default(handle);
+}
+
+static void deepHistory_effect_mainRegion_State2__region0_State4__region0_State7_tr0(DeepHistory* handle)
+{
+	deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7(handle);
+	deepHistory_enseq_mainRegion_State2__region0_State4__region0_State6_default(handle);
+}
+
+static void deepHistory_effect_mainRegion_State2__region0_State4__region0_State7__region0_State8_tr0(DeepHistory* handle)
+{
+	deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State8(handle);
+	deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_State9_default(handle);
+}
+
+static void deepHistory_effect_mainRegion_State2__region0_State4__region0_State7__region0_State9_tr0(DeepHistory* handle)
+{
+	deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State9(handle);
+	deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_State8_default(handle);
+}
+
+/* 'default' enter sequence for state State1 */
+static void deepHistory_enseq_mainRegion_State1_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for state State1 */
+	handle->stateConfVector[0] = DeepHistory_mainRegion_State1;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state State2 */
+static void deepHistory_enseq_mainRegion_State2_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for state State2 */
+	deepHistory_enseq_mainRegion_State2__region0_default(handle);
+}
+
+/* 'default' enter sequence for state a */
+static void deepHistory_enseq_mainRegion_State2__region0_a_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for state a */
+	handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_a;
+	handle->stateConfVectorPosition = 0;
+	handle->historyVector[0] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for state State4 */
+static void deepHistory_enseq_mainRegion_State2__region0_State4_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for state State4 */
+	deepHistory_enseq_mainRegion_State2__region0_State4__region0_default(handle);
+	handle->historyVector[0] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for state State6 */
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_State6_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for state State6 */
+	handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State6;
+	handle->stateConfVectorPosition = 0;
+	handle->historyVector[1] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for state State7 */
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for state State7 */
+	deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_default(handle);
+	handle->historyVector[1] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for state State8 */
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_State8_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for state State8 */
+	handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8;
+	handle->stateConfVectorPosition = 0;
+	handle->historyVector[2] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for state State9 */
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_State9_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for state State9 */
+	handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9;
+	handle->stateConfVectorPosition = 0;
+	handle->historyVector[2] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for state State5 */
+static void deepHistory_enseq_mainRegion_State2__region0_State5_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for state State5 */
+	handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State5;
+	handle->stateConfVectorPosition = 0;
+	handle->historyVector[0] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for region mainRegion */
+static void deepHistory_enseq_mainRegion_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for region mainRegion */
+	deepHistory_react_mainRegion__entry_Default(handle);
+}
+
+/* 'default' enter sequence for region null */
+static void deepHistory_enseq_mainRegion_State2__region0_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for region null */
+	deepHistory_react_mainRegion_State2__region0__entry_Default(handle);
+}
+
+/* deep enterSequence with history in child null */
+static void deepHistory_dhenseq_mainRegion_State2__region0(DeepHistory* handle)
+{
+	/* deep enterSequence with history in child null */
+	/* Handle deep history entry of null */
+	switch(handle->historyVector[ 0 ])
+	{
+		case DeepHistory_mainRegion_State2__region0_a :
+		{
+			/* enterSequence with history in child a for leaf a */
+			deepHistory_enseq_mainRegion_State2__region0_a_default(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State6 :
+		{
+			/* enterSequence with history in child State4 for leaf State6 */
+			deepHistory_dhenseq_mainRegion_State2__region0_State4__region0(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 :
+		{
+			/* enterSequence with history in child State4 for leaf State8 */
+			deepHistory_dhenseq_mainRegion_State2__region0_State4__region0(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 :
+		{
+			/* enterSequence with history in child State4 for leaf State9 */
+			deepHistory_dhenseq_mainRegion_State2__region0_State4__region0(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State5 :
+		{
+			/* enterSequence with history in child State5 for leaf State5 */
+			deepHistory_enseq_mainRegion_State2__region0_State5_default(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* 'default' enter sequence for region null */
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for region null */
+	deepHistory_react_mainRegion_State2__region0_State4__region0__entry_Default(handle);
+}
+
+/* deep enterSequence with history in child null */
+static void deepHistory_dhenseq_mainRegion_State2__region0_State4__region0(DeepHistory* handle)
+{
+	/* deep enterSequence with history in child null */
+	/* Handle deep history entry of null */
+	switch(handle->historyVector[ 1 ])
+	{
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State6 :
+		{
+			/* enterSequence with history in child State6 for leaf State6 */
+			deepHistory_enseq_mainRegion_State2__region0_State4__region0_State6_default(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 :
+		{
+			/* enterSequence with history in child State7 for leaf State8 */
+			deepHistory_dhenseq_mainRegion_State2__region0_State4__region0_State7__region0(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 :
+		{
+			/* enterSequence with history in child State7 for leaf State9 */
+			deepHistory_dhenseq_mainRegion_State2__region0_State4__region0_State7__region0(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* 'default' enter sequence for region null */
+static void deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_default(DeepHistory* handle)
+{
+	/* 'default' enter sequence for region null */
+	deepHistory_react_mainRegion_State2__region0_State4__region0_State7__region0__entry_Default(handle);
+}
+
+/* deep enterSequence with history in child null */
+static void deepHistory_dhenseq_mainRegion_State2__region0_State4__region0_State7__region0(DeepHistory* handle)
+{
+	/* deep enterSequence with history in child null */
+	/* Handle deep history entry of null */
+	switch(handle->historyVector[ 2 ])
+	{
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 :
+		{
+			/* enterSequence with history in child State8 for leaf State8 */
+			deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_State8_default(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 :
+		{
+			/* enterSequence with history in child State9 for leaf State9 */
+			deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_State9_default(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for state State1 */
+static void deepHistory_exseq_mainRegion_State1(DeepHistory* handle)
+{
+	/* Default exit sequence for state State1 */
+	handle->stateConfVector[0] = DeepHistory_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state State2 */
+static void deepHistory_exseq_mainRegion_State2(DeepHistory* handle)
+{
+	/* Default exit sequence for state State2 */
+	deepHistory_exseq_mainRegion_State2__region0(handle);
+}
+
+/* Default exit sequence for state a */
+static void deepHistory_exseq_mainRegion_State2__region0_a(DeepHistory* handle)
+{
+	/* Default exit sequence for state a */
+	handle->stateConfVector[0] = DeepHistory_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state State4 */
+static void deepHistory_exseq_mainRegion_State2__region0_State4(DeepHistory* handle)
+{
+	/* Default exit sequence for state State4 */
+	deepHistory_exseq_mainRegion_State2__region0_State4__region0(handle);
+}
+
+/* Default exit sequence for state State6 */
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0_State6(DeepHistory* handle)
+{
+	/* Default exit sequence for state State6 */
+	handle->stateConfVector[0] = DeepHistory_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state State7 */
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7(DeepHistory* handle)
+{
+	/* Default exit sequence for state State7 */
+	deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0(handle);
+}
+
+/* Default exit sequence for state State8 */
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State8(DeepHistory* handle)
+{
+	/* Default exit sequence for state State8 */
+	handle->stateConfVector[0] = DeepHistory_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state State9 */
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State9(DeepHistory* handle)
+{
+	/* Default exit sequence for state State9 */
+	handle->stateConfVector[0] = DeepHistory_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state State5 */
+static void deepHistory_exseq_mainRegion_State2__region0_State5(DeepHistory* handle)
+{
+	/* Default exit sequence for state State5 */
+	handle->stateConfVector[0] = DeepHistory_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region mainRegion */
+static void deepHistory_exseq_mainRegion(DeepHistory* handle)
+{
+	/* Default exit sequence for region mainRegion */
+	/* Handle exit of all possible states (of DeepHistory.mainRegion) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case DeepHistory_mainRegion_State1 :
+		{
+			deepHistory_exseq_mainRegion_State1(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_a :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_a(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State6 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State6(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State8(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State9(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State5 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State5(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region null */
+static void deepHistory_exseq_mainRegion_State2__region0(DeepHistory* handle)
+{
+	/* Default exit sequence for region null */
+	/* Handle exit of all possible states (of DeepHistory.mainRegion.State2._region0) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case DeepHistory_mainRegion_State2__region0_a :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_a(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State6 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State6(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State8(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State9(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State5 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State5(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region null */
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0(DeepHistory* handle)
+{
+	/* Default exit sequence for region null */
+	/* Handle exit of all possible states (of DeepHistory.mainRegion.State2._region0.State4._region0) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State6 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State6(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State8(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State9(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region null */
+static void deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0(DeepHistory* handle)
+{
+	/* Default exit sequence for region null */
+	/* Handle exit of all possible states (of DeepHistory.mainRegion.State2._region0.State4._region0.State7._region0) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State8(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 :
+		{
+			deepHistory_exseq_mainRegion_State2__region0_State4__region0_State7__region0_State9(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state State1. */
+static void deepHistory_react_mainRegion_State1(DeepHistory* handle)
+{
+	/* The reactions of state State1. */
+	if (deepHistory_check_mainRegion_State1_tr0_tr0(handle) == bool_true)
+	{ 
+		deepHistory_effect_mainRegion_State1_tr0(handle);
+	} 
+}
+
+/* The reactions of state a. */
+static void deepHistory_react_mainRegion_State2__region0_a(DeepHistory* handle)
+{
+	/* The reactions of state a. */
+	if (deepHistory_check_mainRegion_State2_tr0_tr0(handle) == bool_true)
+	{ 
+		deepHistory_effect_mainRegion_State2_tr0(handle);
+	}  else
+	{
+		if (deepHistory_check_mainRegion_State2__region0_a_tr0_tr0(handle) == bool_true)
+		{ 
+			deepHistory_effect_mainRegion_State2__region0_a_tr0(handle);
+		} 
+	}
+}
+
+/* The reactions of state State6. */
+static void deepHistory_react_mainRegion_State2__region0_State4__region0_State6(DeepHistory* handle)
+{
+	/* The reactions of state State6. */
+	if (deepHistory_check_mainRegion_State2_tr0_tr0(handle) == bool_true)
+	{ 
+		deepHistory_effect_mainRegion_State2_tr0(handle);
+	}  else
+	{
+		if (deepHistory_check_mainRegion_State2__region0_State4_tr0_tr0(handle) == bool_true)
+		{ 
+			deepHistory_effect_mainRegion_State2__region0_State4_tr0(handle);
+		}  else
+		{
+			if (deepHistory_check_mainRegion_State2__region0_State4__region0_State6_tr0_tr0(handle) == bool_true)
+			{ 
+				deepHistory_effect_mainRegion_State2__region0_State4__region0_State6_tr0(handle);
+			} 
+		}
+	}
+}
+
+/* The reactions of state State8. */
+static void deepHistory_react_mainRegion_State2__region0_State4__region0_State7__region0_State8(DeepHistory* handle)
+{
+	/* The reactions of state State8. */
+	if (deepHistory_check_mainRegion_State2_tr0_tr0(handle) == bool_true)
+	{ 
+		deepHistory_effect_mainRegion_State2_tr0(handle);
+	}  else
+	{
+		if (deepHistory_check_mainRegion_State2__region0_State4_tr0_tr0(handle) == bool_true)
+		{ 
+			deepHistory_effect_mainRegion_State2__region0_State4_tr0(handle);
+		}  else
+		{
+			if (deepHistory_check_mainRegion_State2__region0_State4__region0_State7_tr0_tr0(handle) == bool_true)
+			{ 
+				deepHistory_effect_mainRegion_State2__region0_State4__region0_State7_tr0(handle);
+			}  else
+			{
+				if (deepHistory_check_mainRegion_State2__region0_State4__region0_State7__region0_State8_tr0_tr0(handle) == bool_true)
+				{ 
+					deepHistory_effect_mainRegion_State2__region0_State4__region0_State7__region0_State8_tr0(handle);
+				} 
+			}
+		}
+	}
+}
+
+/* The reactions of state State9. */
+static void deepHistory_react_mainRegion_State2__region0_State4__region0_State7__region0_State9(DeepHistory* handle)
+{
+	/* The reactions of state State9. */
+	if (deepHistory_check_mainRegion_State2_tr0_tr0(handle) == bool_true)
+	{ 
+		deepHistory_effect_mainRegion_State2_tr0(handle);
+	}  else
+	{
+		if (deepHistory_check_mainRegion_State2__region0_State4_tr0_tr0(handle) == bool_true)
+		{ 
+			deepHistory_effect_mainRegion_State2__region0_State4_tr0(handle);
+		}  else
+		{
+			if (deepHistory_check_mainRegion_State2__region0_State4__region0_State7_tr0_tr0(handle) == bool_true)
+			{ 
+				deepHistory_effect_mainRegion_State2__region0_State4__region0_State7_tr0(handle);
+			}  else
+			{
+				if (deepHistory_check_mainRegion_State2__region0_State4__region0_State7__region0_State9_tr0_tr0(handle) == bool_true)
+				{ 
+					deepHistory_effect_mainRegion_State2__region0_State4__region0_State7__region0_State9_tr0(handle);
+				} 
+			}
+		}
+	}
+}
+
+/* The reactions of state State5. */
+static void deepHistory_react_mainRegion_State2__region0_State5(DeepHistory* handle)
+{
+	/* The reactions of state State5. */
+	if (deepHistory_check_mainRegion_State2_tr0_tr0(handle) == bool_true)
+	{ 
+		deepHistory_effect_mainRegion_State2_tr0(handle);
+	}  else
+	{
+	}
+}
+
+/* Default react sequence for initial entry  */
+static void deepHistory_react_mainRegion__entry_Default(DeepHistory* handle)
+{
+	/* Default react sequence for initial entry  */
+	deepHistory_enseq_mainRegion_State1_default(handle);
+}
+
+/* Default react sequence for initial entry  */
+static void deepHistory_react_mainRegion_State2__region0_State4__region0__entry_Default(DeepHistory* handle)
+{
+	/* Default react sequence for initial entry  */
+	deepHistory_enseq_mainRegion_State2__region0_State4__region0_State6_default(handle);
+}
+
+/* Default react sequence for initial entry  */
+static void deepHistory_react_mainRegion_State2__region0_State4__region0_State7__region0__entry_Default(DeepHistory* handle)
+{
+	/* Default react sequence for initial entry  */
+	deepHistory_enseq_mainRegion_State2__region0_State4__region0_State7__region0_State8_default(handle);
+}
+
+/* Default react sequence for deep history entry  */
+static void deepHistory_react_mainRegion_State2__region0__entry_Default(DeepHistory* handle)
+{
+	/* Default react sequence for deep history entry  */
+	/* Enter the region with deep history */
+	if (handle->historyVector[0] != DeepHistory_last_state)
+	{
+		deepHistory_dhenseq_mainRegion_State2__region0(handle);
+	} else
+	{
+		deepHistory_enseq_mainRegion_State2__region0_a_default(handle);
+	} 
+}
+
+

+ 122 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/DeepHistory.h

@@ -0,0 +1,122 @@
+
+#ifndef DEEPHISTORY_H_
+#define DEEPHISTORY_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'DeepHistory'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	DeepHistory_mainRegion_State1,
+	DeepHistory_mainRegion_State2,
+	DeepHistory_mainRegion_State2__region0_a,
+	DeepHistory_mainRegion_State2__region0_State4,
+	DeepHistory_mainRegion_State2__region0_State4__region0_State6,
+	DeepHistory_mainRegion_State2__region0_State4__region0_State7,
+	DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8,
+	DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9,
+	DeepHistory_mainRegion_State2__region0_State5,
+	DeepHistory_last_state
+} DeepHistoryStates;
+
+/*! Type definition of the data structure for the DeepHistoryIface interface scope. */
+typedef struct
+{
+	sc_boolean event1_raised;
+	sc_boolean event2_raised;
+	sc_boolean event3_raised;
+	sc_boolean event4_raised;
+	sc_boolean event5_raised;
+	sc_boolean event6_raised;
+	sc_boolean event7_raised;
+	sc_boolean event8_raised;
+	sc_boolean event9_raised;
+} DeepHistoryIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define DEEPHISTORY_MAX_ORTHOGONAL_STATES 1
+	/*! Define dimension of the state configuration vector for history states. */
+#define DEEPHISTORY_MAX_HISTORY_STATES 3
+
+/*! 
+ * Type definition of the data structure for the DeepHistory state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	DeepHistoryStates stateConfVector[DEEPHISTORY_MAX_ORTHOGONAL_STATES];
+	DeepHistoryStates historyVector[DEEPHISTORY_MAX_HISTORY_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	DeepHistoryIface iface;
+} DeepHistory;
+
+/*! Initializes the DeepHistory state machine data structures. Must be called before first usage.*/
+extern void deepHistory_init(DeepHistory* handle);
+
+/*! Activates the state machine */
+extern void deepHistory_enter(DeepHistory* handle);
+
+/*! Deactivates the state machine */
+extern void deepHistory_exit(DeepHistory* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void deepHistory_runCycle(DeepHistory* handle);
+
+
+/*! Raises the in event 'event1' that is defined in the default interface scope. */ 
+extern void deepHistoryIface_raise_event1(DeepHistory* handle);
+
+/*! Raises the in event 'event2' that is defined in the default interface scope. */ 
+extern void deepHistoryIface_raise_event2(DeepHistory* handle);
+
+/*! Raises the in event 'event3' that is defined in the default interface scope. */ 
+extern void deepHistoryIface_raise_event3(DeepHistory* handle);
+
+/*! Raises the in event 'event4' that is defined in the default interface scope. */ 
+extern void deepHistoryIface_raise_event4(DeepHistory* handle);
+
+/*! Raises the in event 'event5' that is defined in the default interface scope. */ 
+extern void deepHistoryIface_raise_event5(DeepHistory* handle);
+
+/*! Raises the in event 'event6' that is defined in the default interface scope. */ 
+extern void deepHistoryIface_raise_event6(DeepHistory* handle);
+
+/*! Raises the in event 'event7' that is defined in the default interface scope. */ 
+extern void deepHistoryIface_raise_event7(DeepHistory* handle);
+
+/*! Raises the in event 'event8' that is defined in the default interface scope. */ 
+extern void deepHistoryIface_raise_event8(DeepHistory* handle);
+
+/*! Raises the in event 'event9' that is defined in the default interface scope. */ 
+extern void deepHistoryIface_raise_event9(DeepHistory* handle);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean deepHistory_isActive(const DeepHistory* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean deepHistory_isFinal(const DeepHistory* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean deepHistory_isStateActive(const DeepHistory* handle, DeepHistoryStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* DEEPHISTORY_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/DeepHistory.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart DeepHistory {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/DeepHistoryTest"
+			targetProject = "gtests"
+			targetFolder = "DeepHistoryTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 334 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/DynamicChoice.c

@@ -0,0 +1,334 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "DynamicChoice.h"
+/*! \file Implementation of the state machine 'DynamicChoice'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean dynamicChoice_check_main_region_Start_tr0_tr0(const DynamicChoice* handle);
+static sc_boolean dynamicChoice_check_main_region__choice_0_tr0_tr0(const DynamicChoice* handle);
+static sc_boolean dynamicChoice_check_main_region__choice_0_tr1(const DynamicChoice* handle);
+static void dynamicChoice_effect_main_region_Start_tr0(DynamicChoice* handle);
+static void dynamicChoice_effect_main_region__choice_0_tr0(DynamicChoice* handle);
+static void dynamicChoice_effect_main_region__choice_0_tr1(DynamicChoice* handle);
+static void dynamicChoice_enact_main_region_Start(DynamicChoice* handle);
+static void dynamicChoice_enseq_main_region_Start_default(DynamicChoice* handle);
+static void dynamicChoice_enseq_main_region_A_default(DynamicChoice* handle);
+static void dynamicChoice_enseq_main_region_B_default(DynamicChoice* handle);
+static void dynamicChoice_enseq_main_region_default(DynamicChoice* handle);
+static void dynamicChoice_exseq_main_region_Start(DynamicChoice* handle);
+static void dynamicChoice_exseq_main_region_A(DynamicChoice* handle);
+static void dynamicChoice_exseq_main_region_B(DynamicChoice* handle);
+static void dynamicChoice_exseq_main_region(DynamicChoice* handle);
+static void dynamicChoice_react_main_region_Start(DynamicChoice* handle);
+static void dynamicChoice_react_main_region_A(DynamicChoice* handle);
+static void dynamicChoice_react_main_region_B(DynamicChoice* handle);
+static void dynamicChoice_react_main_region__choice_0(DynamicChoice* handle);
+static void dynamicChoice_react_main_region__entry_Default(DynamicChoice* handle);
+static void dynamicChoice_clearInEvents(DynamicChoice* handle);
+static void dynamicChoice_clearOutEvents(DynamicChoice* handle);
+
+
+void dynamicChoice_init(DynamicChoice* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < DYNAMICCHOICE_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = DynamicChoice_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	dynamicChoice_clearInEvents(handle);
+	dynamicChoice_clearOutEvents(handle);
+
+	/* Default init sequence for statechart DynamicChoice */
+	handle->iface.number = 0;
+
+}
+
+void dynamicChoice_enter(DynamicChoice* handle)
+{
+	/* Default enter sequence for statechart DynamicChoice */
+	dynamicChoice_enseq_main_region_default(handle);
+}
+
+void dynamicChoice_exit(DynamicChoice* handle)
+{
+	/* Default exit sequence for statechart DynamicChoice */
+	dynamicChoice_exseq_main_region(handle);
+}
+
+sc_boolean dynamicChoice_isActive(const DynamicChoice* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != DynamicChoice_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean dynamicChoice_isFinal(const DynamicChoice* handle)
+{
+   return bool_false;
+}
+
+static void dynamicChoice_clearInEvents(DynamicChoice* handle)
+{
+	handle->iface.reset_raised = bool_false;
+}
+
+static void dynamicChoice_clearOutEvents(DynamicChoice* handle)
+{
+}
+
+void dynamicChoice_runCycle(DynamicChoice* handle)
+{
+	
+	dynamicChoice_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < DYNAMICCHOICE_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case DynamicChoice_main_region_Start :
+		{
+			dynamicChoice_react_main_region_Start(handle);
+			break;
+		}
+		case DynamicChoice_main_region_A :
+		{
+			dynamicChoice_react_main_region_A(handle);
+			break;
+		}
+		case DynamicChoice_main_region_B :
+		{
+			dynamicChoice_react_main_region_B(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	dynamicChoice_clearInEvents(handle);
+}
+
+
+sc_boolean dynamicChoice_isStateActive(const DynamicChoice* handle, DynamicChoiceStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case DynamicChoice_main_region_Start :
+			result = (sc_boolean) (handle->stateConfVector[0] == DynamicChoice_main_region_Start
+			);
+			break;
+		case DynamicChoice_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == DynamicChoice_main_region_A
+			);
+			break;
+		case DynamicChoice_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == DynamicChoice_main_region_B
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void dynamicChoiceIface_raise_reset(DynamicChoice* handle)
+{
+	handle->iface.reset_raised = bool_true;
+}
+
+
+sc_integer dynamicChoiceIface_get_number(const DynamicChoice* handle)
+{
+	return handle->iface.number;
+}
+void dynamicChoiceIface_set_number(DynamicChoice* handle, sc_integer value)
+{
+	handle->iface.number = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean dynamicChoice_check_main_region_Start_tr0_tr0(const DynamicChoice* handle)
+{
+	return bool_true;
+}
+
+static sc_boolean dynamicChoice_check_main_region__choice_0_tr0_tr0(const DynamicChoice* handle)
+{
+	return (handle->iface.number == 2) ? bool_true : bool_false;
+}
+
+static sc_boolean dynamicChoice_check_main_region__choice_0_tr1(const DynamicChoice* handle)
+{
+	return bool_true;
+}
+
+static void dynamicChoice_effect_main_region_Start_tr0(DynamicChoice* handle)
+{
+	dynamicChoice_exseq_main_region_Start(handle);
+	handle->iface.number += 1;
+	dynamicChoice_react_main_region__choice_0(handle);
+}
+
+static void dynamicChoice_effect_main_region__choice_0_tr0(DynamicChoice* handle)
+{
+	dynamicChoice_enseq_main_region_A_default(handle);
+}
+
+static void dynamicChoice_effect_main_region__choice_0_tr1(DynamicChoice* handle)
+{
+	dynamicChoice_enseq_main_region_B_default(handle);
+}
+
+/* Entry action for state 'Start'. */
+static void dynamicChoice_enact_main_region_Start(DynamicChoice* handle)
+{
+	/* Entry action for state 'Start'. */
+	handle->iface.number = 1;
+}
+
+/* 'default' enter sequence for state Start */
+static void dynamicChoice_enseq_main_region_Start_default(DynamicChoice* handle)
+{
+	/* 'default' enter sequence for state Start */
+	dynamicChoice_enact_main_region_Start(handle);
+	handle->stateConfVector[0] = DynamicChoice_main_region_Start;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state A */
+static void dynamicChoice_enseq_main_region_A_default(DynamicChoice* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = DynamicChoice_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void dynamicChoice_enseq_main_region_B_default(DynamicChoice* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = DynamicChoice_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void dynamicChoice_enseq_main_region_default(DynamicChoice* handle)
+{
+	/* 'default' enter sequence for region main region */
+	dynamicChoice_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state Start */
+static void dynamicChoice_exseq_main_region_Start(DynamicChoice* handle)
+{
+	/* Default exit sequence for state Start */
+	handle->stateConfVector[0] = DynamicChoice_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state A */
+static void dynamicChoice_exseq_main_region_A(DynamicChoice* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = DynamicChoice_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void dynamicChoice_exseq_main_region_B(DynamicChoice* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = DynamicChoice_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void dynamicChoice_exseq_main_region(DynamicChoice* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of DynamicChoice.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case DynamicChoice_main_region_Start :
+		{
+			dynamicChoice_exseq_main_region_Start(handle);
+			break;
+		}
+		case DynamicChoice_main_region_A :
+		{
+			dynamicChoice_exseq_main_region_A(handle);
+			break;
+		}
+		case DynamicChoice_main_region_B :
+		{
+			dynamicChoice_exseq_main_region_B(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state Start. */
+static void dynamicChoice_react_main_region_Start(DynamicChoice* handle)
+{
+	/* The reactions of state Start. */
+	dynamicChoice_effect_main_region_Start_tr0(handle);
+}
+
+/* The reactions of state A. */
+static void dynamicChoice_react_main_region_A(DynamicChoice* handle)
+{
+	/* The reactions of state A. */
+}
+
+/* The reactions of state B. */
+static void dynamicChoice_react_main_region_B(DynamicChoice* handle)
+{
+	/* The reactions of state B. */
+}
+
+/* The reactions of state null. */
+static void dynamicChoice_react_main_region__choice_0(DynamicChoice* handle)
+{
+	/* The reactions of state null. */
+	if (dynamicChoice_check_main_region__choice_0_tr0_tr0(handle) == bool_true)
+	{ 
+		dynamicChoice_effect_main_region__choice_0_tr0(handle);
+	}  else
+	{
+		dynamicChoice_effect_main_region__choice_0_tr1(handle);
+	}
+}
+
+/* Default react sequence for initial entry  */
+static void dynamicChoice_react_main_region__entry_Default(DynamicChoice* handle)
+{
+	/* Default react sequence for initial entry  */
+	dynamicChoice_enseq_main_region_Start_default(handle);
+}
+
+

+ 86 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/DynamicChoice.h

@@ -0,0 +1,86 @@
+
+#ifndef DYNAMICCHOICE_H_
+#define DYNAMICCHOICE_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'DynamicChoice'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	DynamicChoice_main_region_Start,
+	DynamicChoice_main_region_A,
+	DynamicChoice_main_region_B,
+	DynamicChoice_last_state
+} DynamicChoiceStates;
+
+/*! Type definition of the data structure for the DynamicChoiceIface interface scope. */
+typedef struct
+{
+	sc_integer number;
+	sc_boolean reset_raised;
+} DynamicChoiceIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define DYNAMICCHOICE_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the DynamicChoice state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	DynamicChoiceStates stateConfVector[DYNAMICCHOICE_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	DynamicChoiceIface iface;
+} DynamicChoice;
+
+/*! Initializes the DynamicChoice state machine data structures. Must be called before first usage.*/
+extern void dynamicChoice_init(DynamicChoice* handle);
+
+/*! Activates the state machine */
+extern void dynamicChoice_enter(DynamicChoice* handle);
+
+/*! Deactivates the state machine */
+extern void dynamicChoice_exit(DynamicChoice* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void dynamicChoice_runCycle(DynamicChoice* handle);
+
+
+/*! Gets the value of the variable 'number' that is defined in the default interface scope. */ 
+extern sc_integer dynamicChoiceIface_get_number(const DynamicChoice* handle);
+/*! Sets the value of the variable 'number' that is defined in the default interface scope. */ 
+extern void dynamicChoiceIface_set_number(DynamicChoice* handle, sc_integer value);
+/*! Raises the in event 'reset' that is defined in the default interface scope. */ 
+extern void dynamicChoiceIface_raise_reset(DynamicChoice* handle);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean dynamicChoice_isActive(const DynamicChoice* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean dynamicChoice_isFinal(const DynamicChoice* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean dynamicChoice_isStateActive(const DynamicChoice* handle, DynamicChoiceStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* DYNAMICCHOICE_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/DynamicChoice.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart DynamicChoice {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/DynamicChoiceTest"
+			targetProject = "gtests"
+			targetFolder = "DynamicChoiceTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 216 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/EmptyTransition.c

@@ -0,0 +1,216 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "EmptyTransition.h"
+/*! \file Implementation of the state machine 'EmptyTransition'
+*/
+
+/* prototypes of all internal functions */
+static void emptyTransition_enseq_main_region_A_default(EmptyTransition* handle);
+static void emptyTransition_enseq_main_region_B_default(EmptyTransition* handle);
+static void emptyTransition_enseq_main_region_default(EmptyTransition* handle);
+static void emptyTransition_exseq_main_region_A(EmptyTransition* handle);
+static void emptyTransition_exseq_main_region_B(EmptyTransition* handle);
+static void emptyTransition_exseq_main_region(EmptyTransition* handle);
+static void emptyTransition_react_main_region_A(EmptyTransition* handle);
+static void emptyTransition_react_main_region_B(EmptyTransition* handle);
+static void emptyTransition_react_main_region__entry_Default(EmptyTransition* handle);
+static void emptyTransition_clearInEvents(EmptyTransition* handle);
+static void emptyTransition_clearOutEvents(EmptyTransition* handle);
+
+
+void emptyTransition_init(EmptyTransition* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < EMPTYTRANSITION_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = EmptyTransition_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	emptyTransition_clearInEvents(handle);
+	emptyTransition_clearOutEvents(handle);
+
+
+}
+
+void emptyTransition_enter(EmptyTransition* handle)
+{
+	/* Default enter sequence for statechart EmptyTransition */
+	emptyTransition_enseq_main_region_default(handle);
+}
+
+void emptyTransition_exit(EmptyTransition* handle)
+{
+	/* Default exit sequence for statechart EmptyTransition */
+	emptyTransition_exseq_main_region(handle);
+}
+
+sc_boolean emptyTransition_isActive(const EmptyTransition* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != EmptyTransition_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean emptyTransition_isFinal(const EmptyTransition* handle)
+{
+   return bool_false;
+}
+
+static void emptyTransition_clearInEvents(EmptyTransition* handle)
+{
+}
+
+static void emptyTransition_clearOutEvents(EmptyTransition* handle)
+{
+}
+
+void emptyTransition_runCycle(EmptyTransition* handle)
+{
+	
+	emptyTransition_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < EMPTYTRANSITION_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case EmptyTransition_main_region_A :
+		{
+			emptyTransition_react_main_region_A(handle);
+			break;
+		}
+		case EmptyTransition_main_region_B :
+		{
+			emptyTransition_react_main_region_B(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	emptyTransition_clearInEvents(handle);
+}
+
+
+sc_boolean emptyTransition_isStateActive(const EmptyTransition* handle, EmptyTransitionStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case EmptyTransition_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == EmptyTransition_main_region_A
+			);
+			break;
+		case EmptyTransition_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == EmptyTransition_main_region_B
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+
+/* implementations of all internal functions */
+
+/* 'default' enter sequence for state A */
+static void emptyTransition_enseq_main_region_A_default(EmptyTransition* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = EmptyTransition_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void emptyTransition_enseq_main_region_B_default(EmptyTransition* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = EmptyTransition_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void emptyTransition_enseq_main_region_default(EmptyTransition* handle)
+{
+	/* 'default' enter sequence for region main region */
+	emptyTransition_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void emptyTransition_exseq_main_region_A(EmptyTransition* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = EmptyTransition_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void emptyTransition_exseq_main_region_B(EmptyTransition* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = EmptyTransition_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void emptyTransition_exseq_main_region(EmptyTransition* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of EmptyTransition.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case EmptyTransition_main_region_A :
+		{
+			emptyTransition_exseq_main_region_A(handle);
+			break;
+		}
+		case EmptyTransition_main_region_B :
+		{
+			emptyTransition_exseq_main_region_B(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void emptyTransition_react_main_region_A(EmptyTransition* handle)
+{
+	/* The reactions of state A. */
+}
+
+/* The reactions of state B. */
+static void emptyTransition_react_main_region_B(EmptyTransition* handle)
+{
+	/* The reactions of state B. */
+}
+
+/* Default react sequence for initial entry  */
+static void emptyTransition_react_main_region__entry_Default(EmptyTransition* handle)
+{
+	/* Default react sequence for initial entry  */
+	emptyTransition_enseq_main_region_A_default(handle);
+}
+
+

+ 70 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/EmptyTransition.h

@@ -0,0 +1,70 @@
+
+#ifndef EMPTYTRANSITION_H_
+#define EMPTYTRANSITION_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'EmptyTransition'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	EmptyTransition_main_region_A,
+	EmptyTransition_main_region_B,
+	EmptyTransition_last_state
+} EmptyTransitionStates;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define EMPTYTRANSITION_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the EmptyTransition state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	EmptyTransitionStates stateConfVector[EMPTYTRANSITION_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+} EmptyTransition;
+
+/*! Initializes the EmptyTransition state machine data structures. Must be called before first usage.*/
+extern void emptyTransition_init(EmptyTransition* handle);
+
+/*! Activates the state machine */
+extern void emptyTransition_enter(EmptyTransition* handle);
+
+/*! Deactivates the state machine */
+extern void emptyTransition_exit(EmptyTransition* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void emptyTransition_runCycle(EmptyTransition* handle);
+
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean emptyTransition_isActive(const EmptyTransition* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean emptyTransition_isFinal(const EmptyTransition* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean emptyTransition_isStateActive(const EmptyTransition* handle, EmptyTransitionStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* EMPTYTRANSITION_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/EmptyTransition.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart EmptyTransition {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/EmptyTransitionTest"
+			targetProject = "gtests"
+			targetFolder = "EmptyTransitionTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 409 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/EnterState.c

@@ -0,0 +1,409 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "EnterState.h"
+/*! \file Implementation of the state machine 'EnterState'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean enterState_check_r_A_tr0_tr0(const EnterState* handle);
+static sc_boolean enterState_check_r_A_tr1_tr1(const EnterState* handle);
+static sc_boolean enterState_check_r_A_tr2_tr2(const EnterState* handle);
+static void enterState_effect_r_A_tr0(EnterState* handle);
+static void enterState_effect_r_A_tr1(EnterState* handle);
+static void enterState_effect_r_A_tr2(EnterState* handle);
+static void enterState_enseq_r_A_default(EnterState* handle);
+static void enterState_enseq_r_B_default(EnterState* handle);
+static void enterState_enseq_r_B_f(EnterState* handle);
+static void enterState_enseq_r_B_g(EnterState* handle);
+static void enterState_enseq_r_B_r_E_default(EnterState* handle);
+static void enterState_enseq_r_B_r_F_default(EnterState* handle);
+static void enterState_enseq_r_default(EnterState* handle);
+static void enterState_enseq_r_B_r_default(EnterState* handle);
+static void enterState_enseq_r_B_r_f(EnterState* handle);
+static void enterState_exseq_r_A(EnterState* handle);
+static void enterState_exseq_r_B_r_E(EnterState* handle);
+static void enterState_exseq_r_B_r_F(EnterState* handle);
+static void enterState_exseq_r(EnterState* handle);
+static void enterState_exseq_r_B_r(EnterState* handle);
+static void enterState_react_r_A(EnterState* handle);
+static void enterState_react_r_B_r_E(EnterState* handle);
+static void enterState_react_r_B_r_F(EnterState* handle);
+static void enterState_react_r__entry_Default(EnterState* handle);
+static void enterState_react_r_B_r__entry_Default(EnterState* handle);
+static void enterState_react_r_B_r_f(EnterState* handle);
+static void enterState_clearInEvents(EnterState* handle);
+static void enterState_clearOutEvents(EnterState* handle);
+
+
+void enterState_init(EnterState* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < ENTERSTATE_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = EnterState_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	enterState_clearInEvents(handle);
+	enterState_clearOutEvents(handle);
+
+
+}
+
+void enterState_enter(EnterState* handle)
+{
+	/* Default enter sequence for statechart EnterState */
+	enterState_enseq_r_default(handle);
+}
+
+void enterState_exit(EnterState* handle)
+{
+	/* Default exit sequence for statechart EnterState */
+	enterState_exseq_r(handle);
+}
+
+sc_boolean enterState_isActive(const EnterState* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != EnterState_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean enterState_isFinal(const EnterState* handle)
+{
+   return bool_false;
+}
+
+static void enterState_clearInEvents(EnterState* handle)
+{
+	handle->iface.e_raised = bool_false;
+	handle->iface.f_raised = bool_false;
+	handle->iface.g_raised = bool_false;
+}
+
+static void enterState_clearOutEvents(EnterState* handle)
+{
+}
+
+void enterState_runCycle(EnterState* handle)
+{
+	
+	enterState_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < ENTERSTATE_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case EnterState_r_A :
+		{
+			enterState_react_r_A(handle);
+			break;
+		}
+		case EnterState_r_B_r_E :
+		{
+			enterState_react_r_B_r_E(handle);
+			break;
+		}
+		case EnterState_r_B_r_F :
+		{
+			enterState_react_r_B_r_F(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	enterState_clearInEvents(handle);
+}
+
+
+sc_boolean enterState_isStateActive(const EnterState* handle, EnterStateStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case EnterState_r_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == EnterState_r_A
+			);
+			break;
+		case EnterState_r_B :
+			result = (sc_boolean) (handle->stateConfVector[0] >= EnterState_r_B
+				&& handle->stateConfVector[0] <= EnterState_r_B_r_F);
+			break;
+		case EnterState_r_B_r_E :
+			result = (sc_boolean) (handle->stateConfVector[0] == EnterState_r_B_r_E
+			);
+			break;
+		case EnterState_r_B_r_F :
+			result = (sc_boolean) (handle->stateConfVector[0] == EnterState_r_B_r_F
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void enterStateIface_raise_e(EnterState* handle)
+{
+	handle->iface.e_raised = bool_true;
+}
+void enterStateIface_raise_f(EnterState* handle)
+{
+	handle->iface.f_raised = bool_true;
+}
+void enterStateIface_raise_g(EnterState* handle)
+{
+	handle->iface.g_raised = bool_true;
+}
+
+
+
+/* implementations of all internal functions */
+
+static sc_boolean enterState_check_r_A_tr0_tr0(const EnterState* handle)
+{
+	return handle->iface.e_raised;
+}
+
+static sc_boolean enterState_check_r_A_tr1_tr1(const EnterState* handle)
+{
+	return handle->iface.f_raised;
+}
+
+static sc_boolean enterState_check_r_A_tr2_tr2(const EnterState* handle)
+{
+	return handle->iface.g_raised;
+}
+
+static void enterState_effect_r_A_tr0(EnterState* handle)
+{
+	enterState_exseq_r_A(handle);
+	enterState_enseq_r_B_default(handle);
+}
+
+static void enterState_effect_r_A_tr1(EnterState* handle)
+{
+	enterState_exseq_r_A(handle);
+	enterState_enseq_r_B_f(handle);
+}
+
+static void enterState_effect_r_A_tr2(EnterState* handle)
+{
+	enterState_exseq_r_A(handle);
+	enterState_enseq_r_B_g(handle);
+}
+
+/* 'default' enter sequence for state A */
+static void enterState_enseq_r_A_default(EnterState* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = EnterState_r_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void enterState_enseq_r_B_default(EnterState* handle)
+{
+	/* 'default' enter sequence for state B */
+	enterState_enseq_r_B_r_default(handle);
+}
+
+/* 'f' enter sequence for state B */
+static void enterState_enseq_r_B_f(EnterState* handle)
+{
+	/* 'f' enter sequence for state B */
+	enterState_enseq_r_B_r_f(handle);
+}
+
+/* 'g' enter sequence for state B */
+static void enterState_enseq_r_B_g(EnterState* handle)
+{
+	/* 'g' enter sequence for state B */
+	enterState_enseq_r_B_r_default(handle);
+}
+
+/* 'default' enter sequence for state E */
+static void enterState_enseq_r_B_r_E_default(EnterState* handle)
+{
+	/* 'default' enter sequence for state E */
+	handle->stateConfVector[0] = EnterState_r_B_r_E;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state F */
+static void enterState_enseq_r_B_r_F_default(EnterState* handle)
+{
+	/* 'default' enter sequence for state F */
+	handle->stateConfVector[0] = EnterState_r_B_r_F;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region r */
+static void enterState_enseq_r_default(EnterState* handle)
+{
+	/* 'default' enter sequence for region r */
+	enterState_react_r__entry_Default(handle);
+}
+
+/* 'default' enter sequence for region r */
+static void enterState_enseq_r_B_r_default(EnterState* handle)
+{
+	/* 'default' enter sequence for region r */
+	enterState_react_r_B_r__entry_Default(handle);
+}
+
+/* 'f' enter sequence for region r */
+static void enterState_enseq_r_B_r_f(EnterState* handle)
+{
+	/* 'f' enter sequence for region r */
+	enterState_react_r_B_r_f(handle);
+}
+
+/* Default exit sequence for state A */
+static void enterState_exseq_r_A(EnterState* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = EnterState_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state E */
+static void enterState_exseq_r_B_r_E(EnterState* handle)
+{
+	/* Default exit sequence for state E */
+	handle->stateConfVector[0] = EnterState_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state F */
+static void enterState_exseq_r_B_r_F(EnterState* handle)
+{
+	/* Default exit sequence for state F */
+	handle->stateConfVector[0] = EnterState_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region r */
+static void enterState_exseq_r(EnterState* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of EnterState.r) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case EnterState_r_A :
+		{
+			enterState_exseq_r_A(handle);
+			break;
+		}
+		case EnterState_r_B_r_E :
+		{
+			enterState_exseq_r_B_r_E(handle);
+			break;
+		}
+		case EnterState_r_B_r_F :
+		{
+			enterState_exseq_r_B_r_F(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r */
+static void enterState_exseq_r_B_r(EnterState* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of EnterState.r.B.r) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case EnterState_r_B_r_E :
+		{
+			enterState_exseq_r_B_r_E(handle);
+			break;
+		}
+		case EnterState_r_B_r_F :
+		{
+			enterState_exseq_r_B_r_F(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void enterState_react_r_A(EnterState* handle)
+{
+	/* The reactions of state A. */
+	if (enterState_check_r_A_tr0_tr0(handle) == bool_true)
+	{ 
+		enterState_effect_r_A_tr0(handle);
+	}  else
+	{
+		if (enterState_check_r_A_tr1_tr1(handle) == bool_true)
+		{ 
+			enterState_effect_r_A_tr1(handle);
+		}  else
+		{
+			if (enterState_check_r_A_tr2_tr2(handle) == bool_true)
+			{ 
+				enterState_effect_r_A_tr2(handle);
+			} 
+		}
+	}
+}
+
+/* The reactions of state E. */
+static void enterState_react_r_B_r_E(EnterState* handle)
+{
+	/* The reactions of state E. */
+}
+
+/* The reactions of state F. */
+static void enterState_react_r_B_r_F(EnterState* handle)
+{
+	/* The reactions of state F. */
+}
+
+/* Default react sequence for initial entry  */
+static void enterState_react_r__entry_Default(EnterState* handle)
+{
+	/* Default react sequence for initial entry  */
+	enterState_enseq_r_A_default(handle);
+}
+
+/* Default react sequence for initial entry  */
+static void enterState_react_r_B_r__entry_Default(EnterState* handle)
+{
+	/* Default react sequence for initial entry  */
+	enterState_enseq_r_B_r_E_default(handle);
+}
+
+/* Default react sequence for initial entry f */
+static void enterState_react_r_B_r_f(EnterState* handle)
+{
+	/* Default react sequence for initial entry f */
+	enterState_enseq_r_B_r_F_default(handle);
+}
+
+

+ 90 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/EnterState.h

@@ -0,0 +1,90 @@
+
+#ifndef ENTERSTATE_H_
+#define ENTERSTATE_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'EnterState'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	EnterState_r_A,
+	EnterState_r_B,
+	EnterState_r_B_r_E,
+	EnterState_r_B_r_F,
+	EnterState_last_state
+} EnterStateStates;
+
+/*! Type definition of the data structure for the EnterStateIface interface scope. */
+typedef struct
+{
+	sc_boolean e_raised;
+	sc_boolean f_raised;
+	sc_boolean g_raised;
+} EnterStateIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define ENTERSTATE_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the EnterState state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	EnterStateStates stateConfVector[ENTERSTATE_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	EnterStateIface iface;
+} EnterState;
+
+/*! Initializes the EnterState state machine data structures. Must be called before first usage.*/
+extern void enterState_init(EnterState* handle);
+
+/*! Activates the state machine */
+extern void enterState_enter(EnterState* handle);
+
+/*! Deactivates the state machine */
+extern void enterState_exit(EnterState* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void enterState_runCycle(EnterState* handle);
+
+
+/*! Raises the in event 'e' that is defined in the default interface scope. */ 
+extern void enterStateIface_raise_e(EnterState* handle);
+
+/*! Raises the in event 'f' that is defined in the default interface scope. */ 
+extern void enterStateIface_raise_f(EnterState* handle);
+
+/*! Raises the in event 'g' that is defined in the default interface scope. */ 
+extern void enterStateIface_raise_g(EnterState* handle);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean enterState_isActive(const EnterState* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean enterState_isFinal(const EnterState* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean enterState_isStateActive(const EnterState* handle, EnterStateStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* ENTERSTATE_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/EnterState.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart EnterState {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/EnterStateTest"
+			targetProject = "gtests"
+			targetFolder = "EnterStateTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 197 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/EntryChoice.c

@@ -0,0 +1,197 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "EntryChoice.h"
+/*! \file Implementation of the state machine 'EntryChoice'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean entryChoice_check_main_region__choice_0_tr0_tr0(const EntryChoice* handle);
+static void entryChoice_effect_main_region__choice_0_tr0(EntryChoice* handle);
+static void entryChoice_enseq_main_region_A_default(EntryChoice* handle);
+static void entryChoice_enseq_main_region_default(EntryChoice* handle);
+static void entryChoice_exseq_main_region_A(EntryChoice* handle);
+static void entryChoice_exseq_main_region(EntryChoice* handle);
+static void entryChoice_react_main_region_A(EntryChoice* handle);
+static void entryChoice_react_main_region__choice_0(EntryChoice* handle);
+static void entryChoice_react_main_region__entry_Default(EntryChoice* handle);
+static void entryChoice_clearInEvents(EntryChoice* handle);
+static void entryChoice_clearOutEvents(EntryChoice* handle);
+
+
+void entryChoice_init(EntryChoice* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < ENTRYCHOICE_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = EntryChoice_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	entryChoice_clearInEvents(handle);
+	entryChoice_clearOutEvents(handle);
+
+
+}
+
+void entryChoice_enter(EntryChoice* handle)
+{
+	/* Default enter sequence for statechart EntryChoice */
+	entryChoice_enseq_main_region_default(handle);
+}
+
+void entryChoice_exit(EntryChoice* handle)
+{
+	/* Default exit sequence for statechart EntryChoice */
+	entryChoice_exseq_main_region(handle);
+}
+
+sc_boolean entryChoice_isActive(const EntryChoice* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != EntryChoice_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean entryChoice_isFinal(const EntryChoice* handle)
+{
+   return bool_false;
+}
+
+static void entryChoice_clearInEvents(EntryChoice* handle)
+{
+}
+
+static void entryChoice_clearOutEvents(EntryChoice* handle)
+{
+}
+
+void entryChoice_runCycle(EntryChoice* handle)
+{
+	
+	entryChoice_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < ENTRYCHOICE_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case EntryChoice_main_region_A :
+		{
+			entryChoice_react_main_region_A(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	entryChoice_clearInEvents(handle);
+}
+
+
+sc_boolean entryChoice_isStateActive(const EntryChoice* handle, EntryChoiceStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case EntryChoice_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == EntryChoice_main_region_A
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+
+/* implementations of all internal functions */
+
+static sc_boolean entryChoice_check_main_region__choice_0_tr0_tr0(const EntryChoice* handle)
+{
+	return bool_true;
+}
+
+static void entryChoice_effect_main_region__choice_0_tr0(EntryChoice* handle)
+{
+	entryChoice_enseq_main_region_A_default(handle);
+}
+
+/* 'default' enter sequence for state A */
+static void entryChoice_enseq_main_region_A_default(EntryChoice* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = EntryChoice_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void entryChoice_enseq_main_region_default(EntryChoice* handle)
+{
+	/* 'default' enter sequence for region main region */
+	entryChoice_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void entryChoice_exseq_main_region_A(EntryChoice* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = EntryChoice_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void entryChoice_exseq_main_region(EntryChoice* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of EntryChoice.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case EntryChoice_main_region_A :
+		{
+			entryChoice_exseq_main_region_A(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void entryChoice_react_main_region_A(EntryChoice* handle)
+{
+	/* The reactions of state A. */
+}
+
+/* The reactions of state null. */
+static void entryChoice_react_main_region__choice_0(EntryChoice* handle)
+{
+	/* The reactions of state null. */
+	entryChoice_effect_main_region__choice_0_tr0(handle);
+}
+
+/* Default react sequence for initial entry  */
+static void entryChoice_react_main_region__entry_Default(EntryChoice* handle)
+{
+	/* Default react sequence for initial entry  */
+	entryChoice_react_main_region__choice_0(handle);
+}
+
+

+ 69 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/EntryChoice.h

@@ -0,0 +1,69 @@
+
+#ifndef ENTRYCHOICE_H_
+#define ENTRYCHOICE_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'EntryChoice'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	EntryChoice_main_region_A,
+	EntryChoice_last_state
+} EntryChoiceStates;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define ENTRYCHOICE_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the EntryChoice state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	EntryChoiceStates stateConfVector[ENTRYCHOICE_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+} EntryChoice;
+
+/*! Initializes the EntryChoice state machine data structures. Must be called before first usage.*/
+extern void entryChoice_init(EntryChoice* handle);
+
+/*! Activates the state machine */
+extern void entryChoice_enter(EntryChoice* handle);
+
+/*! Deactivates the state machine */
+extern void entryChoice_exit(EntryChoice* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void entryChoice_runCycle(EntryChoice* handle);
+
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean entryChoice_isActive(const EntryChoice* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean entryChoice_isFinal(const EntryChoice* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean entryChoice_isStateActive(const EntryChoice* handle, EntryChoiceStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* ENTRYCHOICE_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/EntryChoice.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart EntryChoice {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/EntryChoiceTest"
+			targetProject = "gtests"
+			targetFolder = "EntryChoiceTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 385 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransition.c

@@ -0,0 +1,385 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "EntryExitSelfTransition.h"
+/*! \file Implementation of the state machine 'EntryExitSelfTransition'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean entryExitSelfTransition_check_main_region_A_tr0_tr0(const EntryExitSelfTransition* handle);
+static sc_boolean entryExitSelfTransition_check_main_region_A__region0_B_tr0_tr0(const EntryExitSelfTransition* handle);
+static sc_boolean entryExitSelfTransition_check_main_region_A__region0_C_tr0_tr0(const EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_effect_main_region_A_tr0(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_effect_main_region_A__region0_B_tr0(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_effect_main_region_A__region0_C_tr0(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_enact_main_region_A(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_exact_main_region_A(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_enseq_main_region_A_default(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_enseq_main_region_A__region0_B_default(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_enseq_main_region_A__region0_C_default(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_enseq_main_region_default(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_enseq_main_region_A__region0_default(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_exseq_main_region_A(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_exseq_main_region_A__region0_B(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_exseq_main_region_A__region0_C(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_exseq_main_region(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_exseq_main_region_A__region0(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_react_main_region_A__region0_B(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_react_main_region_A__region0_C(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_react_main_region__entry_Default(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_react_main_region_A__region0__entry_Default(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_clearInEvents(EntryExitSelfTransition* handle);
+static void entryExitSelfTransition_clearOutEvents(EntryExitSelfTransition* handle);
+
+
+void entryExitSelfTransition_init(EntryExitSelfTransition* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < ENTRYEXITSELFTRANSITION_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = EntryExitSelfTransition_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	entryExitSelfTransition_clearInEvents(handle);
+	entryExitSelfTransition_clearOutEvents(handle);
+
+	/* Default init sequence for statechart EntryExitSelfTransition */
+	handle->iface.exits = 0;
+	handle->iface.entries = 0;
+
+}
+
+void entryExitSelfTransition_enter(EntryExitSelfTransition* handle)
+{
+	/* Default enter sequence for statechart EntryExitSelfTransition */
+	entryExitSelfTransition_enseq_main_region_default(handle);
+}
+
+void entryExitSelfTransition_exit(EntryExitSelfTransition* handle)
+{
+	/* Default exit sequence for statechart EntryExitSelfTransition */
+	entryExitSelfTransition_exseq_main_region(handle);
+}
+
+sc_boolean entryExitSelfTransition_isActive(const EntryExitSelfTransition* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != EntryExitSelfTransition_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean entryExitSelfTransition_isFinal(const EntryExitSelfTransition* handle)
+{
+   return bool_false;
+}
+
+static void entryExitSelfTransition_clearInEvents(EntryExitSelfTransition* handle)
+{
+	handle->iface.e_raised = bool_false;
+	handle->iface.e1_raised = bool_false;
+}
+
+static void entryExitSelfTransition_clearOutEvents(EntryExitSelfTransition* handle)
+{
+}
+
+void entryExitSelfTransition_runCycle(EntryExitSelfTransition* handle)
+{
+	
+	entryExitSelfTransition_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < ENTRYEXITSELFTRANSITION_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case EntryExitSelfTransition_main_region_A__region0_B :
+		{
+			entryExitSelfTransition_react_main_region_A__region0_B(handle);
+			break;
+		}
+		case EntryExitSelfTransition_main_region_A__region0_C :
+		{
+			entryExitSelfTransition_react_main_region_A__region0_C(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	entryExitSelfTransition_clearInEvents(handle);
+}
+
+
+sc_boolean entryExitSelfTransition_isStateActive(const EntryExitSelfTransition* handle, EntryExitSelfTransitionStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case EntryExitSelfTransition_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] >= EntryExitSelfTransition_main_region_A
+				&& handle->stateConfVector[0] <= EntryExitSelfTransition_main_region_A__region0_C);
+			break;
+		case EntryExitSelfTransition_main_region_A__region0_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == EntryExitSelfTransition_main_region_A__region0_B
+			);
+			break;
+		case EntryExitSelfTransition_main_region_A__region0_C :
+			result = (sc_boolean) (handle->stateConfVector[0] == EntryExitSelfTransition_main_region_A__region0_C
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void entryExitSelfTransitionIface_raise_e(EntryExitSelfTransition* handle)
+{
+	handle->iface.e_raised = bool_true;
+}
+void entryExitSelfTransitionIface_raise_e1(EntryExitSelfTransition* handle)
+{
+	handle->iface.e1_raised = bool_true;
+}
+
+
+sc_integer entryExitSelfTransitionIface_get_exits(const EntryExitSelfTransition* handle)
+{
+	return handle->iface.exits;
+}
+void entryExitSelfTransitionIface_set_exits(EntryExitSelfTransition* handle, sc_integer value)
+{
+	handle->iface.exits = value;
+}
+sc_integer entryExitSelfTransitionIface_get_entries(const EntryExitSelfTransition* handle)
+{
+	return handle->iface.entries;
+}
+void entryExitSelfTransitionIface_set_entries(EntryExitSelfTransition* handle, sc_integer value)
+{
+	handle->iface.entries = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean entryExitSelfTransition_check_main_region_A_tr0_tr0(const EntryExitSelfTransition* handle)
+{
+	return handle->iface.e_raised;
+}
+
+static sc_boolean entryExitSelfTransition_check_main_region_A__region0_B_tr0_tr0(const EntryExitSelfTransition* handle)
+{
+	return handle->iface.e1_raised;
+}
+
+static sc_boolean entryExitSelfTransition_check_main_region_A__region0_C_tr0_tr0(const EntryExitSelfTransition* handle)
+{
+	return handle->iface.e1_raised;
+}
+
+static void entryExitSelfTransition_effect_main_region_A_tr0(EntryExitSelfTransition* handle)
+{
+	entryExitSelfTransition_exseq_main_region_A(handle);
+	entryExitSelfTransition_enact_main_region_A(handle);
+	entryExitSelfTransition_enseq_main_region_A__region0_C_default(handle);
+}
+
+static void entryExitSelfTransition_effect_main_region_A__region0_B_tr0(EntryExitSelfTransition* handle)
+{
+	entryExitSelfTransition_exseq_main_region_A__region0_B(handle);
+	entryExitSelfTransition_enseq_main_region_A__region0_C_default(handle);
+}
+
+static void entryExitSelfTransition_effect_main_region_A__region0_C_tr0(EntryExitSelfTransition* handle)
+{
+	entryExitSelfTransition_exseq_main_region_A(handle);
+	entryExitSelfTransition_enseq_main_region_A_default(handle);
+}
+
+/* Entry action for state 'A'. */
+static void entryExitSelfTransition_enact_main_region_A(EntryExitSelfTransition* handle)
+{
+	/* Entry action for state 'A'. */
+	handle->iface.entries += 1;
+}
+
+/* Exit action for state 'A'. */
+static void entryExitSelfTransition_exact_main_region_A(EntryExitSelfTransition* handle)
+{
+	/* Exit action for state 'A'. */
+	handle->iface.exits += 1;
+}
+
+/* 'default' enter sequence for state A */
+static void entryExitSelfTransition_enseq_main_region_A_default(EntryExitSelfTransition* handle)
+{
+	/* 'default' enter sequence for state A */
+	entryExitSelfTransition_enact_main_region_A(handle);
+	entryExitSelfTransition_enseq_main_region_A__region0_default(handle);
+}
+
+/* 'default' enter sequence for state B */
+static void entryExitSelfTransition_enseq_main_region_A__region0_B_default(EntryExitSelfTransition* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = EntryExitSelfTransition_main_region_A__region0_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state C */
+static void entryExitSelfTransition_enseq_main_region_A__region0_C_default(EntryExitSelfTransition* handle)
+{
+	/* 'default' enter sequence for state C */
+	handle->stateConfVector[0] = EntryExitSelfTransition_main_region_A__region0_C;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void entryExitSelfTransition_enseq_main_region_default(EntryExitSelfTransition* handle)
+{
+	/* 'default' enter sequence for region main region */
+	entryExitSelfTransition_react_main_region__entry_Default(handle);
+}
+
+/* 'default' enter sequence for region  */
+static void entryExitSelfTransition_enseq_main_region_A__region0_default(EntryExitSelfTransition* handle)
+{
+	/* 'default' enter sequence for region  */
+	entryExitSelfTransition_react_main_region_A__region0__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void entryExitSelfTransition_exseq_main_region_A(EntryExitSelfTransition* handle)
+{
+	/* Default exit sequence for state A */
+	entryExitSelfTransition_exseq_main_region_A__region0(handle);
+	entryExitSelfTransition_exact_main_region_A(handle);
+}
+
+/* Default exit sequence for state B */
+static void entryExitSelfTransition_exseq_main_region_A__region0_B(EntryExitSelfTransition* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = EntryExitSelfTransition_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state C */
+static void entryExitSelfTransition_exseq_main_region_A__region0_C(EntryExitSelfTransition* handle)
+{
+	/* Default exit sequence for state C */
+	handle->stateConfVector[0] = EntryExitSelfTransition_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void entryExitSelfTransition_exseq_main_region(EntryExitSelfTransition* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of EntryExitSelfTransition.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case EntryExitSelfTransition_main_region_A__region0_B :
+		{
+			entryExitSelfTransition_exseq_main_region_A__region0_B(handle);
+			entryExitSelfTransition_exact_main_region_A(handle);
+			break;
+		}
+		case EntryExitSelfTransition_main_region_A__region0_C :
+		{
+			entryExitSelfTransition_exseq_main_region_A__region0_C(handle);
+			entryExitSelfTransition_exact_main_region_A(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region  */
+static void entryExitSelfTransition_exseq_main_region_A__region0(EntryExitSelfTransition* handle)
+{
+	/* Default exit sequence for region  */
+	/* Handle exit of all possible states (of EntryExitSelfTransition.main_region.A._region0) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case EntryExitSelfTransition_main_region_A__region0_B :
+		{
+			entryExitSelfTransition_exseq_main_region_A__region0_B(handle);
+			break;
+		}
+		case EntryExitSelfTransition_main_region_A__region0_C :
+		{
+			entryExitSelfTransition_exseq_main_region_A__region0_C(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state B. */
+static void entryExitSelfTransition_react_main_region_A__region0_B(EntryExitSelfTransition* handle)
+{
+	/* The reactions of state B. */
+	if (entryExitSelfTransition_check_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		entryExitSelfTransition_effect_main_region_A_tr0(handle);
+	}  else
+	{
+		if (entryExitSelfTransition_check_main_region_A__region0_B_tr0_tr0(handle) == bool_true)
+		{ 
+			entryExitSelfTransition_effect_main_region_A__region0_B_tr0(handle);
+		} 
+	}
+}
+
+/* The reactions of state C. */
+static void entryExitSelfTransition_react_main_region_A__region0_C(EntryExitSelfTransition* handle)
+{
+	/* The reactions of state C. */
+	if (entryExitSelfTransition_check_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		entryExitSelfTransition_effect_main_region_A_tr0(handle);
+	}  else
+	{
+		if (entryExitSelfTransition_check_main_region_A__region0_C_tr0_tr0(handle) == bool_true)
+		{ 
+			entryExitSelfTransition_effect_main_region_A__region0_C_tr0(handle);
+		} 
+	}
+}
+
+/* Default react sequence for initial entry  */
+static void entryExitSelfTransition_react_main_region__entry_Default(EntryExitSelfTransition* handle)
+{
+	/* Default react sequence for initial entry  */
+	entryExitSelfTransition_enseq_main_region_A_default(handle);
+}
+
+/* Default react sequence for initial entry  */
+static void entryExitSelfTransition_react_main_region_A__region0__entry_Default(EntryExitSelfTransition* handle)
+{
+	/* Default react sequence for initial entry  */
+	entryExitSelfTransition_enseq_main_region_A__region0_B_default(handle);
+}
+
+

+ 95 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransition.h

@@ -0,0 +1,95 @@
+
+#ifndef ENTRYEXITSELFTRANSITION_H_
+#define ENTRYEXITSELFTRANSITION_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'EntryExitSelfTransition'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	EntryExitSelfTransition_main_region_A,
+	EntryExitSelfTransition_main_region_A__region0_B,
+	EntryExitSelfTransition_main_region_A__region0_C,
+	EntryExitSelfTransition_last_state
+} EntryExitSelfTransitionStates;
+
+/*! Type definition of the data structure for the EntryExitSelfTransitionIface interface scope. */
+typedef struct
+{
+	sc_integer exits;
+	sc_integer entries;
+	sc_boolean e_raised;
+	sc_boolean e1_raised;
+} EntryExitSelfTransitionIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define ENTRYEXITSELFTRANSITION_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the EntryExitSelfTransition state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	EntryExitSelfTransitionStates stateConfVector[ENTRYEXITSELFTRANSITION_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	EntryExitSelfTransitionIface iface;
+} EntryExitSelfTransition;
+
+/*! Initializes the EntryExitSelfTransition state machine data structures. Must be called before first usage.*/
+extern void entryExitSelfTransition_init(EntryExitSelfTransition* handle);
+
+/*! Activates the state machine */
+extern void entryExitSelfTransition_enter(EntryExitSelfTransition* handle);
+
+/*! Deactivates the state machine */
+extern void entryExitSelfTransition_exit(EntryExitSelfTransition* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void entryExitSelfTransition_runCycle(EntryExitSelfTransition* handle);
+
+
+/*! Gets the value of the variable 'exits' that is defined in the default interface scope. */ 
+extern sc_integer entryExitSelfTransitionIface_get_exits(const EntryExitSelfTransition* handle);
+/*! Sets the value of the variable 'exits' that is defined in the default interface scope. */ 
+extern void entryExitSelfTransitionIface_set_exits(EntryExitSelfTransition* handle, sc_integer value);
+/*! Gets the value of the variable 'entries' that is defined in the default interface scope. */ 
+extern sc_integer entryExitSelfTransitionIface_get_entries(const EntryExitSelfTransition* handle);
+/*! Sets the value of the variable 'entries' that is defined in the default interface scope. */ 
+extern void entryExitSelfTransitionIface_set_entries(EntryExitSelfTransition* handle, sc_integer value);
+/*! Raises the in event 'e' that is defined in the default interface scope. */ 
+extern void entryExitSelfTransitionIface_raise_e(EntryExitSelfTransition* handle);
+
+/*! Raises the in event 'e1' that is defined in the default interface scope. */ 
+extern void entryExitSelfTransitionIface_raise_e1(EntryExitSelfTransition* handle);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean entryExitSelfTransition_isActive(const EntryExitSelfTransition* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean entryExitSelfTransition_isFinal(const EntryExitSelfTransition* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean entryExitSelfTransition_isStateActive(const EntryExitSelfTransition* handle, EntryExitSelfTransitionStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* ENTRYEXITSELFTRANSITION_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransition.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart EntryExitSelfTransition {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/EntryExitSelfTransitionTest"
+			targetProject = "gtests"
+			targetFolder = "EntryExitSelfTransitionTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransitionTest.cc

@@ -21,7 +21,7 @@ TEST(StatemachineTest, SelfTransitionToChildState) {
 	entryExitSelfTransition_runCycle(&handle);
 	EXPECT_TRUE(entryExitSelfTransitionIface_get_entries(&handle)== 1l);
 	EXPECT_TRUE(entryExitSelfTransition_isStateActive(&handle, EntryExitSelfTransition_main_region_A__region0_B));
-	entryExitSelfTransitionIface_set_entries(0l);
+	entryExitSelfTransitionIface_set_entries(&handle,0l);
 	entryExitSelfTransitionIface_raise_e(&handle);
 	entryExitSelfTransition_runCycle(&handle);
 	EXPECT_TRUE(entryExitSelfTransitionIface_get_entries(&handle)== 1l);
@@ -34,7 +34,7 @@ TEST(StatemachineTest, SelfTransitionFromChildState) {
 	entryExitSelfTransition_enter(&handle);
 	entryExitSelfTransition_runCycle(&handle);
 	EXPECT_TRUE(entryExitSelfTransitionIface_get_entries(&handle)== 1l);
-	entryExitSelfTransitionIface_set_entries(0l);
+	entryExitSelfTransitionIface_set_entries(&handle,0l);
 	entryExitSelfTransitionIface_raise_e1(&handle);
 	entryExitSelfTransition_runCycle(&handle);
 	EXPECT_TRUE(entryExitSelfTransitionIface_get_entries(&handle)== 0l);

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 588 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionAction.c

@@ -0,0 +1,588 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "EntryReactionAction.h"
+/*! \file Implementation of the state machine 'EntryReactionAction'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean entryReactionAction_check_EntryReactionAction_r2_B_tr0_tr0(const EntryReactionAction* handle);
+static sc_boolean entryReactionAction_check_EntryReactionAction_r2_B_r_BA_tr0_tr0(const EntryReactionAction* handle);
+static sc_boolean entryReactionAction_check_EntryReactionAction_r2_B_r_BB_tr0_tr0(const EntryReactionAction* handle);
+static sc_boolean entryReactionAction_check_EntryReactionAction_r2_D_tr0_tr0(const EntryReactionAction* handle);
+static sc_boolean entryReactionAction_check_EntryReactionAction_r2_D_tr1_tr1(const EntryReactionAction* handle);
+static void entryReactionAction_effect_EntryReactionAction_r2_B_tr0(EntryReactionAction* handle);
+static void entryReactionAction_effect_EntryReactionAction_r2_B_r_BA_tr0(EntryReactionAction* handle);
+static void entryReactionAction_effect_EntryReactionAction_r2_B_r_BB_tr0(EntryReactionAction* handle);
+static void entryReactionAction_effect_EntryReactionAction_r2_D_tr0(EntryReactionAction* handle);
+static void entryReactionAction_effect_EntryReactionAction_r2_D_tr1(EntryReactionAction* handle);
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_default(EntryReactionAction* handle);
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_other(EntryReactionAction* handle);
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_r_BA_default(EntryReactionAction* handle);
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_r_BB_default(EntryReactionAction* handle);
+static void entryReactionAction_enseq_EntryReactionAction_r2_D_default(EntryReactionAction* handle);
+static void entryReactionAction_enseq_EntryReactionAction_r1_A_default(EntryReactionAction* handle);
+static void entryReactionAction_enseq_EntryReactionAction_r2_default(EntryReactionAction* handle);
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_r_default(EntryReactionAction* handle);
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_r_other(EntryReactionAction* handle);
+static void entryReactionAction_shenseq_EntryReactionAction_r2_B_r(EntryReactionAction* handle);
+static void entryReactionAction_enseq_EntryReactionAction_r1_default(EntryReactionAction* handle);
+static void entryReactionAction_exseq_EntryReactionAction_r2_B(EntryReactionAction* handle);
+static void entryReactionAction_exseq_EntryReactionAction_r2_B_r_BA(EntryReactionAction* handle);
+static void entryReactionAction_exseq_EntryReactionAction_r2_B_r_BB(EntryReactionAction* handle);
+static void entryReactionAction_exseq_EntryReactionAction_r2_D(EntryReactionAction* handle);
+static void entryReactionAction_exseq_EntryReactionAction_r1_A(EntryReactionAction* handle);
+static void entryReactionAction_exseq_EntryReactionAction_r2(EntryReactionAction* handle);
+static void entryReactionAction_exseq_EntryReactionAction_r2_B_r(EntryReactionAction* handle);
+static void entryReactionAction_exseq_EntryReactionAction_r1(EntryReactionAction* handle);
+static void entryReactionAction_react_EntryReactionAction_r2_B_r_BA(EntryReactionAction* handle);
+static void entryReactionAction_react_EntryReactionAction_r2_B_r_BB(EntryReactionAction* handle);
+static void entryReactionAction_react_EntryReactionAction_r2_D(EntryReactionAction* handle);
+static void entryReactionAction_react_EntryReactionAction_r1_A(EntryReactionAction* handle);
+static void entryReactionAction_react_EntryReactionAction_r2_default(EntryReactionAction* handle);
+static void entryReactionAction_react_EntryReactionAction_r2_B_r_default(EntryReactionAction* handle);
+static void entryReactionAction_react_EntryReactionAction_r2_B_r_other(EntryReactionAction* handle);
+static void entryReactionAction_react_EntryReactionAction_r1__entry_Default(EntryReactionAction* handle);
+static void entryReactionAction_clearInEvents(EntryReactionAction* handle);
+static void entryReactionAction_clearOutEvents(EntryReactionAction* handle);
+
+
+void entryReactionAction_init(EntryReactionAction* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < ENTRYREACTIONACTION_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = EntryReactionAction_last_state;
+	}
+	
+	for (i = 0; i < ENTRYREACTIONACTION_MAX_HISTORY_STATES; ++i)
+	{
+		handle->historyVector[i] = EntryReactionAction_last_state;
+	}
+	
+	handle->stateConfVectorPosition = 0;
+
+	entryReactionAction_clearInEvents(handle);
+	entryReactionAction_clearOutEvents(handle);
+
+	/* Default init sequence for statechart EntryReactionAction */
+	handle->iface.enteredR1 = bool_false;
+	handle->iface.enteredR2 = bool_false;
+	handle->iface.enteredBdefault = bool_false;
+	handle->iface.enteredBother = bool_false;
+
+}
+
+void entryReactionAction_enter(EntryReactionAction* handle)
+{
+	/* Default enter sequence for statechart EntryReactionAction */
+	entryReactionAction_enseq_EntryReactionAction_r2_default(handle);
+	entryReactionAction_enseq_EntryReactionAction_r1_default(handle);
+}
+
+void entryReactionAction_exit(EntryReactionAction* handle)
+{
+	/* Default exit sequence for statechart EntryReactionAction */
+	entryReactionAction_exseq_EntryReactionAction_r2(handle);
+	entryReactionAction_exseq_EntryReactionAction_r1(handle);
+}
+
+sc_boolean entryReactionAction_isActive(const EntryReactionAction* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != EntryReactionAction_last_state || handle->stateConfVector[1] != EntryReactionAction_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean entryReactionAction_isFinal(const EntryReactionAction* handle)
+{
+   return bool_false;
+}
+
+static void entryReactionAction_clearInEvents(EntryReactionAction* handle)
+{
+	handle->iface.b_raised = bool_false;
+	handle->iface.d_raised = bool_false;
+}
+
+static void entryReactionAction_clearOutEvents(EntryReactionAction* handle)
+{
+}
+
+void entryReactionAction_runCycle(EntryReactionAction* handle)
+{
+	
+	entryReactionAction_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < ENTRYREACTIONACTION_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case EntryReactionAction_EntryReactionAction_r2_B_r_BA :
+		{
+			entryReactionAction_react_EntryReactionAction_r2_B_r_BA(handle);
+			break;
+		}
+		case EntryReactionAction_EntryReactionAction_r2_B_r_BB :
+		{
+			entryReactionAction_react_EntryReactionAction_r2_B_r_BB(handle);
+			break;
+		}
+		case EntryReactionAction_EntryReactionAction_r2_D :
+		{
+			entryReactionAction_react_EntryReactionAction_r2_D(handle);
+			break;
+		}
+		case EntryReactionAction_EntryReactionAction_r1_A :
+		{
+			entryReactionAction_react_EntryReactionAction_r1_A(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	entryReactionAction_clearInEvents(handle);
+}
+
+
+sc_boolean entryReactionAction_isStateActive(const EntryReactionAction* handle, EntryReactionActionStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case EntryReactionAction_EntryReactionAction_r2_B :
+			result = (sc_boolean) (handle->stateConfVector[0] >= EntryReactionAction_EntryReactionAction_r2_B
+				&& handle->stateConfVector[0] <= EntryReactionAction_EntryReactionAction_r2_B_r_BB);
+			break;
+		case EntryReactionAction_EntryReactionAction_r2_B_r_BA :
+			result = (sc_boolean) (handle->stateConfVector[0] == EntryReactionAction_EntryReactionAction_r2_B_r_BA
+			);
+			break;
+		case EntryReactionAction_EntryReactionAction_r2_B_r_BB :
+			result = (sc_boolean) (handle->stateConfVector[0] == EntryReactionAction_EntryReactionAction_r2_B_r_BB
+			);
+			break;
+		case EntryReactionAction_EntryReactionAction_r2_D :
+			result = (sc_boolean) (handle->stateConfVector[0] == EntryReactionAction_EntryReactionAction_r2_D
+			);
+			break;
+		case EntryReactionAction_EntryReactionAction_r1_A :
+			result = (sc_boolean) (handle->stateConfVector[1] == EntryReactionAction_EntryReactionAction_r1_A
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void entryReactionActionIface_raise_b(EntryReactionAction* handle)
+{
+	handle->iface.b_raised = bool_true;
+}
+void entryReactionActionIface_raise_d(EntryReactionAction* handle)
+{
+	handle->iface.d_raised = bool_true;
+}
+
+
+sc_boolean entryReactionActionIface_get_enteredR1(const EntryReactionAction* handle)
+{
+	return handle->iface.enteredR1;
+}
+void entryReactionActionIface_set_enteredR1(EntryReactionAction* handle, sc_boolean value)
+{
+	handle->iface.enteredR1 = value;
+}
+sc_boolean entryReactionActionIface_get_enteredR2(const EntryReactionAction* handle)
+{
+	return handle->iface.enteredR2;
+}
+void entryReactionActionIface_set_enteredR2(EntryReactionAction* handle, sc_boolean value)
+{
+	handle->iface.enteredR2 = value;
+}
+sc_boolean entryReactionActionIface_get_enteredBdefault(const EntryReactionAction* handle)
+{
+	return handle->iface.enteredBdefault;
+}
+void entryReactionActionIface_set_enteredBdefault(EntryReactionAction* handle, sc_boolean value)
+{
+	handle->iface.enteredBdefault = value;
+}
+sc_boolean entryReactionActionIface_get_enteredBother(const EntryReactionAction* handle)
+{
+	return handle->iface.enteredBother;
+}
+void entryReactionActionIface_set_enteredBother(EntryReactionAction* handle, sc_boolean value)
+{
+	handle->iface.enteredBother = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean entryReactionAction_check_EntryReactionAction_r2_B_tr0_tr0(const EntryReactionAction* handle)
+{
+	return handle->iface.d_raised;
+}
+
+static sc_boolean entryReactionAction_check_EntryReactionAction_r2_B_r_BA_tr0_tr0(const EntryReactionAction* handle)
+{
+	return handle->iface.b_raised;
+}
+
+static sc_boolean entryReactionAction_check_EntryReactionAction_r2_B_r_BB_tr0_tr0(const EntryReactionAction* handle)
+{
+	return handle->iface.b_raised;
+}
+
+static sc_boolean entryReactionAction_check_EntryReactionAction_r2_D_tr0_tr0(const EntryReactionAction* handle)
+{
+	return handle->iface.b_raised;
+}
+
+static sc_boolean entryReactionAction_check_EntryReactionAction_r2_D_tr1_tr1(const EntryReactionAction* handle)
+{
+	return handle->iface.d_raised;
+}
+
+static void entryReactionAction_effect_EntryReactionAction_r2_B_tr0(EntryReactionAction* handle)
+{
+	entryReactionAction_exseq_EntryReactionAction_r2_B(handle);
+	entryReactionAction_enseq_EntryReactionAction_r2_D_default(handle);
+}
+
+static void entryReactionAction_effect_EntryReactionAction_r2_B_r_BA_tr0(EntryReactionAction* handle)
+{
+	entryReactionAction_exseq_EntryReactionAction_r2_B_r_BA(handle);
+	entryReactionAction_enseq_EntryReactionAction_r2_B_r_BB_default(handle);
+}
+
+static void entryReactionAction_effect_EntryReactionAction_r2_B_r_BB_tr0(EntryReactionAction* handle)
+{
+	entryReactionAction_exseq_EntryReactionAction_r2_B_r_BB(handle);
+	entryReactionAction_enseq_EntryReactionAction_r2_B_r_BA_default(handle);
+}
+
+static void entryReactionAction_effect_EntryReactionAction_r2_D_tr0(EntryReactionAction* handle)
+{
+	entryReactionAction_exseq_EntryReactionAction_r2_D(handle);
+	entryReactionAction_enseq_EntryReactionAction_r2_B_other(handle);
+}
+
+static void entryReactionAction_effect_EntryReactionAction_r2_D_tr1(EntryReactionAction* handle)
+{
+	entryReactionAction_exseq_EntryReactionAction_r2_D(handle);
+	entryReactionAction_enseq_EntryReactionAction_r2_B_default(handle);
+}
+
+/* 'default' enter sequence for state B */
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_default(EntryReactionAction* handle)
+{
+	/* 'default' enter sequence for state B */
+	entryReactionAction_enseq_EntryReactionAction_r2_B_r_default(handle);
+}
+
+/* 'other' enter sequence for state B */
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_other(EntryReactionAction* handle)
+{
+	/* 'other' enter sequence for state B */
+	entryReactionAction_enseq_EntryReactionAction_r2_B_r_other(handle);
+}
+
+/* 'default' enter sequence for state BA */
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_r_BA_default(EntryReactionAction* handle)
+{
+	/* 'default' enter sequence for state BA */
+	handle->stateConfVector[0] = EntryReactionAction_EntryReactionAction_r2_B_r_BA;
+	handle->stateConfVectorPosition = 0;
+	handle->historyVector[0] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for state BB */
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_r_BB_default(EntryReactionAction* handle)
+{
+	/* 'default' enter sequence for state BB */
+	handle->stateConfVector[0] = EntryReactionAction_EntryReactionAction_r2_B_r_BB;
+	handle->stateConfVectorPosition = 0;
+	handle->historyVector[0] = handle->stateConfVector[0];
+}
+
+/* 'default' enter sequence for state D */
+static void entryReactionAction_enseq_EntryReactionAction_r2_D_default(EntryReactionAction* handle)
+{
+	/* 'default' enter sequence for state D */
+	handle->stateConfVector[0] = EntryReactionAction_EntryReactionAction_r2_D;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state A */
+static void entryReactionAction_enseq_EntryReactionAction_r1_A_default(EntryReactionAction* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[1] = EntryReactionAction_EntryReactionAction_r1_A;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* 'default' enter sequence for region r2 */
+static void entryReactionAction_enseq_EntryReactionAction_r2_default(EntryReactionAction* handle)
+{
+	/* 'default' enter sequence for region r2 */
+	entryReactionAction_react_EntryReactionAction_r2_default(handle);
+}
+
+/* 'default' enter sequence for region r */
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_r_default(EntryReactionAction* handle)
+{
+	/* 'default' enter sequence for region r */
+	entryReactionAction_react_EntryReactionAction_r2_B_r_default(handle);
+}
+
+/* 'other' enter sequence for region r */
+static void entryReactionAction_enseq_EntryReactionAction_r2_B_r_other(EntryReactionAction* handle)
+{
+	/* 'other' enter sequence for region r */
+	entryReactionAction_react_EntryReactionAction_r2_B_r_other(handle);
+}
+
+/* shallow enterSequence with history in child r */
+static void entryReactionAction_shenseq_EntryReactionAction_r2_B_r(EntryReactionAction* handle)
+{
+	/* shallow enterSequence with history in child r */
+	/* Handle shallow history entry of r */
+	switch(handle->historyVector[ 0 ])
+	{
+		case EntryReactionAction_EntryReactionAction_r2_B_r_BA :
+		{
+			entryReactionAction_enseq_EntryReactionAction_r2_B_r_BA_default(handle);
+			break;
+		}
+		case EntryReactionAction_EntryReactionAction_r2_B_r_BB :
+		{
+			entryReactionAction_enseq_EntryReactionAction_r2_B_r_BB_default(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* 'default' enter sequence for region r1 */
+static void entryReactionAction_enseq_EntryReactionAction_r1_default(EntryReactionAction* handle)
+{
+	/* 'default' enter sequence for region r1 */
+	entryReactionAction_react_EntryReactionAction_r1__entry_Default(handle);
+}
+
+/* Default exit sequence for state B */
+static void entryReactionAction_exseq_EntryReactionAction_r2_B(EntryReactionAction* handle)
+{
+	/* Default exit sequence for state B */
+	entryReactionAction_exseq_EntryReactionAction_r2_B_r(handle);
+}
+
+/* Default exit sequence for state BA */
+static void entryReactionAction_exseq_EntryReactionAction_r2_B_r_BA(EntryReactionAction* handle)
+{
+	/* Default exit sequence for state BA */
+	handle->stateConfVector[0] = EntryReactionAction_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state BB */
+static void entryReactionAction_exseq_EntryReactionAction_r2_B_r_BB(EntryReactionAction* handle)
+{
+	/* Default exit sequence for state BB */
+	handle->stateConfVector[0] = EntryReactionAction_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state D */
+static void entryReactionAction_exseq_EntryReactionAction_r2_D(EntryReactionAction* handle)
+{
+	/* Default exit sequence for state D */
+	handle->stateConfVector[0] = EntryReactionAction_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state A */
+static void entryReactionAction_exseq_EntryReactionAction_r1_A(EntryReactionAction* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[1] = EntryReactionAction_last_state;
+	handle->stateConfVectorPosition = 1;
+}
+
+/* Default exit sequence for region r2 */
+static void entryReactionAction_exseq_EntryReactionAction_r2(EntryReactionAction* handle)
+{
+	/* Default exit sequence for region r2 */
+	/* Handle exit of all possible states (of entries.EntryReactionAction.r2) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case EntryReactionAction_EntryReactionAction_r2_B_r_BA :
+		{
+			entryReactionAction_exseq_EntryReactionAction_r2_B_r_BA(handle);
+			break;
+		}
+		case EntryReactionAction_EntryReactionAction_r2_B_r_BB :
+		{
+			entryReactionAction_exseq_EntryReactionAction_r2_B_r_BB(handle);
+			break;
+		}
+		case EntryReactionAction_EntryReactionAction_r2_D :
+		{
+			entryReactionAction_exseq_EntryReactionAction_r2_D(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r */
+static void entryReactionAction_exseq_EntryReactionAction_r2_B_r(EntryReactionAction* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of entries.EntryReactionAction.r2.B.r) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case EntryReactionAction_EntryReactionAction_r2_B_r_BA :
+		{
+			entryReactionAction_exseq_EntryReactionAction_r2_B_r_BA(handle);
+			break;
+		}
+		case EntryReactionAction_EntryReactionAction_r2_B_r_BB :
+		{
+			entryReactionAction_exseq_EntryReactionAction_r2_B_r_BB(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r1 */
+static void entryReactionAction_exseq_EntryReactionAction_r1(EntryReactionAction* handle)
+{
+	/* Default exit sequence for region r1 */
+	/* Handle exit of all possible states (of entries.EntryReactionAction.r1) at position 1... */
+	switch(handle->stateConfVector[ 1 ])
+	{
+		case EntryReactionAction_EntryReactionAction_r1_A :
+		{
+			entryReactionAction_exseq_EntryReactionAction_r1_A(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state BA. */
+static void entryReactionAction_react_EntryReactionAction_r2_B_r_BA(EntryReactionAction* handle)
+{
+	/* The reactions of state BA. */
+	if (entryReactionAction_check_EntryReactionAction_r2_B_tr0_tr0(handle) == bool_true)
+	{ 
+		entryReactionAction_effect_EntryReactionAction_r2_B_tr0(handle);
+	}  else
+	{
+		if (entryReactionAction_check_EntryReactionAction_r2_B_r_BA_tr0_tr0(handle) == bool_true)
+		{ 
+			entryReactionAction_effect_EntryReactionAction_r2_B_r_BA_tr0(handle);
+		} 
+	}
+}
+
+/* The reactions of state BB. */
+static void entryReactionAction_react_EntryReactionAction_r2_B_r_BB(EntryReactionAction* handle)
+{
+	/* The reactions of state BB. */
+	if (entryReactionAction_check_EntryReactionAction_r2_B_tr0_tr0(handle) == bool_true)
+	{ 
+		entryReactionAction_effect_EntryReactionAction_r2_B_tr0(handle);
+	}  else
+	{
+		if (entryReactionAction_check_EntryReactionAction_r2_B_r_BB_tr0_tr0(handle) == bool_true)
+		{ 
+			entryReactionAction_effect_EntryReactionAction_r2_B_r_BB_tr0(handle);
+		} 
+	}
+}
+
+/* The reactions of state D. */
+static void entryReactionAction_react_EntryReactionAction_r2_D(EntryReactionAction* handle)
+{
+	/* The reactions of state D. */
+	if (entryReactionAction_check_EntryReactionAction_r2_D_tr0_tr0(handle) == bool_true)
+	{ 
+		entryReactionAction_effect_EntryReactionAction_r2_D_tr0(handle);
+	}  else
+	{
+		if (entryReactionAction_check_EntryReactionAction_r2_D_tr1_tr1(handle) == bool_true)
+		{ 
+			entryReactionAction_effect_EntryReactionAction_r2_D_tr1(handle);
+		} 
+	}
+}
+
+/* The reactions of state A. */
+static void entryReactionAction_react_EntryReactionAction_r1_A(EntryReactionAction* handle)
+{
+}
+
+/* Default react sequence for initial entry default */
+static void entryReactionAction_react_EntryReactionAction_r2_default(EntryReactionAction* handle)
+{
+	/* Default react sequence for initial entry default */
+	handle->iface.enteredR2 = bool_true;
+	entryReactionAction_enseq_EntryReactionAction_r2_B_default(handle);
+}
+
+/* Default react sequence for shallow history entry default */
+static void entryReactionAction_react_EntryReactionAction_r2_B_r_default(EntryReactionAction* handle)
+{
+	/* Default react sequence for shallow history entry default */
+	/* Enter the region with shallow history */
+	if (handle->historyVector[0] != EntryReactionAction_last_state)
+	{
+		entryReactionAction_shenseq_EntryReactionAction_r2_B_r(handle);
+	} else
+	{
+		handle->iface.enteredBdefault = bool_true;
+		entryReactionAction_enseq_EntryReactionAction_r2_B_r_BA_default(handle);
+	} 
+}
+
+/* Default react sequence for initial entry other */
+static void entryReactionAction_react_EntryReactionAction_r2_B_r_other(EntryReactionAction* handle)
+{
+	/* Default react sequence for initial entry other */
+	handle->iface.enteredBother = bool_true;
+	entryReactionAction_enseq_EntryReactionAction_r2_B_r_BB_default(handle);
+}
+
+/* Default react sequence for initial entry  */
+static void entryReactionAction_react_EntryReactionAction_r1__entry_Default(EntryReactionAction* handle)
+{
+	/* Default react sequence for initial entry  */
+	handle->iface.enteredR1 = bool_true;
+	entryReactionAction_enseq_EntryReactionAction_r1_A_default(handle);
+}
+
+

+ 110 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionAction.h

@@ -0,0 +1,110 @@
+
+#ifndef ENTRYREACTIONACTION_H_
+#define ENTRYREACTIONACTION_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'EntryReactionAction'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	EntryReactionAction_EntryReactionAction_r2_B,
+	EntryReactionAction_EntryReactionAction_r2_B_r_BA,
+	EntryReactionAction_EntryReactionAction_r2_B_r_BB,
+	EntryReactionAction_EntryReactionAction_r2_D,
+	EntryReactionAction_EntryReactionAction_r1_A,
+	EntryReactionAction_last_state
+} EntryReactionActionStates;
+
+/*! Type definition of the data structure for the EntryReactionActionIface interface scope. */
+typedef struct
+{
+	sc_boolean enteredR1;
+	sc_boolean enteredR2;
+	sc_boolean enteredBdefault;
+	sc_boolean enteredBother;
+	sc_boolean b_raised;
+	sc_boolean d_raised;
+} EntryReactionActionIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define ENTRYREACTIONACTION_MAX_ORTHOGONAL_STATES 2
+	/*! Define dimension of the state configuration vector for history states. */
+#define ENTRYREACTIONACTION_MAX_HISTORY_STATES 1
+
+/*! 
+ * Type definition of the data structure for the EntryReactionAction state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	EntryReactionActionStates stateConfVector[ENTRYREACTIONACTION_MAX_ORTHOGONAL_STATES];
+	EntryReactionActionStates historyVector[ENTRYREACTIONACTION_MAX_HISTORY_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	EntryReactionActionIface iface;
+} EntryReactionAction;
+
+/*! Initializes the EntryReactionAction state machine data structures. Must be called before first usage.*/
+extern void entryReactionAction_init(EntryReactionAction* handle);
+
+/*! Activates the state machine */
+extern void entryReactionAction_enter(EntryReactionAction* handle);
+
+/*! Deactivates the state machine */
+extern void entryReactionAction_exit(EntryReactionAction* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void entryReactionAction_runCycle(EntryReactionAction* handle);
+
+
+/*! Gets the value of the variable 'enteredR1' that is defined in the default interface scope. */ 
+extern sc_boolean entryReactionActionIface_get_enteredR1(const EntryReactionAction* handle);
+/*! Sets the value of the variable 'enteredR1' that is defined in the default interface scope. */ 
+extern void entryReactionActionIface_set_enteredR1(EntryReactionAction* handle, sc_boolean value);
+/*! Gets the value of the variable 'enteredR2' that is defined in the default interface scope. */ 
+extern sc_boolean entryReactionActionIface_get_enteredR2(const EntryReactionAction* handle);
+/*! Sets the value of the variable 'enteredR2' that is defined in the default interface scope. */ 
+extern void entryReactionActionIface_set_enteredR2(EntryReactionAction* handle, sc_boolean value);
+/*! Gets the value of the variable 'enteredBdefault' that is defined in the default interface scope. */ 
+extern sc_boolean entryReactionActionIface_get_enteredBdefault(const EntryReactionAction* handle);
+/*! Sets the value of the variable 'enteredBdefault' that is defined in the default interface scope. */ 
+extern void entryReactionActionIface_set_enteredBdefault(EntryReactionAction* handle, sc_boolean value);
+/*! Gets the value of the variable 'enteredBother' that is defined in the default interface scope. */ 
+extern sc_boolean entryReactionActionIface_get_enteredBother(const EntryReactionAction* handle);
+/*! Sets the value of the variable 'enteredBother' that is defined in the default interface scope. */ 
+extern void entryReactionActionIface_set_enteredBother(EntryReactionAction* handle, sc_boolean value);
+/*! Raises the in event 'b' that is defined in the default interface scope. */ 
+extern void entryReactionActionIface_raise_b(EntryReactionAction* handle);
+
+/*! Raises the in event 'd' that is defined in the default interface scope. */ 
+extern void entryReactionActionIface_raise_d(EntryReactionAction* handle);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean entryReactionAction_isActive(const EntryReactionAction* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean entryReactionAction_isFinal(const EntryReactionAction* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean entryReactionAction_isStateActive(const EntryReactionAction* handle, EntryReactionActionStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* ENTRYREACTIONACTION_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionAction.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart entries.EntryReactionAction {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/EntryReactionActionTest"
+			targetProject = "gtests"
+			targetFolder = "EntryReactionActionTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 8 - 8
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionActionTest.cc

@@ -31,10 +31,10 @@ TEST(StatemachineTest, entryOnRTS) {
 	entryReactionAction_runCycle(&handle);
 	entryReactionActionIface_raise_d(&handle);
 	entryReactionAction_runCycle(&handle);
-	entryReactionActionIface_set_enteredR1(false);
-	entryReactionActionIface_set_enteredR2(false);
-	entryReactionActionIface_set_enteredBdefault(false);
-	entryReactionActionIface_set_enteredBother(false);
+	entryReactionActionIface_set_enteredR1(&handle,false);
+	entryReactionActionIface_set_enteredR2(&handle,false);
+	entryReactionActionIface_set_enteredBdefault(&handle,false);
+	entryReactionActionIface_set_enteredBother(&handle,false);
 	entryReactionActionIface_raise_b(&handle);
 	entryReactionAction_runCycle(&handle);
 	EXPECT_TRUE(!entryReactionActionIface_get_enteredR1(&handle));
@@ -50,10 +50,10 @@ TEST(StatemachineTest, noEntryTransitionActionOnHistory) {
 	entryReactionAction_runCycle(&handle);
 	entryReactionActionIface_raise_d(&handle);
 	entryReactionAction_runCycle(&handle);
-	entryReactionActionIface_set_enteredR1(false);
-	entryReactionActionIface_set_enteredR2(false);
-	entryReactionActionIface_set_enteredBdefault(false);
-	entryReactionActionIface_set_enteredBother(false);
+	entryReactionActionIface_set_enteredR1(&handle,false);
+	entryReactionActionIface_set_enteredR2(&handle,false);
+	entryReactionActionIface_set_enteredBdefault(&handle,false);
+	entryReactionActionIface_set_enteredBother(&handle,false);
 	entryReactionActionIface_raise_d(&handle);
 	entryReactionAction_runCycle(&handle);
 	EXPECT_TRUE(!entryReactionActionIface_get_enteredR1(&handle));

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 318 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.c

@@ -0,0 +1,318 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "ExitOnSelfTransition.h"
+/*! \file Implementation of the state machine 'ExitOnSelfTransition'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean exitOnSelfTransition_check_main_region_A_tr0_tr0(const ExitOnSelfTransition* handle);
+static sc_boolean exitOnSelfTransition_check_main_region_A_tr1_tr1(const ExitOnSelfTransition* handle);
+static sc_boolean exitOnSelfTransition_check_main_region_B_tr0_tr0(const ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_effect_main_region_A_tr0(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_effect_main_region_A_tr1(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_effect_main_region_B_tr0(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_enact_main_region_A(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_exact_main_region_A(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_enseq_main_region_A_default(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_enseq_main_region_B_default(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_enseq_main_region_default(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_exseq_main_region_A(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_exseq_main_region_B(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_exseq_main_region(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_react_main_region_A(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_react_main_region_B(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_react_main_region__entry_Default(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_clearInEvents(ExitOnSelfTransition* handle);
+static void exitOnSelfTransition_clearOutEvents(ExitOnSelfTransition* handle);
+
+
+void exitOnSelfTransition_init(ExitOnSelfTransition* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < EXITONSELFTRANSITION_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = ExitOnSelfTransition_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	exitOnSelfTransition_clearInEvents(handle);
+	exitOnSelfTransition_clearOutEvents(handle);
+
+	/* Default init sequence for statechart ExitOnSelfTransition */
+	handle->iface.entryCount = 0;
+	handle->iface.exitCount = 0;
+
+}
+
+void exitOnSelfTransition_enter(ExitOnSelfTransition* handle)
+{
+	/* Default enter sequence for statechart ExitOnSelfTransition */
+	exitOnSelfTransition_enseq_main_region_default(handle);
+}
+
+void exitOnSelfTransition_exit(ExitOnSelfTransition* handle)
+{
+	/* Default exit sequence for statechart ExitOnSelfTransition */
+	exitOnSelfTransition_exseq_main_region(handle);
+}
+
+sc_boolean exitOnSelfTransition_isActive(const ExitOnSelfTransition* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != ExitOnSelfTransition_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean exitOnSelfTransition_isFinal(const ExitOnSelfTransition* handle)
+{
+   return bool_false;
+}
+
+static void exitOnSelfTransition_clearInEvents(ExitOnSelfTransition* handle)
+{
+	handle->iface.e_raised = bool_false;
+	handle->iface.f_raised = bool_false;
+}
+
+static void exitOnSelfTransition_clearOutEvents(ExitOnSelfTransition* handle)
+{
+}
+
+void exitOnSelfTransition_runCycle(ExitOnSelfTransition* handle)
+{
+	
+	exitOnSelfTransition_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < EXITONSELFTRANSITION_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case ExitOnSelfTransition_main_region_A :
+		{
+			exitOnSelfTransition_react_main_region_A(handle);
+			break;
+		}
+		case ExitOnSelfTransition_main_region_B :
+		{
+			exitOnSelfTransition_react_main_region_B(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	exitOnSelfTransition_clearInEvents(handle);
+}
+
+
+sc_boolean exitOnSelfTransition_isStateActive(const ExitOnSelfTransition* handle, ExitOnSelfTransitionStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case ExitOnSelfTransition_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == ExitOnSelfTransition_main_region_A
+			);
+			break;
+		case ExitOnSelfTransition_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == ExitOnSelfTransition_main_region_B
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void exitOnSelfTransitionIface_raise_e(ExitOnSelfTransition* handle)
+{
+	handle->iface.e_raised = bool_true;
+}
+void exitOnSelfTransitionIface_raise_f(ExitOnSelfTransition* handle)
+{
+	handle->iface.f_raised = bool_true;
+}
+
+
+sc_integer exitOnSelfTransitionIface_get_entryCount(const ExitOnSelfTransition* handle)
+{
+	return handle->iface.entryCount;
+}
+void exitOnSelfTransitionIface_set_entryCount(ExitOnSelfTransition* handle, sc_integer value)
+{
+	handle->iface.entryCount = value;
+}
+sc_integer exitOnSelfTransitionIface_get_exitCount(const ExitOnSelfTransition* handle)
+{
+	return handle->iface.exitCount;
+}
+void exitOnSelfTransitionIface_set_exitCount(ExitOnSelfTransition* handle, sc_integer value)
+{
+	handle->iface.exitCount = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean exitOnSelfTransition_check_main_region_A_tr0_tr0(const ExitOnSelfTransition* handle)
+{
+	return handle->iface.e_raised;
+}
+
+static sc_boolean exitOnSelfTransition_check_main_region_A_tr1_tr1(const ExitOnSelfTransition* handle)
+{
+	return handle->iface.f_raised;
+}
+
+static sc_boolean exitOnSelfTransition_check_main_region_B_tr0_tr0(const ExitOnSelfTransition* handle)
+{
+	return handle->iface.f_raised;
+}
+
+static void exitOnSelfTransition_effect_main_region_A_tr0(ExitOnSelfTransition* handle)
+{
+	exitOnSelfTransition_exseq_main_region_A(handle);
+	exitOnSelfTransition_enseq_main_region_A_default(handle);
+}
+
+static void exitOnSelfTransition_effect_main_region_A_tr1(ExitOnSelfTransition* handle)
+{
+	exitOnSelfTransition_exseq_main_region_A(handle);
+	exitOnSelfTransition_enseq_main_region_B_default(handle);
+}
+
+static void exitOnSelfTransition_effect_main_region_B_tr0(ExitOnSelfTransition* handle)
+{
+	exitOnSelfTransition_exseq_main_region_B(handle);
+	exitOnSelfTransition_enseq_main_region_A_default(handle);
+}
+
+/* Entry action for state 'A'. */
+static void exitOnSelfTransition_enact_main_region_A(ExitOnSelfTransition* handle)
+{
+	/* Entry action for state 'A'. */
+	handle->iface.entryCount += 1;
+}
+
+/* Exit action for state 'A'. */
+static void exitOnSelfTransition_exact_main_region_A(ExitOnSelfTransition* handle)
+{
+	/* Exit action for state 'A'. */
+	handle->iface.exitCount += 1;
+}
+
+/* 'default' enter sequence for state A */
+static void exitOnSelfTransition_enseq_main_region_A_default(ExitOnSelfTransition* handle)
+{
+	/* 'default' enter sequence for state A */
+	exitOnSelfTransition_enact_main_region_A(handle);
+	handle->stateConfVector[0] = ExitOnSelfTransition_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void exitOnSelfTransition_enseq_main_region_B_default(ExitOnSelfTransition* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = ExitOnSelfTransition_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void exitOnSelfTransition_enseq_main_region_default(ExitOnSelfTransition* handle)
+{
+	/* 'default' enter sequence for region main region */
+	exitOnSelfTransition_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void exitOnSelfTransition_exseq_main_region_A(ExitOnSelfTransition* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = ExitOnSelfTransition_last_state;
+	handle->stateConfVectorPosition = 0;
+	exitOnSelfTransition_exact_main_region_A(handle);
+}
+
+/* Default exit sequence for state B */
+static void exitOnSelfTransition_exseq_main_region_B(ExitOnSelfTransition* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = ExitOnSelfTransition_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void exitOnSelfTransition_exseq_main_region(ExitOnSelfTransition* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of ExitOnSelfTransition.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case ExitOnSelfTransition_main_region_A :
+		{
+			exitOnSelfTransition_exseq_main_region_A(handle);
+			break;
+		}
+		case ExitOnSelfTransition_main_region_B :
+		{
+			exitOnSelfTransition_exseq_main_region_B(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void exitOnSelfTransition_react_main_region_A(ExitOnSelfTransition* handle)
+{
+	/* The reactions of state A. */
+	if (exitOnSelfTransition_check_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		exitOnSelfTransition_effect_main_region_A_tr0(handle);
+	}  else
+	{
+		if (exitOnSelfTransition_check_main_region_A_tr1_tr1(handle) == bool_true)
+		{ 
+			exitOnSelfTransition_effect_main_region_A_tr1(handle);
+		} 
+	}
+}
+
+/* The reactions of state B. */
+static void exitOnSelfTransition_react_main_region_B(ExitOnSelfTransition* handle)
+{
+	/* The reactions of state B. */
+	if (exitOnSelfTransition_check_main_region_B_tr0_tr0(handle) == bool_true)
+	{ 
+		exitOnSelfTransition_effect_main_region_B_tr0(handle);
+	} 
+}
+
+/* Default react sequence for initial entry  */
+static void exitOnSelfTransition_react_main_region__entry_Default(ExitOnSelfTransition* handle)
+{
+	/* Default react sequence for initial entry  */
+	exitOnSelfTransition_enseq_main_region_A_default(handle);
+}
+
+

+ 94 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.h

@@ -0,0 +1,94 @@
+
+#ifndef EXITONSELFTRANSITION_H_
+#define EXITONSELFTRANSITION_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'ExitOnSelfTransition'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	ExitOnSelfTransition_main_region_A,
+	ExitOnSelfTransition_main_region_B,
+	ExitOnSelfTransition_last_state
+} ExitOnSelfTransitionStates;
+
+/*! Type definition of the data structure for the ExitOnSelfTransitionIface interface scope. */
+typedef struct
+{
+	sc_boolean e_raised;
+	sc_boolean f_raised;
+	sc_integer entryCount;
+	sc_integer exitCount;
+} ExitOnSelfTransitionIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define EXITONSELFTRANSITION_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the ExitOnSelfTransition state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	ExitOnSelfTransitionStates stateConfVector[EXITONSELFTRANSITION_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	ExitOnSelfTransitionIface iface;
+} ExitOnSelfTransition;
+
+/*! Initializes the ExitOnSelfTransition state machine data structures. Must be called before first usage.*/
+extern void exitOnSelfTransition_init(ExitOnSelfTransition* handle);
+
+/*! Activates the state machine */
+extern void exitOnSelfTransition_enter(ExitOnSelfTransition* handle);
+
+/*! Deactivates the state machine */
+extern void exitOnSelfTransition_exit(ExitOnSelfTransition* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void exitOnSelfTransition_runCycle(ExitOnSelfTransition* handle);
+
+
+/*! Raises the in event 'e' that is defined in the default interface scope. */ 
+extern void exitOnSelfTransitionIface_raise_e(ExitOnSelfTransition* handle);
+
+/*! Raises the in event 'f' that is defined in the default interface scope. */ 
+extern void exitOnSelfTransitionIface_raise_f(ExitOnSelfTransition* handle);
+
+/*! Gets the value of the variable 'entryCount' that is defined in the default interface scope. */ 
+extern sc_integer exitOnSelfTransitionIface_get_entryCount(const ExitOnSelfTransition* handle);
+/*! Sets the value of the variable 'entryCount' that is defined in the default interface scope. */ 
+extern void exitOnSelfTransitionIface_set_entryCount(ExitOnSelfTransition* handle, sc_integer value);
+/*! Gets the value of the variable 'exitCount' that is defined in the default interface scope. */ 
+extern sc_integer exitOnSelfTransitionIface_get_exitCount(const ExitOnSelfTransition* handle);
+/*! Sets the value of the variable 'exitCount' that is defined in the default interface scope. */ 
+extern void exitOnSelfTransitionIface_set_exitCount(ExitOnSelfTransition* handle, sc_integer value);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean exitOnSelfTransition_isActive(const ExitOnSelfTransition* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean exitOnSelfTransition_isFinal(const ExitOnSelfTransition* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean exitOnSelfTransition_isStateActive(const ExitOnSelfTransition* handle, ExitOnSelfTransitionStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* EXITONSELFTRANSITION_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart ExitOnSelfTransition {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/ExitOnSelfTransitionTest"
+			targetProject = "gtests"
+			targetFolder = "ExitOnSelfTransitionTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 418 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/ExitState.c

@@ -0,0 +1,418 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "ExitState.h"
+/*! \file Implementation of the state machine 'ExitState'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean exitState_check_r_A_r_B_tr0_tr0(const ExitState* handle);
+static sc_boolean exitState_check_r_A_r_B_tr1_tr1(const ExitState* handle);
+static sc_boolean exitState_check_r_A_r_B_tr2_tr2(const ExitState* handle);
+static void exitState_effect_r_A_tr0(ExitState* handle);
+static void exitState_effect_r_A_tr1(ExitState* handle);
+static void exitState_effect_r_A_r_B_tr0(ExitState* handle);
+static void exitState_effect_r_A_r_B_tr1(ExitState* handle);
+static void exitState_effect_r_A_r_B_tr2(ExitState* handle);
+static void exitState_enseq_r_A_default(ExitState* handle);
+static void exitState_enseq_r_A_r_B_default(ExitState* handle);
+static void exitState_enseq_r_E_default(ExitState* handle);
+static void exitState_enseq_r_F_default(ExitState* handle);
+static void exitState_enseq_r_default(ExitState* handle);
+static void exitState_enseq_r_A_r_default(ExitState* handle);
+static void exitState_exseq_r_A(ExitState* handle);
+static void exitState_exseq_r_A_r_B(ExitState* handle);
+static void exitState_exseq_r_E(ExitState* handle);
+static void exitState_exseq_r_F(ExitState* handle);
+static void exitState_exseq_r(ExitState* handle);
+static void exitState_exseq_r_A_r(ExitState* handle);
+static void exitState_react_r_A_r_B(ExitState* handle);
+static void exitState_react_r_E(ExitState* handle);
+static void exitState_react_r_F(ExitState* handle);
+static void exitState_react_r__entry_Default(ExitState* handle);
+static void exitState_react_r_A_r__entry_Default(ExitState* handle);
+static void exitState_react_r_A_r__exit_Default(ExitState* handle);
+static void exitState_react_r_A_r_f(ExitState* handle);
+static void exitState_react_r_A_r_g(ExitState* handle);
+static void exitState_clearInEvents(ExitState* handle);
+static void exitState_clearOutEvents(ExitState* handle);
+
+
+void exitState_init(ExitState* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < EXITSTATE_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = ExitState_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	exitState_clearInEvents(handle);
+	exitState_clearOutEvents(handle);
+
+
+}
+
+void exitState_enter(ExitState* handle)
+{
+	/* Default enter sequence for statechart ExitState */
+	exitState_enseq_r_default(handle);
+}
+
+void exitState_exit(ExitState* handle)
+{
+	/* Default exit sequence for statechart ExitState */
+	exitState_exseq_r(handle);
+}
+
+sc_boolean exitState_isActive(const ExitState* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != ExitState_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean exitState_isFinal(const ExitState* handle)
+{
+   return bool_false;
+}
+
+static void exitState_clearInEvents(ExitState* handle)
+{
+	handle->iface.e_raised = bool_false;
+	handle->iface.f_raised = bool_false;
+	handle->iface.g_raised = bool_false;
+}
+
+static void exitState_clearOutEvents(ExitState* handle)
+{
+}
+
+void exitState_runCycle(ExitState* handle)
+{
+	
+	exitState_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < EXITSTATE_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case ExitState_r_A_r_B :
+		{
+			exitState_react_r_A_r_B(handle);
+			break;
+		}
+		case ExitState_r_E :
+		{
+			exitState_react_r_E(handle);
+			break;
+		}
+		case ExitState_r_F :
+		{
+			exitState_react_r_F(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	exitState_clearInEvents(handle);
+}
+
+
+sc_boolean exitState_isStateActive(const ExitState* handle, ExitStateStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case ExitState_r_A :
+			result = (sc_boolean) (handle->stateConfVector[0] >= ExitState_r_A
+				&& handle->stateConfVector[0] <= ExitState_r_A_r_B);
+			break;
+		case ExitState_r_A_r_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == ExitState_r_A_r_B
+			);
+			break;
+		case ExitState_r_E :
+			result = (sc_boolean) (handle->stateConfVector[0] == ExitState_r_E
+			);
+			break;
+		case ExitState_r_F :
+			result = (sc_boolean) (handle->stateConfVector[0] == ExitState_r_F
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void exitStateIface_raise_e(ExitState* handle)
+{
+	handle->iface.e_raised = bool_true;
+}
+void exitStateIface_raise_f(ExitState* handle)
+{
+	handle->iface.f_raised = bool_true;
+}
+void exitStateIface_raise_g(ExitState* handle)
+{
+	handle->iface.g_raised = bool_true;
+}
+
+
+
+/* implementations of all internal functions */
+
+static sc_boolean exitState_check_r_A_r_B_tr0_tr0(const ExitState* handle)
+{
+	return handle->iface.g_raised;
+}
+
+static sc_boolean exitState_check_r_A_r_B_tr1_tr1(const ExitState* handle)
+{
+	return handle->iface.f_raised;
+}
+
+static sc_boolean exitState_check_r_A_r_B_tr2_tr2(const ExitState* handle)
+{
+	return handle->iface.e_raised;
+}
+
+static void exitState_effect_r_A_tr0(ExitState* handle)
+{
+	exitState_exseq_r_A(handle);
+	exitState_enseq_r_E_default(handle);
+}
+
+static void exitState_effect_r_A_tr1(ExitState* handle)
+{
+	exitState_exseq_r_A(handle);
+	exitState_enseq_r_F_default(handle);
+}
+
+static void exitState_effect_r_A_r_B_tr0(ExitState* handle)
+{
+	exitState_exseq_r_A_r_B(handle);
+	exitState_react_r_A_r_g(handle);
+}
+
+static void exitState_effect_r_A_r_B_tr1(ExitState* handle)
+{
+	exitState_exseq_r_A_r_B(handle);
+	exitState_react_r_A_r_f(handle);
+}
+
+static void exitState_effect_r_A_r_B_tr2(ExitState* handle)
+{
+	exitState_exseq_r_A_r_B(handle);
+	exitState_react_r_A_r__exit_Default(handle);
+}
+
+/* 'default' enter sequence for state A */
+static void exitState_enseq_r_A_default(ExitState* handle)
+{
+	/* 'default' enter sequence for state A */
+	exitState_enseq_r_A_r_default(handle);
+}
+
+/* 'default' enter sequence for state B */
+static void exitState_enseq_r_A_r_B_default(ExitState* handle)
+{
+	/* 'default' enter sequence for state B */
+	handle->stateConfVector[0] = ExitState_r_A_r_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state E */
+static void exitState_enseq_r_E_default(ExitState* handle)
+{
+	/* 'default' enter sequence for state E */
+	handle->stateConfVector[0] = ExitState_r_E;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state F */
+static void exitState_enseq_r_F_default(ExitState* handle)
+{
+	/* 'default' enter sequence for state F */
+	handle->stateConfVector[0] = ExitState_r_F;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region r */
+static void exitState_enseq_r_default(ExitState* handle)
+{
+	/* 'default' enter sequence for region r */
+	exitState_react_r__entry_Default(handle);
+}
+
+/* 'default' enter sequence for region r */
+static void exitState_enseq_r_A_r_default(ExitState* handle)
+{
+	/* 'default' enter sequence for region r */
+	exitState_react_r_A_r__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void exitState_exseq_r_A(ExitState* handle)
+{
+	/* Default exit sequence for state A */
+	exitState_exseq_r_A_r(handle);
+}
+
+/* Default exit sequence for state B */
+static void exitState_exseq_r_A_r_B(ExitState* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = ExitState_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state E */
+static void exitState_exseq_r_E(ExitState* handle)
+{
+	/* Default exit sequence for state E */
+	handle->stateConfVector[0] = ExitState_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state F */
+static void exitState_exseq_r_F(ExitState* handle)
+{
+	/* Default exit sequence for state F */
+	handle->stateConfVector[0] = ExitState_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region r */
+static void exitState_exseq_r(ExitState* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of ExitState.r) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case ExitState_r_A_r_B :
+		{
+			exitState_exseq_r_A_r_B(handle);
+			break;
+		}
+		case ExitState_r_E :
+		{
+			exitState_exseq_r_E(handle);
+			break;
+		}
+		case ExitState_r_F :
+		{
+			exitState_exseq_r_F(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* Default exit sequence for region r */
+static void exitState_exseq_r_A_r(ExitState* handle)
+{
+	/* Default exit sequence for region r */
+	/* Handle exit of all possible states (of ExitState.r.A.r) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case ExitState_r_A_r_B :
+		{
+			exitState_exseq_r_A_r_B(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state B. */
+static void exitState_react_r_A_r_B(ExitState* handle)
+{
+	/* The reactions of state B. */
+	if (exitState_check_r_A_r_B_tr0_tr0(handle) == bool_true)
+	{ 
+		exitState_effect_r_A_r_B_tr0(handle);
+	}  else
+	{
+		if (exitState_check_r_A_r_B_tr1_tr1(handle) == bool_true)
+		{ 
+			exitState_effect_r_A_r_B_tr1(handle);
+		}  else
+		{
+			if (exitState_check_r_A_r_B_tr2_tr2(handle) == bool_true)
+			{ 
+				exitState_effect_r_A_r_B_tr2(handle);
+			} 
+		}
+	}
+}
+
+/* The reactions of state E. */
+static void exitState_react_r_E(ExitState* handle)
+{
+	/* The reactions of state E. */
+}
+
+/* The reactions of state F. */
+static void exitState_react_r_F(ExitState* handle)
+{
+	/* The reactions of state F. */
+}
+
+/* Default react sequence for initial entry  */
+static void exitState_react_r__entry_Default(ExitState* handle)
+{
+	/* Default react sequence for initial entry  */
+	exitState_enseq_r_A_default(handle);
+}
+
+/* Default react sequence for initial entry  */
+static void exitState_react_r_A_r__entry_Default(ExitState* handle)
+{
+	/* Default react sequence for initial entry  */
+	exitState_enseq_r_A_r_B_default(handle);
+}
+
+/* The reactions of exit default. */
+static void exitState_react_r_A_r__exit_Default(ExitState* handle)
+{
+	/* The reactions of exit default. */
+	exitState_effect_r_A_tr0(handle);
+}
+
+/* The reactions of exit f. */
+static void exitState_react_r_A_r_f(ExitState* handle)
+{
+	/* The reactions of exit f. */
+	exitState_effect_r_A_tr1(handle);
+}
+
+/* The reactions of exit g. */
+static void exitState_react_r_A_r_g(ExitState* handle)
+{
+	/* The reactions of exit g. */
+	exitState_effect_r_A_tr0(handle);
+}
+
+

+ 90 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/ExitState.h

@@ -0,0 +1,90 @@
+
+#ifndef EXITSTATE_H_
+#define EXITSTATE_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'ExitState'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	ExitState_r_A,
+	ExitState_r_A_r_B,
+	ExitState_r_E,
+	ExitState_r_F,
+	ExitState_last_state
+} ExitStateStates;
+
+/*! Type definition of the data structure for the ExitStateIface interface scope. */
+typedef struct
+{
+	sc_boolean e_raised;
+	sc_boolean f_raised;
+	sc_boolean g_raised;
+} ExitStateIface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define EXITSTATE_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the ExitState state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	ExitStateStates stateConfVector[EXITSTATE_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	ExitStateIface iface;
+} ExitState;
+
+/*! Initializes the ExitState state machine data structures. Must be called before first usage.*/
+extern void exitState_init(ExitState* handle);
+
+/*! Activates the state machine */
+extern void exitState_enter(ExitState* handle);
+
+/*! Deactivates the state machine */
+extern void exitState_exit(ExitState* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void exitState_runCycle(ExitState* handle);
+
+
+/*! Raises the in event 'e' that is defined in the default interface scope. */ 
+extern void exitStateIface_raise_e(ExitState* handle);
+
+/*! Raises the in event 'f' that is defined in the default interface scope. */ 
+extern void exitStateIface_raise_f(ExitState* handle);
+
+/*! Raises the in event 'g' that is defined in the default interface scope. */ 
+extern void exitStateIface_raise_g(ExitState* handle);
+
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean exitState_isActive(const ExitState* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean exitState_isFinal(const ExitState* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean exitState_isStateActive(const ExitState* handle, ExitStateStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* EXITSTATE_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/ExitState.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart ExitState {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/ExitStateTest"
+			targetProject = "gtests"
+			targetFolder = "ExitStateTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 277 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/FeatureCalls.c

@@ -0,0 +1,277 @@
+
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "FeatureCalls.h"
+/*! \file Implementation of the state machine 'FeatureCalls'
+*/
+
+/* prototypes of all internal functions */
+static sc_boolean featureCalls_check_main_region_A_tr0_tr0(const FeatureCalls* handle);
+static sc_boolean featureCalls_check_main_region_B_tr0_tr0(const FeatureCalls* handle);
+static void featureCalls_effect_main_region_A_tr0(FeatureCalls* handle);
+static void featureCalls_effect_main_region_B_tr0(FeatureCalls* handle);
+static void featureCalls_enact_main_region_B(FeatureCalls* handle);
+static void featureCalls_enseq_main_region_A_default(FeatureCalls* handle);
+static void featureCalls_enseq_main_region_B_default(FeatureCalls* handle);
+static void featureCalls_enseq_main_region_default(FeatureCalls* handle);
+static void featureCalls_exseq_main_region_A(FeatureCalls* handle);
+static void featureCalls_exseq_main_region_B(FeatureCalls* handle);
+static void featureCalls_exseq_main_region(FeatureCalls* handle);
+static void featureCalls_react_main_region_A(FeatureCalls* handle);
+static void featureCalls_react_main_region_B(FeatureCalls* handle);
+static void featureCalls_react_main_region__entry_Default(FeatureCalls* handle);
+static void featureCalls_clearInEvents(FeatureCalls* handle);
+static void featureCalls_clearOutEvents(FeatureCalls* handle);
+
+
+void featureCalls_init(FeatureCalls* handle)
+{
+	sc_integer i;
+
+	for (i = 0; i < FEATURECALLS_MAX_ORTHOGONAL_STATES; ++i)
+	{
+		handle->stateConfVector[i] = FeatureCalls_last_state;
+	}
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	featureCalls_clearInEvents(handle);
+	featureCalls_clearOutEvents(handle);
+
+	/* Default init sequence for statechart FeatureCalls */
+	handle->ifaceMyInterface.myInt = 0;
+
+}
+
+void featureCalls_enter(FeatureCalls* handle)
+{
+	/* Default enter sequence for statechart FeatureCalls */
+	featureCalls_enseq_main_region_default(handle);
+}
+
+void featureCalls_exit(FeatureCalls* handle)
+{
+	/* Default exit sequence for statechart FeatureCalls */
+	featureCalls_exseq_main_region(handle);
+}
+
+sc_boolean featureCalls_isActive(const FeatureCalls* handle)
+{
+	sc_boolean result;
+	if (handle->stateConfVector[0] != FeatureCalls_last_state)
+	{
+		result =  bool_true;
+	}
+	else
+	{
+		result = bool_false;
+	}
+	return result;
+}
+
+/* 
+ * Always returns 'false' since this state machine can never become final.
+ */
+sc_boolean featureCalls_isFinal(const FeatureCalls* handle)
+{
+   return bool_false;
+}
+
+static void featureCalls_clearInEvents(FeatureCalls* handle)
+{
+	handle->ifaceMyInterface.Event1_raised = bool_false;
+}
+
+static void featureCalls_clearOutEvents(FeatureCalls* handle)
+{
+}
+
+void featureCalls_runCycle(FeatureCalls* handle)
+{
+	
+	featureCalls_clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < FEATURECALLS_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++)
+		{
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition])
+		{
+		case FeatureCalls_main_region_A :
+		{
+			featureCalls_react_main_region_A(handle);
+			break;
+		}
+		case FeatureCalls_main_region_B :
+		{
+			featureCalls_react_main_region_B(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	featureCalls_clearInEvents(handle);
+}
+
+
+sc_boolean featureCalls_isStateActive(const FeatureCalls* handle, FeatureCallsStates state)
+{
+	sc_boolean result = bool_false;
+	switch (state)
+	{
+		case FeatureCalls_main_region_A :
+			result = (sc_boolean) (handle->stateConfVector[0] == FeatureCalls_main_region_A
+			);
+			break;
+		case FeatureCalls_main_region_B :
+			result = (sc_boolean) (handle->stateConfVector[0] == FeatureCalls_main_region_B
+			);
+			break;
+		default:
+			result = bool_false;
+			break;
+	}
+	return result;
+}
+
+void featureCallsIfaceMyInterface_raise_event1(FeatureCalls* handle)
+{
+	handle->ifaceMyInterface.Event1_raised = bool_true;
+}
+
+
+sc_integer featureCallsIfaceMyInterface_get_myInt(const FeatureCalls* handle)
+{
+	return handle->ifaceMyInterface.myInt;
+}
+void featureCallsIfaceMyInterface_set_myInt(FeatureCalls* handle, sc_integer value)
+{
+	handle->ifaceMyInterface.myInt = value;
+}
+
+/* implementations of all internal functions */
+
+static sc_boolean featureCalls_check_main_region_A_tr0_tr0(const FeatureCalls* handle)
+{
+	return handle->ifaceMyInterface.Event1_raised;
+}
+
+static sc_boolean featureCalls_check_main_region_B_tr0_tr0(const FeatureCalls* handle)
+{
+	return handle->ifaceMyInterface.Event1_raised;
+}
+
+static void featureCalls_effect_main_region_A_tr0(FeatureCalls* handle)
+{
+	featureCalls_exseq_main_region_A(handle);
+	featureCalls_enseq_main_region_B_default(handle);
+}
+
+static void featureCalls_effect_main_region_B_tr0(FeatureCalls* handle)
+{
+	featureCalls_exseq_main_region_B(handle);
+	featureCalls_enseq_main_region_A_default(handle);
+}
+
+/* Entry action for state 'B'. */
+static void featureCalls_enact_main_region_B(FeatureCalls* handle)
+{
+	/* Entry action for state 'B'. */
+	handle->ifaceMyInterface.myInt = 42;
+	handle->ifaceMyInterface.Event1_raised = bool_true;
+}
+
+/* 'default' enter sequence for state A */
+static void featureCalls_enseq_main_region_A_default(FeatureCalls* handle)
+{
+	/* 'default' enter sequence for state A */
+	handle->stateConfVector[0] = FeatureCalls_main_region_A;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for state B */
+static void featureCalls_enseq_main_region_B_default(FeatureCalls* handle)
+{
+	/* 'default' enter sequence for state B */
+	featureCalls_enact_main_region_B(handle);
+	handle->stateConfVector[0] = FeatureCalls_main_region_B;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* 'default' enter sequence for region main region */
+static void featureCalls_enseq_main_region_default(FeatureCalls* handle)
+{
+	/* 'default' enter sequence for region main region */
+	featureCalls_react_main_region__entry_Default(handle);
+}
+
+/* Default exit sequence for state A */
+static void featureCalls_exseq_main_region_A(FeatureCalls* handle)
+{
+	/* Default exit sequence for state A */
+	handle->stateConfVector[0] = FeatureCalls_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for state B */
+static void featureCalls_exseq_main_region_B(FeatureCalls* handle)
+{
+	/* Default exit sequence for state B */
+	handle->stateConfVector[0] = FeatureCalls_last_state;
+	handle->stateConfVectorPosition = 0;
+}
+
+/* Default exit sequence for region main region */
+static void featureCalls_exseq_main_region(FeatureCalls* handle)
+{
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of FeatureCalls.main_region) at position 0... */
+	switch(handle->stateConfVector[ 0 ])
+	{
+		case FeatureCalls_main_region_A :
+		{
+			featureCalls_exseq_main_region_A(handle);
+			break;
+		}
+		case FeatureCalls_main_region_B :
+		{
+			featureCalls_exseq_main_region_B(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state A. */
+static void featureCalls_react_main_region_A(FeatureCalls* handle)
+{
+	/* The reactions of state A. */
+	if (featureCalls_check_main_region_A_tr0_tr0(handle) == bool_true)
+	{ 
+		featureCalls_effect_main_region_A_tr0(handle);
+	} 
+}
+
+/* The reactions of state B. */
+static void featureCalls_react_main_region_B(FeatureCalls* handle)
+{
+	/* The reactions of state B. */
+	if (featureCalls_check_main_region_B_tr0_tr0(handle) == bool_true)
+	{ 
+		featureCalls_effect_main_region_B_tr0(handle);
+	} 
+}
+
+/* Default react sequence for initial entry  */
+static void featureCalls_react_main_region__entry_Default(FeatureCalls* handle)
+{
+	/* Default react sequence for initial entry  */
+	featureCalls_enseq_main_region_A_default(handle);
+}
+
+

+ 85 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/FeatureCalls.h

@@ -0,0 +1,85 @@
+
+#ifndef FEATURECALLS_H_
+#define FEATURECALLS_H_
+
+#include "sc_types.h"
+		
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'FeatureCalls'.
+*/
+
+/*! Enumeration of all states */ 
+typedef enum
+{
+	FeatureCalls_main_region_A,
+	FeatureCalls_main_region_B,
+	FeatureCalls_last_state
+} FeatureCallsStates;
+
+/*! Type definition of the data structure for the FeatureCallsIfaceMyInterface interface scope. */
+typedef struct
+{
+	sc_boolean Event1_raised;
+	sc_integer myInt;
+} FeatureCallsIfaceMyInterface;
+
+
+/*! Define dimension of the state configuration vector for orthogonal states. */
+#define FEATURECALLS_MAX_ORTHOGONAL_STATES 1
+
+/*! 
+ * Type definition of the data structure for the FeatureCalls state machine.
+ * This data structure has to be allocated by the client code. 
+ */
+typedef struct
+{
+	FeatureCallsStates stateConfVector[FEATURECALLS_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	FeatureCallsIfaceMyInterface ifaceMyInterface;
+} FeatureCalls;
+
+/*! Initializes the FeatureCalls state machine data structures. Must be called before first usage.*/
+extern void featureCalls_init(FeatureCalls* handle);
+
+/*! Activates the state machine */
+extern void featureCalls_enter(FeatureCalls* handle);
+
+/*! Deactivates the state machine */
+extern void featureCalls_exit(FeatureCalls* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void featureCalls_runCycle(FeatureCalls* handle);
+
+
+/*! Raises the in event 'Event1' that is defined in the interface scope 'MyInterface'. */ 
+extern void featureCallsIfaceMyInterface_raise_event1(FeatureCalls* handle);
+
+/*! Gets the value of the variable 'myInt' that is defined in the interface scope 'MyInterface'. */ 
+extern sc_integer featureCallsIfaceMyInterface_get_myInt(const FeatureCalls* handle);
+/*! Sets the value of the variable 'myInt' that is defined in the interface scope 'MyInterface'. */ 
+extern void featureCallsIfaceMyInterface_set_myInt(FeatureCalls* handle, sc_integer value);
+
+/*!
+ * Checks whether the state machine is active (until 2.4.1 this method was used for states).
+ * 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.
+ */
+extern sc_boolean featureCalls_isActive(const FeatureCalls* handle);
+
+/*!
+ * Checks if all active states are final. 
+ * If there are no active states then the state machine is considered being inactive. In this case this method returns false.
+ */
+extern sc_boolean featureCalls_isFinal(const FeatureCalls* handle);
+
+/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
+extern sc_boolean featureCalls_isStateActive(const FeatureCalls* handle, FeatureCallsStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* FEATURECALLS_H_ */

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/FeatureCalls.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::c {
 	statechart FeatureCalls {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.c.test"
-			targetFolder = "gtests/FeatureCallsTest"
+			targetProject = "gtests"
+			targetFolder = "FeatureCallsTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 42 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/sc_types.h

@@ -0,0 +1,42 @@
+
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define sc_string		char*
+ 
+typedef bool			sc_boolean;
+typedef int_fast16_t	sc_short;
+typedef uint_fast16_t	sc_ushort;
+typedef int32_t			sc_integer;
+typedef uint32_t		sc_uinteger;
+
+typedef double			sc_real;
+
+typedef void*			sc_eventid;
+
+typedef intptr_t		sc_intptr_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifndef null
+	#ifdef __cplusplus
+		#define null 0
+	#else
+		#define null ((void *)0)
+	#endif
+#endif
+
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 0 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/FinalStateTest/FinalState.c


Some files were not shown because too many files changed in this diff