Bläddra i källkod

Deleted all generated Files despite the Test and the sgen Model

jthoene 8 år sedan
förälder
incheckning
ed2ac74e90
100 ändrade filer med 0 tillägg och 18562 borttagningar
  1. 0 319
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/AlwaysOncycle.c
  2. 0 86
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/AlwaysOncycle.h
  3. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycleTest/sc_types.h
  4. 0 893
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.c
  5. 0 198
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.h
  6. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/sc_types.h
  7. 0 337
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/BitExpressions.c
  8. 0 120
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/BitExpressions.h
  9. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/sc_types.h
  10. 0 327
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/BooleanExpressions.c
  11. 0 115
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/BooleanExpressions.h
  12. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/sc_types.h
  13. 0 694
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/CKeywords.c
  14. 0 219
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/CKeywords.h
  15. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/sc_types.h
  16. 0 325
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/CastExpressions.c
  17. 0 87
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/CastExpressions.h
  18. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/sc_types.h
  19. 0 541
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/Choice.c
  20. 0 98
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/Choice.h
  21. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/sc_types.h
  22. 0 277
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/ConditionalExpressions.c
  23. 0 90
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/ConditionalExpressions.h
  24. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/sc_types.h
  25. 0 311
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScope.c
  26. 0 90
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScope.h
  27. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/sc_types.h
  28. 0 301
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScope.c
  29. 0 82
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScope.h
  30. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/sc_types.h
  31. 0 311
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScope.c
  32. 0 90
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScope.h
  33. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/sc_types.h
  34. 0 371
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/Constants.c
  35. 0 107
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/Constants.h
  36. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/sc_types.h
  37. 0 525
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/Declarations.c
  38. 0 221
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/Declarations.h
  39. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/sc_types.h
  40. 0 807
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/DeepEntry.c
  41. 0 110
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/DeepEntry.h
  42. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/sc_types.h
  43. 0 911
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/DeepHistory.c
  44. 0 122
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/DeepHistory.h
  45. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/sc_types.h
  46. 0 334
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/DynamicChoice.c
  47. 0 86
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/DynamicChoice.h
  48. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/sc_types.h
  49. 0 216
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/EmptyTransition.c
  50. 0 70
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/EmptyTransition.h
  51. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/sc_types.h
  52. 0 409
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/EnterState.c
  53. 0 90
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/EnterState.h
  54. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/sc_types.h
  55. 0 197
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/EntryChoice.c
  56. 0 69
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/EntryChoice.h
  57. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/sc_types.h
  58. 0 385
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransition.c
  59. 0 95
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransition.h
  60. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/sc_types.h
  61. 0 588
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionAction.c
  62. 0 110
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionAction.h
  63. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/sc_types.h
  64. 0 318
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.c
  65. 0 94
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.h
  66. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/sc_types.h
  67. 0 418
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/ExitState.c
  68. 0 90
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/ExitState.h
  69. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/sc_types.h
  70. 0 277
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/FeatureCalls.c
  71. 0 85
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/FeatureCalls.h
  72. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/sc_types.h
  73. 0 228
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FinalStateTest/FinalState.c
  74. 0 70
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FinalStateTest/FinalState.h
  75. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/FinalStateTest/sc_types.h
  76. 0 305
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardTest/Guard.c
  77. 0 93
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardTest/Guard.h
  78. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardTest/sc_types.h
  79. 0 288
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntryTest/GuardedEntry.c
  80. 0 90
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntryTest/GuardedEntry.h
  81. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntryTest/sc_types.h
  82. 0 288
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExitTest/GuardedExit.c
  83. 0 90
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExitTest/GuardedExit.h
  84. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExitTest/sc_types.h
  85. 0 469
      test-plugins/org.yakindu.sct.generator.c.test/gtests/HistoryWithExitPointTest/HistoryWithExitPoint.c
  86. 0 93
      test-plugins/org.yakindu.sct.generator.c.test/gtests/HistoryWithExitPointTest/HistoryWithExitPoint.h
  87. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/HistoryWithExitPointTest/sc_types.h
  88. 0 598
      test-plugins/org.yakindu.sct.generator.c.test/gtests/HistoryWithoutInitialStepTest/HistoryWithoutInitialStep.c
  89. 0 99
      test-plugins/org.yakindu.sct.generator.c.test/gtests/HistoryWithoutInitialStepTest/HistoryWithoutInitialStep.h
  90. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/HistoryWithoutInitialStepTest/sc_types.h
  91. 0 210
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycleTest/InEventLifeCycle.c
  92. 0 84
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycleTest/InEventLifeCycle.h
  93. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycleTest/sc_types.h
  94. 0 456
      test-plugins/org.yakindu.sct.generator.c.test/gtests/IntegerExpressionsTest/IntegerExpressions.c
  95. 0 180
      test-plugins/org.yakindu.sct.generator.c.test/gtests/IntegerExpressionsTest/IntegerExpressions.h
  96. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/IntegerExpressionsTest/sc_types.h
  97. 0 425
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InternalEventLifeCycleTest/InternalEventLifeCycle.c
  98. 0 94
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InternalEventLifeCycleTest/InternalEventLifeCycle.h
  99. 0 42
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InternalEventLifeCycleTest/sc_types.h
  100. 0 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/LocalReactionsTest/LocalReactions.c

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

@@ -1,319 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,86 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 893
test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.c

@@ -1,893 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,198 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 337
test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressionsTest/BitExpressions.c

@@ -1,337 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,120 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 327
test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressionsTest/BooleanExpressions.c

@@ -1,327 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,115 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 694
test-plugins/org.yakindu.sct.generator.c.test/gtests/CKeywordsTest/CKeywords.c

@@ -1,694 +0,0 @@
-
-#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);
-	} 
-}
-
-

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

@@ -1,219 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 325
test-plugins/org.yakindu.sct.generator.c.test/gtests/CastExpressionsTest/CastExpressions.c

@@ -1,325 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,87 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 541
test-plugins/org.yakindu.sct.generator.c.test/gtests/ChoiceTest/Choice.c

@@ -1,541 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,98 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 277
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConditionalExpression/ConditionalExpressions.c

@@ -1,277 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,90 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 311
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScope.c

@@ -1,311 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,90 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 301
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScope.c

@@ -1,301 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,82 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 311
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScope.c

@@ -1,311 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,90 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 371
test-plugins/org.yakindu.sct.generator.c.test/gtests/ConstantsTests/Constants.c

@@ -1,371 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,107 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 525
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeclarationsTest/Declarations.c

@@ -1,525 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,221 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 807
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepEntryTest/DeepEntry.c

@@ -1,807 +0,0 @@
-
-#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];
-	} 
-}
-
-

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

@@ -1,110 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 911
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistoryTest/DeepHistory.c

@@ -1,911 +0,0 @@
-
-#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);
-	} 
-}
-
-

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

@@ -1,122 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 334
test-plugins/org.yakindu.sct.generator.c.test/gtests/DynamicChoiceTest/DynamicChoice.c

@@ -1,334 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,86 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 216
test-plugins/org.yakindu.sct.generator.c.test/gtests/EmptyTransitionTest/EmptyTransition.c

@@ -1,216 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,70 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 409
test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterStateTest/EnterState.c

@@ -1,409 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,90 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 197
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryChoiceTest/EntryChoice.c

@@ -1,197 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,69 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 385
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransition.c

@@ -1,385 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,95 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 588
test-plugins/org.yakindu.sct.generator.c.test/gtests/EntryReactionActionTest/EntryReactionAction.c

@@ -1,588 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,110 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 318
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.c

@@ -1,318 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,94 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 418
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitStateTest/ExitState.c

@@ -1,418 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,90 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 277
test-plugins/org.yakindu.sct.generator.c.test/gtests/FeatureCallsTest/FeatureCalls.c

@@ -1,277 +0,0 @@
-
-#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);
-}
-
-

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

@@ -1,85 +0,0 @@
-
-#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_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 228
test-plugins/org.yakindu.sct.generator.c.test/gtests/FinalStateTest/FinalState.c

@@ -1,228 +0,0 @@
-
-#include <stdlib.h>
-#include <string.h>
-#include "sc_types.h"
-#include "FinalState.h"
-/*! \file Implementation of the state machine 'FinalState'
-*/
-
-/* prototypes of all internal functions */
-static sc_boolean finalState_check_main_region_myState_tr0_tr0(const FinalState* handle);
-static void finalState_effect_main_region_myState_tr0(FinalState* handle);
-static void finalState_enseq_main_region_myState_default(FinalState* handle);
-static void finalState_enseq_main_region__final__default(FinalState* handle);
-static void finalState_enseq_main_region_default(FinalState* handle);
-static void finalState_exseq_main_region_myState(FinalState* handle);
-static void finalState_exseq_main_region__final_(FinalState* handle);
-static void finalState_exseq_main_region(FinalState* handle);
-static void finalState_react_main_region_myState(FinalState* handle);
-static void finalState_react_main_region__final_(FinalState* handle);
-static void finalState_react_main_region__entry_Default(FinalState* handle);
-static void finalState_clearInEvents(FinalState* handle);
-static void finalState_clearOutEvents(FinalState* handle);
-
-
-void finalState_init(FinalState* handle)
-{
-	sc_integer i;
-
-	for (i = 0; i < FINALSTATE_MAX_ORTHOGONAL_STATES; ++i)
-	{
-		handle->stateConfVector[i] = FinalState_last_state;
-	}
-	
-	
-	handle->stateConfVectorPosition = 0;
-
-	finalState_clearInEvents(handle);
-	finalState_clearOutEvents(handle);
-
-
-}
-
-void finalState_enter(FinalState* handle)
-{
-	/* Default enter sequence for statechart FinalState */
-	finalState_enseq_main_region_default(handle);
-}
-
-void finalState_exit(FinalState* handle)
-{
-	/* Default exit sequence for statechart FinalState */
-	finalState_exseq_main_region(handle);
-}
-
-sc_boolean finalState_isActive(const FinalState* handle)
-{
-	sc_boolean result;
-	if (handle->stateConfVector[0] != FinalState_last_state)
-	{
-		result =  bool_true;
-	}
-	else
-	{
-		result = bool_false;
-	}
-	return result;
-}
-
-sc_boolean finalState_isFinal(const FinalState* handle)
-{
-	return (handle->stateConfVector[0] == FinalState_main_region__final_);
-
-}
-
-static void finalState_clearInEvents(FinalState* handle)
-{
-}
-
-static void finalState_clearOutEvents(FinalState* handle)
-{
-}
-
-void finalState_runCycle(FinalState* handle)
-{
-	
-	finalState_clearOutEvents(handle);
-	
-	for (handle->stateConfVectorPosition = 0;
-		handle->stateConfVectorPosition < FINALSTATE_MAX_ORTHOGONAL_STATES;
-		handle->stateConfVectorPosition++)
-		{
-			
-		switch (handle->stateConfVector[handle->stateConfVectorPosition])
-		{
-		case FinalState_main_region_myState :
-		{
-			finalState_react_main_region_myState(handle);
-			break;
-		}
-		case FinalState_main_region__final_ :
-		{
-			finalState_react_main_region__final_(handle);
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	finalState_clearInEvents(handle);
-}
-
-
-sc_boolean finalState_isStateActive(const FinalState* handle, FinalStateStates state)
-{
-	sc_boolean result = bool_false;
-	switch (state)
-	{
-		case FinalState_main_region_myState :
-			result = (sc_boolean) (handle->stateConfVector[0] == FinalState_main_region_myState
-			);
-			break;
-		case FinalState_main_region__final_ :
-			result = (sc_boolean) (handle->stateConfVector[0] == FinalState_main_region__final_
-			);
-			break;
-		default:
-			result = bool_false;
-			break;
-	}
-	return result;
-}
-
-
-/* implementations of all internal functions */
-
-static sc_boolean finalState_check_main_region_myState_tr0_tr0(const FinalState* handle)
-{
-	return bool_true;
-}
-
-static void finalState_effect_main_region_myState_tr0(FinalState* handle)
-{
-	finalState_exseq_main_region_myState(handle);
-	finalState_enseq_main_region__final__default(handle);
-}
-
-/* 'default' enter sequence for state myState */
-static void finalState_enseq_main_region_myState_default(FinalState* handle)
-{
-	/* 'default' enter sequence for state myState */
-	handle->stateConfVector[0] = FinalState_main_region_myState;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default enter sequence for state null */
-static void finalState_enseq_main_region__final__default(FinalState* handle)
-{
-	/* Default enter sequence for state null */
-	handle->stateConfVector[0] = FinalState_main_region__final_;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-static void finalState_enseq_main_region_default(FinalState* handle)
-{
-	/* 'default' enter sequence for region main region */
-	finalState_react_main_region__entry_Default(handle);
-}
-
-/* Default exit sequence for state myState */
-static void finalState_exseq_main_region_myState(FinalState* handle)
-{
-	/* Default exit sequence for state myState */
-	handle->stateConfVector[0] = FinalState_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for final state. */
-static void finalState_exseq_main_region__final_(FinalState* handle)
-{
-	/* Default exit sequence for final state. */
-	handle->stateConfVector[0] = FinalState_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-static void finalState_exseq_main_region(FinalState* handle)
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of FinalState.main_region) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case FinalState_main_region_myState :
-		{
-			finalState_exseq_main_region_myState(handle);
-			break;
-		}
-		case FinalState_main_region__final_ :
-		{
-			finalState_exseq_main_region__final_(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state myState. */
-static void finalState_react_main_region_myState(FinalState* handle)
-{
-	/* The reactions of state myState. */
-	finalState_effect_main_region_myState_tr0(handle);
-}
-
-/* The reactions of state null. */
-static void finalState_react_main_region__final_(FinalState* handle)
-{
-	/* The reactions of state null. */
-}
-
-/* Default react sequence for initial entry  */
-static void finalState_react_main_region__entry_Default(FinalState* handle)
-{
-	/* Default react sequence for initial entry  */
-	finalState_enseq_main_region_myState_default(handle);
-}
-
-

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

@@ -1,70 +0,0 @@
-
-#ifndef FINALSTATE_H_
-#define FINALSTATE_H_
-
-#include "sc_types.h"
-		
-#ifdef __cplusplus
-extern "C" { 
-#endif 
-
-/*! \file Header of the state machine 'FinalState'.
-*/
-
-/*! Enumeration of all states */ 
-typedef enum
-{
-	FinalState_main_region_myState,
-	FinalState_main_region__final_,
-	FinalState_last_state
-} FinalStateStates;
-
-
-/*! Define dimension of the state configuration vector for orthogonal states. */
-#define FINALSTATE_MAX_ORTHOGONAL_STATES 1
-
-/*! 
- * Type definition of the data structure for the FinalState state machine.
- * This data structure has to be allocated by the client code. 
- */
-typedef struct
-{
-	FinalStateStates stateConfVector[FINALSTATE_MAX_ORTHOGONAL_STATES];
-	sc_ushort stateConfVectorPosition; 
-	
-} FinalState;
-
-/*! Initializes the FinalState state machine data structures. Must be called before first usage.*/
-extern void finalState_init(FinalState* handle);
-
-/*! Activates the state machine */
-extern void finalState_enter(FinalState* handle);
-
-/*! Deactivates the state machine */
-extern void finalState_exit(FinalState* handle);
-
-/*! Performs a 'run to completion' step. */
-extern void finalState_runCycle(FinalState* 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 finalState_isActive(const FinalState* 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 finalState_isFinal(const FinalState* handle);
-
-/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
-extern sc_boolean finalState_isStateActive(const FinalState* handle, FinalStateStates state);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* FINALSTATE_H_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 305
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardTest/Guard.c

@@ -1,305 +0,0 @@
-
-#include <stdlib.h>
-#include <string.h>
-#include "sc_types.h"
-#include "Guard.h"
-/*! \file Implementation of the state machine 'Guard'
-*/
-
-/* prototypes of all internal functions */
-static sc_boolean guard_check_main_region_A_tr0_tr0(const Guard* handle);
-static sc_boolean guard_check_main_region_A_tr1_tr1(const Guard* handle);
-static sc_boolean guard_check_main_region_B_tr0_tr0(const Guard* handle);
-static void guard_effect_main_region_A_tr0(Guard* handle);
-static void guard_effect_main_region_A_tr1(Guard* handle);
-static void guard_effect_main_region_B_tr0(Guard* handle);
-static void guard_enact_main_region_B(Guard* handle);
-static void guard_enseq_main_region_A_default(Guard* handle);
-static void guard_enseq_main_region_B_default(Guard* handle);
-static void guard_enseq_main_region_default(Guard* handle);
-static void guard_exseq_main_region_A(Guard* handle);
-static void guard_exseq_main_region_B(Guard* handle);
-static void guard_exseq_main_region(Guard* handle);
-static void guard_react_main_region_A(Guard* handle);
-static void guard_react_main_region_B(Guard* handle);
-static void guard_react_main_region__entry_Default(Guard* handle);
-static void guard_clearInEvents(Guard* handle);
-static void guard_clearOutEvents(Guard* handle);
-
-
-void guard_init(Guard* handle)
-{
-	sc_integer i;
-
-	for (i = 0; i < GUARD_MAX_ORTHOGONAL_STATES; ++i)
-	{
-		handle->stateConfVector[i] = Guard_last_state;
-	}
-	
-	
-	handle->stateConfVectorPosition = 0;
-
-	guard_clearInEvents(handle);
-	guard_clearOutEvents(handle);
-
-	/* Default init sequence for statechart Guard */
-	handle->iface.MyVar = 0;
-
-}
-
-void guard_enter(Guard* handle)
-{
-	/* Default enter sequence for statechart Guard */
-	guard_enseq_main_region_default(handle);
-}
-
-void guard_exit(Guard* handle)
-{
-	/* Default exit sequence for statechart Guard */
-	guard_exseq_main_region(handle);
-}
-
-sc_boolean guard_isActive(const Guard* handle)
-{
-	sc_boolean result;
-	if (handle->stateConfVector[0] != Guard_last_state)
-	{
-		result =  bool_true;
-	}
-	else
-	{
-		result = bool_false;
-	}
-	return result;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean guard_isFinal(const Guard* handle)
-{
-   return bool_false;
-}
-
-static void guard_clearInEvents(Guard* handle)
-{
-	handle->iface.Event1_raised = bool_false;
-	handle->iface.Event2_raised = bool_false;
-	handle->iface.Return_raised = bool_false;
-}
-
-static void guard_clearOutEvents(Guard* handle)
-{
-}
-
-void guard_runCycle(Guard* handle)
-{
-	
-	guard_clearOutEvents(handle);
-	
-	for (handle->stateConfVectorPosition = 0;
-		handle->stateConfVectorPosition < GUARD_MAX_ORTHOGONAL_STATES;
-		handle->stateConfVectorPosition++)
-		{
-			
-		switch (handle->stateConfVector[handle->stateConfVectorPosition])
-		{
-		case Guard_main_region_A :
-		{
-			guard_react_main_region_A(handle);
-			break;
-		}
-		case Guard_main_region_B :
-		{
-			guard_react_main_region_B(handle);
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	guard_clearInEvents(handle);
-}
-
-
-sc_boolean guard_isStateActive(const Guard* handle, GuardStates state)
-{
-	sc_boolean result = bool_false;
-	switch (state)
-	{
-		case Guard_main_region_A :
-			result = (sc_boolean) (handle->stateConfVector[0] == Guard_main_region_A
-			);
-			break;
-		case Guard_main_region_B :
-			result = (sc_boolean) (handle->stateConfVector[0] == Guard_main_region_B
-			);
-			break;
-		default:
-			result = bool_false;
-			break;
-	}
-	return result;
-}
-
-void guardIface_raise_event1(Guard* handle)
-{
-	handle->iface.Event1_raised = bool_true;
-}
-void guardIface_raise_event2(Guard* handle)
-{
-	handle->iface.Event2_raised = bool_true;
-}
-void guardIface_raise_return(Guard* handle)
-{
-	handle->iface.Return_raised = bool_true;
-}
-
-
-sc_integer guardIface_get_myVar(const Guard* handle)
-{
-	return handle->iface.MyVar;
-}
-void guardIface_set_myVar(Guard* handle, sc_integer value)
-{
-	handle->iface.MyVar = value;
-}
-
-/* implementations of all internal functions */
-
-static sc_boolean guard_check_main_region_A_tr0_tr0(const Guard* handle)
-{
-	return ((handle->iface.Event1_raised) && (handle->iface.MyVar == 10)) ? bool_true : bool_false;
-}
-
-static sc_boolean guard_check_main_region_A_tr1_tr1(const Guard* handle)
-{
-	return handle->iface.Event2_raised;
-}
-
-static sc_boolean guard_check_main_region_B_tr0_tr0(const Guard* handle)
-{
-	return handle->iface.Return_raised;
-}
-
-static void guard_effect_main_region_A_tr0(Guard* handle)
-{
-	guard_exseq_main_region_A(handle);
-	guard_enseq_main_region_B_default(handle);
-}
-
-static void guard_effect_main_region_A_tr1(Guard* handle)
-{
-	guard_exseq_main_region_A(handle);
-	guard_enseq_main_region_B_default(handle);
-}
-
-static void guard_effect_main_region_B_tr0(Guard* handle)
-{
-	guard_exseq_main_region_B(handle);
-	guard_enseq_main_region_A_default(handle);
-}
-
-/* Entry action for state 'B'. */
-static void guard_enact_main_region_B(Guard* handle)
-{
-	/* Entry action for state 'B'. */
-	handle->iface.MyVar = 10;
-}
-
-/* 'default' enter sequence for state A */
-static void guard_enseq_main_region_A_default(Guard* handle)
-{
-	/* 'default' enter sequence for state A */
-	handle->stateConfVector[0] = Guard_main_region_A;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state B */
-static void guard_enseq_main_region_B_default(Guard* handle)
-{
-	/* 'default' enter sequence for state B */
-	guard_enact_main_region_B(handle);
-	handle->stateConfVector[0] = Guard_main_region_B;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-static void guard_enseq_main_region_default(Guard* handle)
-{
-	/* 'default' enter sequence for region main region */
-	guard_react_main_region__entry_Default(handle);
-}
-
-/* Default exit sequence for state A */
-static void guard_exseq_main_region_A(Guard* handle)
-{
-	/* Default exit sequence for state A */
-	handle->stateConfVector[0] = Guard_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state B */
-static void guard_exseq_main_region_B(Guard* handle)
-{
-	/* Default exit sequence for state B */
-	handle->stateConfVector[0] = Guard_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-static void guard_exseq_main_region(Guard* handle)
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of Guard.main_region) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case Guard_main_region_A :
-		{
-			guard_exseq_main_region_A(handle);
-			break;
-		}
-		case Guard_main_region_B :
-		{
-			guard_exseq_main_region_B(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state A. */
-static void guard_react_main_region_A(Guard* handle)
-{
-	/* The reactions of state A. */
-	if (guard_check_main_region_A_tr0_tr0(handle) == bool_true)
-	{ 
-		guard_effect_main_region_A_tr0(handle);
-	}  else
-	{
-		if (guard_check_main_region_A_tr1_tr1(handle) == bool_true)
-		{ 
-			guard_effect_main_region_A_tr1(handle);
-		} 
-	}
-}
-
-/* The reactions of state B. */
-static void guard_react_main_region_B(Guard* handle)
-{
-	/* The reactions of state B. */
-	if (guard_check_main_region_B_tr0_tr0(handle) == bool_true)
-	{ 
-		guard_effect_main_region_B_tr0(handle);
-	} 
-}
-
-/* Default react sequence for initial entry  */
-static void guard_react_main_region__entry_Default(Guard* handle)
-{
-	/* Default react sequence for initial entry  */
-	guard_enseq_main_region_A_default(handle);
-}
-
-

+ 0 - 93
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardTest/Guard.h

@@ -1,93 +0,0 @@
-
-#ifndef GUARD_H_
-#define GUARD_H_
-
-#include "sc_types.h"
-		
-#ifdef __cplusplus
-extern "C" { 
-#endif 
-
-/*! \file Header of the state machine 'Guard'.
-*/
-
-/*! Enumeration of all states */ 
-typedef enum
-{
-	Guard_main_region_A,
-	Guard_main_region_B,
-	Guard_last_state
-} GuardStates;
-
-/*! Type definition of the data structure for the GuardIface interface scope. */
-typedef struct
-{
-	sc_boolean Event1_raised;
-	sc_boolean Event2_raised;
-	sc_boolean Return_raised;
-	sc_integer MyVar;
-} GuardIface;
-
-
-/*! Define dimension of the state configuration vector for orthogonal states. */
-#define GUARD_MAX_ORTHOGONAL_STATES 1
-
-/*! 
- * Type definition of the data structure for the Guard state machine.
- * This data structure has to be allocated by the client code. 
- */
-typedef struct
-{
-	GuardStates stateConfVector[GUARD_MAX_ORTHOGONAL_STATES];
-	sc_ushort stateConfVectorPosition; 
-	
-	GuardIface iface;
-} Guard;
-
-/*! Initializes the Guard state machine data structures. Must be called before first usage.*/
-extern void guard_init(Guard* handle);
-
-/*! Activates the state machine */
-extern void guard_enter(Guard* handle);
-
-/*! Deactivates the state machine */
-extern void guard_exit(Guard* handle);
-
-/*! Performs a 'run to completion' step. */
-extern void guard_runCycle(Guard* handle);
-
-
-/*! Raises the in event 'Event1' that is defined in the default interface scope. */ 
-extern void guardIface_raise_event1(Guard* handle);
-
-/*! Raises the in event 'Event2' that is defined in the default interface scope. */ 
-extern void guardIface_raise_event2(Guard* handle);
-
-/*! Raises the in event 'Return' that is defined in the default interface scope. */ 
-extern void guardIface_raise_return(Guard* handle);
-
-/*! Gets the value of the variable 'MyVar' that is defined in the default interface scope. */ 
-extern sc_integer guardIface_get_myVar(const Guard* handle);
-/*! Sets the value of the variable 'MyVar' that is defined in the default interface scope. */ 
-extern void guardIface_set_myVar(Guard* 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 guard_isActive(const Guard* 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 guard_isFinal(const Guard* handle);
-
-/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
-extern sc_boolean guard_isStateActive(const Guard* handle, GuardStates state);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* GUARD_H_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 288
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntryTest/GuardedEntry.c

@@ -1,288 +0,0 @@
-
-#include <stdlib.h>
-#include <string.h>
-#include "sc_types.h"
-#include "GuardedEntry.h"
-/*! \file Implementation of the state machine 'GuardedEntry'
-*/
-
-/* prototypes of all internal functions */
-static sc_boolean guardedEntry_check_main_region_A_tr0_tr0(const GuardedEntry* handle);
-static sc_boolean guardedEntry_check_main_region_B_tr0_tr0(const GuardedEntry* handle);
-static void guardedEntry_effect_main_region_A_tr0(GuardedEntry* handle);
-static void guardedEntry_effect_main_region_B_tr0(GuardedEntry* handle);
-static void guardedEntry_enact_main_region_A(GuardedEntry* handle);
-static void guardedEntry_enseq_main_region_A_default(GuardedEntry* handle);
-static void guardedEntry_enseq_main_region_B_default(GuardedEntry* handle);
-static void guardedEntry_enseq_main_region_default(GuardedEntry* handle);
-static void guardedEntry_exseq_main_region_A(GuardedEntry* handle);
-static void guardedEntry_exseq_main_region_B(GuardedEntry* handle);
-static void guardedEntry_exseq_main_region(GuardedEntry* handle);
-static void guardedEntry_react_main_region_A(GuardedEntry* handle);
-static void guardedEntry_react_main_region_B(GuardedEntry* handle);
-static void guardedEntry_react_main_region__entry_Default(GuardedEntry* handle);
-static void guardedEntry_clearInEvents(GuardedEntry* handle);
-static void guardedEntry_clearOutEvents(GuardedEntry* handle);
-
-
-void guardedEntry_init(GuardedEntry* handle)
-{
-	sc_integer i;
-
-	for (i = 0; i < GUARDEDENTRY_MAX_ORTHOGONAL_STATES; ++i)
-	{
-		handle->stateConfVector[i] = GuardedEntry_last_state;
-	}
-	
-	
-	handle->stateConfVectorPosition = 0;
-
-	guardedEntry_clearInEvents(handle);
-	guardedEntry_clearOutEvents(handle);
-
-	/* Default init sequence for statechart GuardedEntry */
-	handle->iface.guard = bool_false;
-	handle->iface.done = bool_false;
-
-}
-
-void guardedEntry_enter(GuardedEntry* handle)
-{
-	/* Default enter sequence for statechart GuardedEntry */
-	guardedEntry_enseq_main_region_default(handle);
-}
-
-void guardedEntry_exit(GuardedEntry* handle)
-{
-	/* Default exit sequence for statechart GuardedEntry */
-	guardedEntry_exseq_main_region(handle);
-}
-
-sc_boolean guardedEntry_isActive(const GuardedEntry* handle)
-{
-	sc_boolean result;
-	if (handle->stateConfVector[0] != GuardedEntry_last_state)
-	{
-		result =  bool_true;
-	}
-	else
-	{
-		result = bool_false;
-	}
-	return result;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean guardedEntry_isFinal(const GuardedEntry* handle)
-{
-   return bool_false;
-}
-
-static void guardedEntry_clearInEvents(GuardedEntry* handle)
-{
-	handle->iface.e_raised = bool_false;
-}
-
-static void guardedEntry_clearOutEvents(GuardedEntry* handle)
-{
-}
-
-void guardedEntry_runCycle(GuardedEntry* handle)
-{
-	
-	guardedEntry_clearOutEvents(handle);
-	
-	for (handle->stateConfVectorPosition = 0;
-		handle->stateConfVectorPosition < GUARDEDENTRY_MAX_ORTHOGONAL_STATES;
-		handle->stateConfVectorPosition++)
-		{
-			
-		switch (handle->stateConfVector[handle->stateConfVectorPosition])
-		{
-		case GuardedEntry_main_region_A :
-		{
-			guardedEntry_react_main_region_A(handle);
-			break;
-		}
-		case GuardedEntry_main_region_B :
-		{
-			guardedEntry_react_main_region_B(handle);
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	guardedEntry_clearInEvents(handle);
-}
-
-
-sc_boolean guardedEntry_isStateActive(const GuardedEntry* handle, GuardedEntryStates state)
-{
-	sc_boolean result = bool_false;
-	switch (state)
-	{
-		case GuardedEntry_main_region_A :
-			result = (sc_boolean) (handle->stateConfVector[0] == GuardedEntry_main_region_A
-			);
-			break;
-		case GuardedEntry_main_region_B :
-			result = (sc_boolean) (handle->stateConfVector[0] == GuardedEntry_main_region_B
-			);
-			break;
-		default:
-			result = bool_false;
-			break;
-	}
-	return result;
-}
-
-void guardedEntryIface_raise_e(GuardedEntry* handle)
-{
-	handle->iface.e_raised = bool_true;
-}
-
-
-sc_boolean guardedEntryIface_get_guard(const GuardedEntry* handle)
-{
-	return handle->iface.guard;
-}
-void guardedEntryIface_set_guard(GuardedEntry* handle, sc_boolean value)
-{
-	handle->iface.guard = value;
-}
-sc_boolean guardedEntryIface_get_done(const GuardedEntry* handle)
-{
-	return handle->iface.done;
-}
-void guardedEntryIface_set_done(GuardedEntry* handle, sc_boolean value)
-{
-	handle->iface.done = value;
-}
-
-/* implementations of all internal functions */
-
-static sc_boolean guardedEntry_check_main_region_A_tr0_tr0(const GuardedEntry* handle)
-{
-	return handle->iface.e_raised;
-}
-
-static sc_boolean guardedEntry_check_main_region_B_tr0_tr0(const GuardedEntry* handle)
-{
-	return handle->iface.e_raised;
-}
-
-static void guardedEntry_effect_main_region_A_tr0(GuardedEntry* handle)
-{
-	guardedEntry_exseq_main_region_A(handle);
-	guardedEntry_enseq_main_region_B_default(handle);
-}
-
-static void guardedEntry_effect_main_region_B_tr0(GuardedEntry* handle)
-{
-	guardedEntry_exseq_main_region_B(handle);
-	guardedEntry_enseq_main_region_A_default(handle);
-}
-
-/* Entry action for state 'A'. */
-static void guardedEntry_enact_main_region_A(GuardedEntry* handle)
-{
-	/* Entry action for state 'A'. */
-	if (handle->iface.guard == bool_true)
-	{ 
-		handle->iface.done = bool_true;
-	} 
-}
-
-/* 'default' enter sequence for state A */
-static void guardedEntry_enseq_main_region_A_default(GuardedEntry* handle)
-{
-	/* 'default' enter sequence for state A */
-	guardedEntry_enact_main_region_A(handle);
-	handle->stateConfVector[0] = GuardedEntry_main_region_A;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state B */
-static void guardedEntry_enseq_main_region_B_default(GuardedEntry* handle)
-{
-	/* 'default' enter sequence for state B */
-	handle->stateConfVector[0] = GuardedEntry_main_region_B;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-static void guardedEntry_enseq_main_region_default(GuardedEntry* handle)
-{
-	/* 'default' enter sequence for region main region */
-	guardedEntry_react_main_region__entry_Default(handle);
-}
-
-/* Default exit sequence for state A */
-static void guardedEntry_exseq_main_region_A(GuardedEntry* handle)
-{
-	/* Default exit sequence for state A */
-	handle->stateConfVector[0] = GuardedEntry_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state B */
-static void guardedEntry_exseq_main_region_B(GuardedEntry* handle)
-{
-	/* Default exit sequence for state B */
-	handle->stateConfVector[0] = GuardedEntry_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-static void guardedEntry_exseq_main_region(GuardedEntry* handle)
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of GuardedEntry.main_region) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case GuardedEntry_main_region_A :
-		{
-			guardedEntry_exseq_main_region_A(handle);
-			break;
-		}
-		case GuardedEntry_main_region_B :
-		{
-			guardedEntry_exseq_main_region_B(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state A. */
-static void guardedEntry_react_main_region_A(GuardedEntry* handle)
-{
-	/* The reactions of state A. */
-	if (guardedEntry_check_main_region_A_tr0_tr0(handle) == bool_true)
-	{ 
-		guardedEntry_effect_main_region_A_tr0(handle);
-	} 
-}
-
-/* The reactions of state B. */
-static void guardedEntry_react_main_region_B(GuardedEntry* handle)
-{
-	/* The reactions of state B. */
-	if (guardedEntry_check_main_region_B_tr0_tr0(handle) == bool_true)
-	{ 
-		guardedEntry_effect_main_region_B_tr0(handle);
-	} 
-}
-
-/* Default react sequence for initial entry  */
-static void guardedEntry_react_main_region__entry_Default(GuardedEntry* handle)
-{
-	/* Default react sequence for initial entry  */
-	guardedEntry_enseq_main_region_A_default(handle);
-}
-
-

+ 0 - 90
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntryTest/GuardedEntry.h

@@ -1,90 +0,0 @@
-
-#ifndef GUARDEDENTRY_H_
-#define GUARDEDENTRY_H_
-
-#include "sc_types.h"
-		
-#ifdef __cplusplus
-extern "C" { 
-#endif 
-
-/*! \file Header of the state machine 'GuardedEntry'.
-*/
-
-/*! Enumeration of all states */ 
-typedef enum
-{
-	GuardedEntry_main_region_A,
-	GuardedEntry_main_region_B,
-	GuardedEntry_last_state
-} GuardedEntryStates;
-
-/*! Type definition of the data structure for the GuardedEntryIface interface scope. */
-typedef struct
-{
-	sc_boolean e_raised;
-	sc_boolean guard;
-	sc_boolean done;
-} GuardedEntryIface;
-
-
-/*! Define dimension of the state configuration vector for orthogonal states. */
-#define GUARDEDENTRY_MAX_ORTHOGONAL_STATES 1
-
-/*! 
- * Type definition of the data structure for the GuardedEntry state machine.
- * This data structure has to be allocated by the client code. 
- */
-typedef struct
-{
-	GuardedEntryStates stateConfVector[GUARDEDENTRY_MAX_ORTHOGONAL_STATES];
-	sc_ushort stateConfVectorPosition; 
-	
-	GuardedEntryIface iface;
-} GuardedEntry;
-
-/*! Initializes the GuardedEntry state machine data structures. Must be called before first usage.*/
-extern void guardedEntry_init(GuardedEntry* handle);
-
-/*! Activates the state machine */
-extern void guardedEntry_enter(GuardedEntry* handle);
-
-/*! Deactivates the state machine */
-extern void guardedEntry_exit(GuardedEntry* handle);
-
-/*! Performs a 'run to completion' step. */
-extern void guardedEntry_runCycle(GuardedEntry* handle);
-
-
-/*! Raises the in event 'e' that is defined in the default interface scope. */ 
-extern void guardedEntryIface_raise_e(GuardedEntry* handle);
-
-/*! Gets the value of the variable 'guard' that is defined in the default interface scope. */ 
-extern sc_boolean guardedEntryIface_get_guard(const GuardedEntry* handle);
-/*! Sets the value of the variable 'guard' that is defined in the default interface scope. */ 
-extern void guardedEntryIface_set_guard(GuardedEntry* handle, sc_boolean value);
-/*! Gets the value of the variable 'done' that is defined in the default interface scope. */ 
-extern sc_boolean guardedEntryIface_get_done(const GuardedEntry* handle);
-/*! Sets the value of the variable 'done' that is defined in the default interface scope. */ 
-extern void guardedEntryIface_set_done(GuardedEntry* 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 guardedEntry_isActive(const GuardedEntry* 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 guardedEntry_isFinal(const GuardedEntry* handle);
-
-/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
-extern sc_boolean guardedEntry_isStateActive(const GuardedEntry* handle, GuardedEntryStates state);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* GUARDEDENTRY_H_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 288
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExitTest/GuardedExit.c

@@ -1,288 +0,0 @@
-
-#include <stdlib.h>
-#include <string.h>
-#include "sc_types.h"
-#include "GuardedExit.h"
-/*! \file Implementation of the state machine 'GuardedExit'
-*/
-
-/* prototypes of all internal functions */
-static sc_boolean guardedExit_check_main_region_A_tr0_tr0(const GuardedExit* handle);
-static sc_boolean guardedExit_check_main_region_B_tr0_tr0(const GuardedExit* handle);
-static void guardedExit_effect_main_region_A_tr0(GuardedExit* handle);
-static void guardedExit_effect_main_region_B_tr0(GuardedExit* handle);
-static void guardedExit_exact_main_region_A(GuardedExit* handle);
-static void guardedExit_enseq_main_region_A_default(GuardedExit* handle);
-static void guardedExit_enseq_main_region_B_default(GuardedExit* handle);
-static void guardedExit_enseq_main_region_default(GuardedExit* handle);
-static void guardedExit_exseq_main_region_A(GuardedExit* handle);
-static void guardedExit_exseq_main_region_B(GuardedExit* handle);
-static void guardedExit_exseq_main_region(GuardedExit* handle);
-static void guardedExit_react_main_region_A(GuardedExit* handle);
-static void guardedExit_react_main_region_B(GuardedExit* handle);
-static void guardedExit_react_main_region__entry_Default(GuardedExit* handle);
-static void guardedExit_clearInEvents(GuardedExit* handle);
-static void guardedExit_clearOutEvents(GuardedExit* handle);
-
-
-void guardedExit_init(GuardedExit* handle)
-{
-	sc_integer i;
-
-	for (i = 0; i < GUARDEDEXIT_MAX_ORTHOGONAL_STATES; ++i)
-	{
-		handle->stateConfVector[i] = GuardedExit_last_state;
-	}
-	
-	
-	handle->stateConfVectorPosition = 0;
-
-	guardedExit_clearInEvents(handle);
-	guardedExit_clearOutEvents(handle);
-
-	/* Default init sequence for statechart GuardedExit */
-	handle->iface.guard = bool_false;
-	handle->iface.done = bool_false;
-
-}
-
-void guardedExit_enter(GuardedExit* handle)
-{
-	/* Default enter sequence for statechart GuardedExit */
-	guardedExit_enseq_main_region_default(handle);
-}
-
-void guardedExit_exit(GuardedExit* handle)
-{
-	/* Default exit sequence for statechart GuardedExit */
-	guardedExit_exseq_main_region(handle);
-}
-
-sc_boolean guardedExit_isActive(const GuardedExit* handle)
-{
-	sc_boolean result;
-	if (handle->stateConfVector[0] != GuardedExit_last_state)
-	{
-		result =  bool_true;
-	}
-	else
-	{
-		result = bool_false;
-	}
-	return result;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean guardedExit_isFinal(const GuardedExit* handle)
-{
-   return bool_false;
-}
-
-static void guardedExit_clearInEvents(GuardedExit* handle)
-{
-	handle->iface.e_raised = bool_false;
-}
-
-static void guardedExit_clearOutEvents(GuardedExit* handle)
-{
-}
-
-void guardedExit_runCycle(GuardedExit* handle)
-{
-	
-	guardedExit_clearOutEvents(handle);
-	
-	for (handle->stateConfVectorPosition = 0;
-		handle->stateConfVectorPosition < GUARDEDEXIT_MAX_ORTHOGONAL_STATES;
-		handle->stateConfVectorPosition++)
-		{
-			
-		switch (handle->stateConfVector[handle->stateConfVectorPosition])
-		{
-		case GuardedExit_main_region_A :
-		{
-			guardedExit_react_main_region_A(handle);
-			break;
-		}
-		case GuardedExit_main_region_B :
-		{
-			guardedExit_react_main_region_B(handle);
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	guardedExit_clearInEvents(handle);
-}
-
-
-sc_boolean guardedExit_isStateActive(const GuardedExit* handle, GuardedExitStates state)
-{
-	sc_boolean result = bool_false;
-	switch (state)
-	{
-		case GuardedExit_main_region_A :
-			result = (sc_boolean) (handle->stateConfVector[0] == GuardedExit_main_region_A
-			);
-			break;
-		case GuardedExit_main_region_B :
-			result = (sc_boolean) (handle->stateConfVector[0] == GuardedExit_main_region_B
-			);
-			break;
-		default:
-			result = bool_false;
-			break;
-	}
-	return result;
-}
-
-void guardedExitIface_raise_e(GuardedExit* handle)
-{
-	handle->iface.e_raised = bool_true;
-}
-
-
-sc_boolean guardedExitIface_get_guard(const GuardedExit* handle)
-{
-	return handle->iface.guard;
-}
-void guardedExitIface_set_guard(GuardedExit* handle, sc_boolean value)
-{
-	handle->iface.guard = value;
-}
-sc_boolean guardedExitIface_get_done(const GuardedExit* handle)
-{
-	return handle->iface.done;
-}
-void guardedExitIface_set_done(GuardedExit* handle, sc_boolean value)
-{
-	handle->iface.done = value;
-}
-
-/* implementations of all internal functions */
-
-static sc_boolean guardedExit_check_main_region_A_tr0_tr0(const GuardedExit* handle)
-{
-	return handle->iface.e_raised;
-}
-
-static sc_boolean guardedExit_check_main_region_B_tr0_tr0(const GuardedExit* handle)
-{
-	return handle->iface.e_raised;
-}
-
-static void guardedExit_effect_main_region_A_tr0(GuardedExit* handle)
-{
-	guardedExit_exseq_main_region_A(handle);
-	guardedExit_enseq_main_region_B_default(handle);
-}
-
-static void guardedExit_effect_main_region_B_tr0(GuardedExit* handle)
-{
-	guardedExit_exseq_main_region_B(handle);
-	guardedExit_enseq_main_region_A_default(handle);
-}
-
-/* Exit action for state 'A'. */
-static void guardedExit_exact_main_region_A(GuardedExit* handle)
-{
-	/* Exit action for state 'A'. */
-	if (handle->iface.guard == bool_true)
-	{ 
-		handle->iface.done = bool_true;
-	} 
-}
-
-/* 'default' enter sequence for state A */
-static void guardedExit_enseq_main_region_A_default(GuardedExit* handle)
-{
-	/* 'default' enter sequence for state A */
-	handle->stateConfVector[0] = GuardedExit_main_region_A;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state B */
-static void guardedExit_enseq_main_region_B_default(GuardedExit* handle)
-{
-	/* 'default' enter sequence for state B */
-	handle->stateConfVector[0] = GuardedExit_main_region_B;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-static void guardedExit_enseq_main_region_default(GuardedExit* handle)
-{
-	/* 'default' enter sequence for region main region */
-	guardedExit_react_main_region__entry_Default(handle);
-}
-
-/* Default exit sequence for state A */
-static void guardedExit_exseq_main_region_A(GuardedExit* handle)
-{
-	/* Default exit sequence for state A */
-	handle->stateConfVector[0] = GuardedExit_last_state;
-	handle->stateConfVectorPosition = 0;
-	guardedExit_exact_main_region_A(handle);
-}
-
-/* Default exit sequence for state B */
-static void guardedExit_exseq_main_region_B(GuardedExit* handle)
-{
-	/* Default exit sequence for state B */
-	handle->stateConfVector[0] = GuardedExit_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-static void guardedExit_exseq_main_region(GuardedExit* handle)
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of GuardedExit.main_region) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case GuardedExit_main_region_A :
-		{
-			guardedExit_exseq_main_region_A(handle);
-			break;
-		}
-		case GuardedExit_main_region_B :
-		{
-			guardedExit_exseq_main_region_B(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state A. */
-static void guardedExit_react_main_region_A(GuardedExit* handle)
-{
-	/* The reactions of state A. */
-	if (guardedExit_check_main_region_A_tr0_tr0(handle) == bool_true)
-	{ 
-		guardedExit_effect_main_region_A_tr0(handle);
-	} 
-}
-
-/* The reactions of state B. */
-static void guardedExit_react_main_region_B(GuardedExit* handle)
-{
-	/* The reactions of state B. */
-	if (guardedExit_check_main_region_B_tr0_tr0(handle) == bool_true)
-	{ 
-		guardedExit_effect_main_region_B_tr0(handle);
-	} 
-}
-
-/* Default react sequence for initial entry  */
-static void guardedExit_react_main_region__entry_Default(GuardedExit* handle)
-{
-	/* Default react sequence for initial entry  */
-	guardedExit_enseq_main_region_A_default(handle);
-}
-
-

+ 0 - 90
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExitTest/GuardedExit.h

@@ -1,90 +0,0 @@
-
-#ifndef GUARDEDEXIT_H_
-#define GUARDEDEXIT_H_
-
-#include "sc_types.h"
-		
-#ifdef __cplusplus
-extern "C" { 
-#endif 
-
-/*! \file Header of the state machine 'GuardedExit'.
-*/
-
-/*! Enumeration of all states */ 
-typedef enum
-{
-	GuardedExit_main_region_A,
-	GuardedExit_main_region_B,
-	GuardedExit_last_state
-} GuardedExitStates;
-
-/*! Type definition of the data structure for the GuardedExitIface interface scope. */
-typedef struct
-{
-	sc_boolean e_raised;
-	sc_boolean guard;
-	sc_boolean done;
-} GuardedExitIface;
-
-
-/*! Define dimension of the state configuration vector for orthogonal states. */
-#define GUARDEDEXIT_MAX_ORTHOGONAL_STATES 1
-
-/*! 
- * Type definition of the data structure for the GuardedExit state machine.
- * This data structure has to be allocated by the client code. 
- */
-typedef struct
-{
-	GuardedExitStates stateConfVector[GUARDEDEXIT_MAX_ORTHOGONAL_STATES];
-	sc_ushort stateConfVectorPosition; 
-	
-	GuardedExitIface iface;
-} GuardedExit;
-
-/*! Initializes the GuardedExit state machine data structures. Must be called before first usage.*/
-extern void guardedExit_init(GuardedExit* handle);
-
-/*! Activates the state machine */
-extern void guardedExit_enter(GuardedExit* handle);
-
-/*! Deactivates the state machine */
-extern void guardedExit_exit(GuardedExit* handle);
-
-/*! Performs a 'run to completion' step. */
-extern void guardedExit_runCycle(GuardedExit* handle);
-
-
-/*! Raises the in event 'e' that is defined in the default interface scope. */ 
-extern void guardedExitIface_raise_e(GuardedExit* handle);
-
-/*! Gets the value of the variable 'guard' that is defined in the default interface scope. */ 
-extern sc_boolean guardedExitIface_get_guard(const GuardedExit* handle);
-/*! Sets the value of the variable 'guard' that is defined in the default interface scope. */ 
-extern void guardedExitIface_set_guard(GuardedExit* handle, sc_boolean value);
-/*! Gets the value of the variable 'done' that is defined in the default interface scope. */ 
-extern sc_boolean guardedExitIface_get_done(const GuardedExit* handle);
-/*! Sets the value of the variable 'done' that is defined in the default interface scope. */ 
-extern void guardedExitIface_set_done(GuardedExit* 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 guardedExit_isActive(const GuardedExit* 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 guardedExit_isFinal(const GuardedExit* handle);
-
-/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
-extern sc_boolean guardedExit_isStateActive(const GuardedExit* handle, GuardedExitStates state);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* GUARDEDEXIT_H_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 469
test-plugins/org.yakindu.sct.generator.c.test/gtests/HistoryWithExitPointTest/HistoryWithExitPoint.c

@@ -1,469 +0,0 @@
-
-#include <stdlib.h>
-#include <string.h>
-#include "sc_types.h"
-#include "HistoryWithExitPoint.h"
-/*! \file Implementation of the state machine 'HistoryWithExitPoint'
-*/
-
-/* prototypes of all internal functions */
-static sc_boolean historyWithExitPoint_check_mr_A_r_X1_tr0_tr0(const HistoryWithExitPoint* handle);
-static sc_boolean historyWithExitPoint_check_mr_A_r_X1_tr1_tr1(const HistoryWithExitPoint* handle);
-static sc_boolean historyWithExitPoint_check_mr_A_r_X2_tr0_tr0(const HistoryWithExitPoint* handle);
-static sc_boolean historyWithExitPoint_check_mr_A_r_X2_tr1_tr1(const HistoryWithExitPoint* handle);
-static sc_boolean historyWithExitPoint_check_mr_B_tr0_tr0(const HistoryWithExitPoint* handle);
-static void historyWithExitPoint_effect_mr_A_tr0(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_effect_mr_A_r_X1_tr0(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_effect_mr_A_r_X1_tr1(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_effect_mr_A_r_X2_tr0(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_effect_mr_A_r_X2_tr1(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_effect_mr_B_tr0(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_enseq_mr_A_default(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_enseq_mr_A_r_X1_default(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_enseq_mr_A_r_X2_default(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_enseq_mr_B_default(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_enseq_mr_default(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_enseq_mr_A_r_default(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_shenseq_mr_A_r(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_exseq_mr_A(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_exseq_mr_A_r_X1(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_exseq_mr_A_r_X2(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_exseq_mr_B(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_exseq_mr(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_exseq_mr_A_r(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_react_mr_A_r_X1(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_react_mr_A_r_X2(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_react_mr_B(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_react_mr__entry_Default(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_react_mr_A_r__entry_Default(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_react_mr_A_r_exit_to_B(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_clearInEvents(HistoryWithExitPoint* handle);
-static void historyWithExitPoint_clearOutEvents(HistoryWithExitPoint* handle);
-
-
-void historyWithExitPoint_init(HistoryWithExitPoint* handle)
-{
-	sc_integer i;
-
-	for (i = 0; i < HISTORYWITHEXITPOINT_MAX_ORTHOGONAL_STATES; ++i)
-	{
-		handle->stateConfVector[i] = HistoryWithExitPoint_last_state;
-	}
-	
-	for (i = 0; i < HISTORYWITHEXITPOINT_MAX_HISTORY_STATES; ++i)
-	{
-		handle->historyVector[i] = HistoryWithExitPoint_last_state;
-	}
-	
-	handle->stateConfVectorPosition = 0;
-
-	historyWithExitPoint_clearInEvents(handle);
-	historyWithExitPoint_clearOutEvents(handle);
-
-
-}
-
-void historyWithExitPoint_enter(HistoryWithExitPoint* handle)
-{
-	/* Default enter sequence for statechart HistoryWithExitPoint */
-	historyWithExitPoint_enseq_mr_default(handle);
-}
-
-void historyWithExitPoint_exit(HistoryWithExitPoint* handle)
-{
-	/* Default exit sequence for statechart HistoryWithExitPoint */
-	historyWithExitPoint_exseq_mr(handle);
-}
-
-sc_boolean historyWithExitPoint_isActive(const HistoryWithExitPoint* handle)
-{
-	sc_boolean result;
-	if (handle->stateConfVector[0] != HistoryWithExitPoint_last_state)
-	{
-		result =  bool_true;
-	}
-	else
-	{
-		result = bool_false;
-	}
-	return result;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean historyWithExitPoint_isFinal(const HistoryWithExitPoint* handle)
-{
-   return bool_false;
-}
-
-static void historyWithExitPoint_clearInEvents(HistoryWithExitPoint* handle)
-{
-	handle->iface.push_raised = bool_false;
-	handle->iface.back_raised = bool_false;
-	handle->iface.next_raised = bool_false;
-}
-
-static void historyWithExitPoint_clearOutEvents(HistoryWithExitPoint* handle)
-{
-}
-
-void historyWithExitPoint_runCycle(HistoryWithExitPoint* handle)
-{
-	
-	historyWithExitPoint_clearOutEvents(handle);
-	
-	for (handle->stateConfVectorPosition = 0;
-		handle->stateConfVectorPosition < HISTORYWITHEXITPOINT_MAX_ORTHOGONAL_STATES;
-		handle->stateConfVectorPosition++)
-		{
-			
-		switch (handle->stateConfVector[handle->stateConfVectorPosition])
-		{
-		case HistoryWithExitPoint_mr_A_r_X1 :
-		{
-			historyWithExitPoint_react_mr_A_r_X1(handle);
-			break;
-		}
-		case HistoryWithExitPoint_mr_A_r_X2 :
-		{
-			historyWithExitPoint_react_mr_A_r_X2(handle);
-			break;
-		}
-		case HistoryWithExitPoint_mr_B :
-		{
-			historyWithExitPoint_react_mr_B(handle);
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	historyWithExitPoint_clearInEvents(handle);
-}
-
-
-sc_boolean historyWithExitPoint_isStateActive(const HistoryWithExitPoint* handle, HistoryWithExitPointStates state)
-{
-	sc_boolean result = bool_false;
-	switch (state)
-	{
-		case HistoryWithExitPoint_mr_A :
-			result = (sc_boolean) (handle->stateConfVector[0] >= HistoryWithExitPoint_mr_A
-				&& handle->stateConfVector[0] <= HistoryWithExitPoint_mr_A_r_X2);
-			break;
-		case HistoryWithExitPoint_mr_A_r_X1 :
-			result = (sc_boolean) (handle->stateConfVector[0] == HistoryWithExitPoint_mr_A_r_X1
-			);
-			break;
-		case HistoryWithExitPoint_mr_A_r_X2 :
-			result = (sc_boolean) (handle->stateConfVector[0] == HistoryWithExitPoint_mr_A_r_X2
-			);
-			break;
-		case HistoryWithExitPoint_mr_B :
-			result = (sc_boolean) (handle->stateConfVector[0] == HistoryWithExitPoint_mr_B
-			);
-			break;
-		default:
-			result = bool_false;
-			break;
-	}
-	return result;
-}
-
-void historyWithExitPointIface_raise_push(HistoryWithExitPoint* handle)
-{
-	handle->iface.push_raised = bool_true;
-}
-void historyWithExitPointIface_raise_back(HistoryWithExitPoint* handle)
-{
-	handle->iface.back_raised = bool_true;
-}
-void historyWithExitPointIface_raise_next(HistoryWithExitPoint* handle)
-{
-	handle->iface.next_raised = bool_true;
-}
-
-
-
-/* implementations of all internal functions */
-
-static sc_boolean historyWithExitPoint_check_mr_A_r_X1_tr0_tr0(const HistoryWithExitPoint* handle)
-{
-	return handle->iface.next_raised;
-}
-
-static sc_boolean historyWithExitPoint_check_mr_A_r_X1_tr1_tr1(const HistoryWithExitPoint* handle)
-{
-	return handle->iface.push_raised;
-}
-
-static sc_boolean historyWithExitPoint_check_mr_A_r_X2_tr0_tr0(const HistoryWithExitPoint* handle)
-{
-	return handle->iface.next_raised;
-}
-
-static sc_boolean historyWithExitPoint_check_mr_A_r_X2_tr1_tr1(const HistoryWithExitPoint* handle)
-{
-	return handle->iface.push_raised;
-}
-
-static sc_boolean historyWithExitPoint_check_mr_B_tr0_tr0(const HistoryWithExitPoint* handle)
-{
-	return handle->iface.back_raised;
-}
-
-static void historyWithExitPoint_effect_mr_A_tr0(HistoryWithExitPoint* handle)
-{
-	historyWithExitPoint_exseq_mr_A(handle);
-	historyWithExitPoint_enseq_mr_B_default(handle);
-}
-
-static void historyWithExitPoint_effect_mr_A_r_X1_tr0(HistoryWithExitPoint* handle)
-{
-	historyWithExitPoint_exseq_mr_A_r_X1(handle);
-	historyWithExitPoint_enseq_mr_A_r_X2_default(handle);
-}
-
-static void historyWithExitPoint_effect_mr_A_r_X1_tr1(HistoryWithExitPoint* handle)
-{
-	historyWithExitPoint_exseq_mr_A_r_X1(handle);
-	historyWithExitPoint_react_mr_A_r_exit_to_B(handle);
-}
-
-static void historyWithExitPoint_effect_mr_A_r_X2_tr0(HistoryWithExitPoint* handle)
-{
-	historyWithExitPoint_exseq_mr_A_r_X2(handle);
-	historyWithExitPoint_enseq_mr_A_r_X1_default(handle);
-}
-
-static void historyWithExitPoint_effect_mr_A_r_X2_tr1(HistoryWithExitPoint* handle)
-{
-	historyWithExitPoint_exseq_mr_A_r_X2(handle);
-	historyWithExitPoint_react_mr_A_r_exit_to_B(handle);
-}
-
-static void historyWithExitPoint_effect_mr_B_tr0(HistoryWithExitPoint* handle)
-{
-	historyWithExitPoint_exseq_mr_B(handle);
-	historyWithExitPoint_enseq_mr_A_default(handle);
-}
-
-/* 'default' enter sequence for state A */
-static void historyWithExitPoint_enseq_mr_A_default(HistoryWithExitPoint* handle)
-{
-	/* 'default' enter sequence for state A */
-	historyWithExitPoint_enseq_mr_A_r_default(handle);
-}
-
-/* 'default' enter sequence for state X1 */
-static void historyWithExitPoint_enseq_mr_A_r_X1_default(HistoryWithExitPoint* handle)
-{
-	/* 'default' enter sequence for state X1 */
-	handle->stateConfVector[0] = HistoryWithExitPoint_mr_A_r_X1;
-	handle->stateConfVectorPosition = 0;
-	handle->historyVector[0] = handle->stateConfVector[0];
-}
-
-/* 'default' enter sequence for state X2 */
-static void historyWithExitPoint_enseq_mr_A_r_X2_default(HistoryWithExitPoint* handle)
-{
-	/* 'default' enter sequence for state X2 */
-	handle->stateConfVector[0] = HistoryWithExitPoint_mr_A_r_X2;
-	handle->stateConfVectorPosition = 0;
-	handle->historyVector[0] = handle->stateConfVector[0];
-}
-
-/* 'default' enter sequence for state B */
-static void historyWithExitPoint_enseq_mr_B_default(HistoryWithExitPoint* handle)
-{
-	/* 'default' enter sequence for state B */
-	handle->stateConfVector[0] = HistoryWithExitPoint_mr_B;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region mr */
-static void historyWithExitPoint_enseq_mr_default(HistoryWithExitPoint* handle)
-{
-	/* 'default' enter sequence for region mr */
-	historyWithExitPoint_react_mr__entry_Default(handle);
-}
-
-/* 'default' enter sequence for region r */
-static void historyWithExitPoint_enseq_mr_A_r_default(HistoryWithExitPoint* handle)
-{
-	/* 'default' enter sequence for region r */
-	historyWithExitPoint_react_mr_A_r__entry_Default(handle);
-}
-
-/* shallow enterSequence with history in child r */
-static void historyWithExitPoint_shenseq_mr_A_r(HistoryWithExitPoint* handle)
-{
-	/* shallow enterSequence with history in child r */
-	/* Handle shallow history entry of r */
-	switch(handle->historyVector[ 0 ])
-	{
-		case HistoryWithExitPoint_mr_A_r_X1 :
-		{
-			historyWithExitPoint_enseq_mr_A_r_X1_default(handle);
-			break;
-		}
-		case HistoryWithExitPoint_mr_A_r_X2 :
-		{
-			historyWithExitPoint_enseq_mr_A_r_X2_default(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* Default exit sequence for state A */
-static void historyWithExitPoint_exseq_mr_A(HistoryWithExitPoint* handle)
-{
-	/* Default exit sequence for state A */
-	historyWithExitPoint_exseq_mr_A_r(handle);
-}
-
-/* Default exit sequence for state X1 */
-static void historyWithExitPoint_exseq_mr_A_r_X1(HistoryWithExitPoint* handle)
-{
-	/* Default exit sequence for state X1 */
-	handle->stateConfVector[0] = HistoryWithExitPoint_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state X2 */
-static void historyWithExitPoint_exseq_mr_A_r_X2(HistoryWithExitPoint* handle)
-{
-	/* Default exit sequence for state X2 */
-	handle->stateConfVector[0] = HistoryWithExitPoint_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state B */
-static void historyWithExitPoint_exseq_mr_B(HistoryWithExitPoint* handle)
-{
-	/* Default exit sequence for state B */
-	handle->stateConfVector[0] = HistoryWithExitPoint_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region mr */
-static void historyWithExitPoint_exseq_mr(HistoryWithExitPoint* handle)
-{
-	/* Default exit sequence for region mr */
-	/* Handle exit of all possible states (of HistoryWithExitPoint.mr) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case HistoryWithExitPoint_mr_A_r_X1 :
-		{
-			historyWithExitPoint_exseq_mr_A_r_X1(handle);
-			break;
-		}
-		case HistoryWithExitPoint_mr_A_r_X2 :
-		{
-			historyWithExitPoint_exseq_mr_A_r_X2(handle);
-			break;
-		}
-		case HistoryWithExitPoint_mr_B :
-		{
-			historyWithExitPoint_exseq_mr_B(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* Default exit sequence for region r */
-static void historyWithExitPoint_exseq_mr_A_r(HistoryWithExitPoint* handle)
-{
-	/* Default exit sequence for region r */
-	/* Handle exit of all possible states (of HistoryWithExitPoint.mr.A.r) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case HistoryWithExitPoint_mr_A_r_X1 :
-		{
-			historyWithExitPoint_exseq_mr_A_r_X1(handle);
-			break;
-		}
-		case HistoryWithExitPoint_mr_A_r_X2 :
-		{
-			historyWithExitPoint_exseq_mr_A_r_X2(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state X1. */
-static void historyWithExitPoint_react_mr_A_r_X1(HistoryWithExitPoint* handle)
-{
-	/* The reactions of state X1. */
-	if (historyWithExitPoint_check_mr_A_r_X1_tr0_tr0(handle) == bool_true)
-	{ 
-		historyWithExitPoint_effect_mr_A_r_X1_tr0(handle);
-	}  else
-	{
-		if (historyWithExitPoint_check_mr_A_r_X1_tr1_tr1(handle) == bool_true)
-		{ 
-			historyWithExitPoint_effect_mr_A_r_X1_tr1(handle);
-		} 
-	}
-}
-
-/* The reactions of state X2. */
-static void historyWithExitPoint_react_mr_A_r_X2(HistoryWithExitPoint* handle)
-{
-	/* The reactions of state X2. */
-	if (historyWithExitPoint_check_mr_A_r_X2_tr0_tr0(handle) == bool_true)
-	{ 
-		historyWithExitPoint_effect_mr_A_r_X2_tr0(handle);
-	}  else
-	{
-		if (historyWithExitPoint_check_mr_A_r_X2_tr1_tr1(handle) == bool_true)
-		{ 
-			historyWithExitPoint_effect_mr_A_r_X2_tr1(handle);
-		} 
-	}
-}
-
-/* The reactions of state B. */
-static void historyWithExitPoint_react_mr_B(HistoryWithExitPoint* handle)
-{
-	/* The reactions of state B. */
-	if (historyWithExitPoint_check_mr_B_tr0_tr0(handle) == bool_true)
-	{ 
-		historyWithExitPoint_effect_mr_B_tr0(handle);
-	} 
-}
-
-/* Default react sequence for initial entry  */
-static void historyWithExitPoint_react_mr__entry_Default(HistoryWithExitPoint* handle)
-{
-	/* Default react sequence for initial entry  */
-	historyWithExitPoint_enseq_mr_A_default(handle);
-}
-
-/* Default react sequence for shallow history entry  */
-static void historyWithExitPoint_react_mr_A_r__entry_Default(HistoryWithExitPoint* handle)
-{
-	/* Default react sequence for shallow history entry  */
-	/* Enter the region with shallow history */
-	if (handle->historyVector[0] != HistoryWithExitPoint_last_state)
-	{
-		historyWithExitPoint_shenseq_mr_A_r(handle);
-	} else
-	{
-		historyWithExitPoint_enseq_mr_A_r_X1_default(handle);
-	} 
-}
-
-/* The reactions of exit exit_to_B. */
-static void historyWithExitPoint_react_mr_A_r_exit_to_B(HistoryWithExitPoint* handle)
-{
-	/* The reactions of exit exit_to_B. */
-	historyWithExitPoint_effect_mr_A_tr0(handle);
-}
-
-

+ 0 - 93
test-plugins/org.yakindu.sct.generator.c.test/gtests/HistoryWithExitPointTest/HistoryWithExitPoint.h

@@ -1,93 +0,0 @@
-
-#ifndef HISTORYWITHEXITPOINT_H_
-#define HISTORYWITHEXITPOINT_H_
-
-#include "sc_types.h"
-		
-#ifdef __cplusplus
-extern "C" { 
-#endif 
-
-/*! \file Header of the state machine 'HistoryWithExitPoint'.
-*/
-
-/*! Enumeration of all states */ 
-typedef enum
-{
-	HistoryWithExitPoint_mr_A,
-	HistoryWithExitPoint_mr_A_r_X1,
-	HistoryWithExitPoint_mr_A_r_X2,
-	HistoryWithExitPoint_mr_B,
-	HistoryWithExitPoint_last_state
-} HistoryWithExitPointStates;
-
-/*! Type definition of the data structure for the HistoryWithExitPointIface interface scope. */
-typedef struct
-{
-	sc_boolean push_raised;
-	sc_boolean back_raised;
-	sc_boolean next_raised;
-} HistoryWithExitPointIface;
-
-
-/*! Define dimension of the state configuration vector for orthogonal states. */
-#define HISTORYWITHEXITPOINT_MAX_ORTHOGONAL_STATES 1
-	/*! Define dimension of the state configuration vector for history states. */
-#define HISTORYWITHEXITPOINT_MAX_HISTORY_STATES 1
-
-/*! 
- * Type definition of the data structure for the HistoryWithExitPoint state machine.
- * This data structure has to be allocated by the client code. 
- */
-typedef struct
-{
-	HistoryWithExitPointStates stateConfVector[HISTORYWITHEXITPOINT_MAX_ORTHOGONAL_STATES];
-	HistoryWithExitPointStates historyVector[HISTORYWITHEXITPOINT_MAX_HISTORY_STATES];
-	sc_ushort stateConfVectorPosition; 
-	
-	HistoryWithExitPointIface iface;
-} HistoryWithExitPoint;
-
-/*! Initializes the HistoryWithExitPoint state machine data structures. Must be called before first usage.*/
-extern void historyWithExitPoint_init(HistoryWithExitPoint* handle);
-
-/*! Activates the state machine */
-extern void historyWithExitPoint_enter(HistoryWithExitPoint* handle);
-
-/*! Deactivates the state machine */
-extern void historyWithExitPoint_exit(HistoryWithExitPoint* handle);
-
-/*! Performs a 'run to completion' step. */
-extern void historyWithExitPoint_runCycle(HistoryWithExitPoint* handle);
-
-
-/*! Raises the in event 'push' that is defined in the default interface scope. */ 
-extern void historyWithExitPointIface_raise_push(HistoryWithExitPoint* handle);
-
-/*! Raises the in event 'back' that is defined in the default interface scope. */ 
-extern void historyWithExitPointIface_raise_back(HistoryWithExitPoint* handle);
-
-/*! Raises the in event 'next' that is defined in the default interface scope. */ 
-extern void historyWithExitPointIface_raise_next(HistoryWithExitPoint* 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 historyWithExitPoint_isActive(const HistoryWithExitPoint* 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 historyWithExitPoint_isFinal(const HistoryWithExitPoint* handle);
-
-/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
-extern sc_boolean historyWithExitPoint_isStateActive(const HistoryWithExitPoint* handle, HistoryWithExitPointStates state);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* HISTORYWITHEXITPOINT_H_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 598
test-plugins/org.yakindu.sct.generator.c.test/gtests/HistoryWithoutInitialStepTest/HistoryWithoutInitialStep.c

@@ -1,598 +0,0 @@
-
-#include <stdlib.h>
-#include <string.h>
-#include "sc_types.h"
-#include "HistoryWithoutInitialStep.h"
-/*! \file Implementation of the state machine 'HistoryWithoutInitialStep'
-*/
-
-/* prototypes of all internal functions */
-static sc_boolean historyWithoutInitialStep_check_main_region_A_tr0_tr0(const HistoryWithoutInitialStep* handle);
-static sc_boolean historyWithoutInitialStep_check_main_region_A_tr1_tr1(const HistoryWithoutInitialStep* handle);
-static sc_boolean historyWithoutInitialStep_check_main_region_B_tr0_tr0(const HistoryWithoutInitialStep* handle);
-static sc_boolean historyWithoutInitialStep_check_main_region_B_r1_C_tr0_tr0(const HistoryWithoutInitialStep* handle);
-static sc_boolean historyWithoutInitialStep_check_main_region_B_r1_D_tr0_tr0(const HistoryWithoutInitialStep* handle);
-static sc_boolean historyWithoutInitialStep_check_main_region_B_r1_E_tr0_tr0(const HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_effect_main_region_A_tr0(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_effect_main_region_A_tr1(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_effect_main_region_B_tr0(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_effect_main_region_B_r1_C_tr0(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_effect_main_region_B_r1_D_tr0(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_effect_main_region_B_r1_E_tr0(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_enseq_main_region_A_default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_enseq_main_region_B_default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_enseq_main_region_B_r1_C_default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_enseq_main_region_B_r1_D_default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_enseq_main_region_B_r1_E_default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_enseq_main_region_B_r1_E__region0_F_default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_enseq_main_region_default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_enseq_main_region_B_r1_default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_shenseq_main_region_B_r1(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_enseq_main_region_B_r1_E__region0_default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_exseq_main_region_A(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_exseq_main_region_B(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_exseq_main_region_B_r1_C(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_exseq_main_region_B_r1_D(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_exseq_main_region_B_r1_E(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_exseq_main_region_B_r1_E__region0_F(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_exseq_main_region(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_exseq_main_region_B_r1(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_exseq_main_region_B_r1_E__region0(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_react_main_region_A(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_react_main_region_B_r1_C(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_react_main_region_B_r1_D(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_react_main_region_B_r1_E__region0_F(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_react_main_region__entry_Default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_react_main_region_B_r1__entry_Default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_react_main_region_B_r1_he(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_react_main_region_B_r1_E__region0__entry_Default(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_clearInEvents(HistoryWithoutInitialStep* handle);
-static void historyWithoutInitialStep_clearOutEvents(HistoryWithoutInitialStep* handle);
-
-
-void historyWithoutInitialStep_init(HistoryWithoutInitialStep* handle)
-{
-	sc_integer i;
-
-	for (i = 0; i < HISTORYWITHOUTINITIALSTEP_MAX_ORTHOGONAL_STATES; ++i)
-	{
-		handle->stateConfVector[i] = HistoryWithoutInitialStep_last_state;
-	}
-	
-	for (i = 0; i < HISTORYWITHOUTINITIALSTEP_MAX_HISTORY_STATES; ++i)
-	{
-		handle->historyVector[i] = HistoryWithoutInitialStep_last_state;
-	}
-	
-	handle->stateConfVectorPosition = 0;
-
-	historyWithoutInitialStep_clearInEvents(handle);
-	historyWithoutInitialStep_clearOutEvents(handle);
-
-
-}
-
-void historyWithoutInitialStep_enter(HistoryWithoutInitialStep* handle)
-{
-	/* Default enter sequence for statechart HistoryWithoutInitialStep */
-	historyWithoutInitialStep_enseq_main_region_default(handle);
-}
-
-void historyWithoutInitialStep_exit(HistoryWithoutInitialStep* handle)
-{
-	/* Default exit sequence for statechart HistoryWithoutInitialStep */
-	historyWithoutInitialStep_exseq_main_region(handle);
-}
-
-sc_boolean historyWithoutInitialStep_isActive(const HistoryWithoutInitialStep* handle)
-{
-	sc_boolean result;
-	if (handle->stateConfVector[0] != HistoryWithoutInitialStep_last_state)
-	{
-		result =  bool_true;
-	}
-	else
-	{
-		result = bool_false;
-	}
-	return result;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean historyWithoutInitialStep_isFinal(const HistoryWithoutInitialStep* handle)
-{
-   return bool_false;
-}
-
-static void historyWithoutInitialStep_clearInEvents(HistoryWithoutInitialStep* handle)
-{
-	handle->iface.toA_raised = bool_false;
-	handle->iface.toB_raised = bool_false;
-	handle->iface.toHistory_raised = bool_false;
-	handle->iface.next_raised = bool_false;
-}
-
-static void historyWithoutInitialStep_clearOutEvents(HistoryWithoutInitialStep* handle)
-{
-}
-
-void historyWithoutInitialStep_runCycle(HistoryWithoutInitialStep* handle)
-{
-	
-	historyWithoutInitialStep_clearOutEvents(handle);
-	
-	for (handle->stateConfVectorPosition = 0;
-		handle->stateConfVectorPosition < HISTORYWITHOUTINITIALSTEP_MAX_ORTHOGONAL_STATES;
-		handle->stateConfVectorPosition++)
-		{
-			
-		switch (handle->stateConfVector[handle->stateConfVectorPosition])
-		{
-		case HistoryWithoutInitialStep_main_region_A :
-		{
-			historyWithoutInitialStep_react_main_region_A(handle);
-			break;
-		}
-		case HistoryWithoutInitialStep_main_region_B_r1_C :
-		{
-			historyWithoutInitialStep_react_main_region_B_r1_C(handle);
-			break;
-		}
-		case HistoryWithoutInitialStep_main_region_B_r1_D :
-		{
-			historyWithoutInitialStep_react_main_region_B_r1_D(handle);
-			break;
-		}
-		case HistoryWithoutInitialStep_main_region_B_r1_E__region0_F :
-		{
-			historyWithoutInitialStep_react_main_region_B_r1_E__region0_F(handle);
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	historyWithoutInitialStep_clearInEvents(handle);
-}
-
-
-sc_boolean historyWithoutInitialStep_isStateActive(const HistoryWithoutInitialStep* handle, HistoryWithoutInitialStepStates state)
-{
-	sc_boolean result = bool_false;
-	switch (state)
-	{
-		case HistoryWithoutInitialStep_main_region_A :
-			result = (sc_boolean) (handle->stateConfVector[0] == HistoryWithoutInitialStep_main_region_A
-			);
-			break;
-		case HistoryWithoutInitialStep_main_region_B :
-			result = (sc_boolean) (handle->stateConfVector[0] >= HistoryWithoutInitialStep_main_region_B
-				&& handle->stateConfVector[0] <= HistoryWithoutInitialStep_main_region_B_r1_E__region0_F);
-			break;
-		case HistoryWithoutInitialStep_main_region_B_r1_C :
-			result = (sc_boolean) (handle->stateConfVector[0] == HistoryWithoutInitialStep_main_region_B_r1_C
-			);
-			break;
-		case HistoryWithoutInitialStep_main_region_B_r1_D :
-			result = (sc_boolean) (handle->stateConfVector[0] == HistoryWithoutInitialStep_main_region_B_r1_D
-			);
-			break;
-		case HistoryWithoutInitialStep_main_region_B_r1_E :
-			result = (sc_boolean) (handle->stateConfVector[0] >= HistoryWithoutInitialStep_main_region_B_r1_E
-				&& handle->stateConfVector[0] <= HistoryWithoutInitialStep_main_region_B_r1_E__region0_F);
-			break;
-		case HistoryWithoutInitialStep_main_region_B_r1_E__region0_F :
-			result = (sc_boolean) (handle->stateConfVector[0] == HistoryWithoutInitialStep_main_region_B_r1_E__region0_F
-			);
-			break;
-		default:
-			result = bool_false;
-			break;
-	}
-	return result;
-}
-
-void historyWithoutInitialStepIface_raise_toA(HistoryWithoutInitialStep* handle)
-{
-	handle->iface.toA_raised = bool_true;
-}
-void historyWithoutInitialStepIface_raise_toB(HistoryWithoutInitialStep* handle)
-{
-	handle->iface.toB_raised = bool_true;
-}
-void historyWithoutInitialStepIface_raise_toHistory(HistoryWithoutInitialStep* handle)
-{
-	handle->iface.toHistory_raised = bool_true;
-}
-void historyWithoutInitialStepIface_raise_next(HistoryWithoutInitialStep* handle)
-{
-	handle->iface.next_raised = bool_true;
-}
-
-
-
-/* implementations of all internal functions */
-
-static sc_boolean historyWithoutInitialStep_check_main_region_A_tr0_tr0(const HistoryWithoutInitialStep* handle)
-{
-	return handle->iface.toB_raised;
-}
-
-static sc_boolean historyWithoutInitialStep_check_main_region_A_tr1_tr1(const HistoryWithoutInitialStep* handle)
-{
-	return handle->iface.toHistory_raised;
-}
-
-static sc_boolean historyWithoutInitialStep_check_main_region_B_tr0_tr0(const HistoryWithoutInitialStep* handle)
-{
-	return handle->iface.toA_raised;
-}
-
-static sc_boolean historyWithoutInitialStep_check_main_region_B_r1_C_tr0_tr0(const HistoryWithoutInitialStep* handle)
-{
-	return handle->iface.next_raised;
-}
-
-static sc_boolean historyWithoutInitialStep_check_main_region_B_r1_D_tr0_tr0(const HistoryWithoutInitialStep* handle)
-{
-	return handle->iface.next_raised;
-}
-
-static sc_boolean historyWithoutInitialStep_check_main_region_B_r1_E_tr0_tr0(const HistoryWithoutInitialStep* handle)
-{
-	return handle->iface.next_raised;
-}
-
-static void historyWithoutInitialStep_effect_main_region_A_tr0(HistoryWithoutInitialStep* handle)
-{
-	historyWithoutInitialStep_exseq_main_region_A(handle);
-	historyWithoutInitialStep_enseq_main_region_B_default(handle);
-}
-
-static void historyWithoutInitialStep_effect_main_region_A_tr1(HistoryWithoutInitialStep* handle)
-{
-	historyWithoutInitialStep_exseq_main_region_A(handle);
-	historyWithoutInitialStep_react_main_region_B_r1_he(handle);
-}
-
-static void historyWithoutInitialStep_effect_main_region_B_tr0(HistoryWithoutInitialStep* handle)
-{
-	historyWithoutInitialStep_exseq_main_region_B(handle);
-	historyWithoutInitialStep_enseq_main_region_A_default(handle);
-}
-
-static void historyWithoutInitialStep_effect_main_region_B_r1_C_tr0(HistoryWithoutInitialStep* handle)
-{
-	historyWithoutInitialStep_exseq_main_region_B_r1_C(handle);
-	historyWithoutInitialStep_enseq_main_region_B_r1_D_default(handle);
-}
-
-static void historyWithoutInitialStep_effect_main_region_B_r1_D_tr0(HistoryWithoutInitialStep* handle)
-{
-	historyWithoutInitialStep_exseq_main_region_B_r1_D(handle);
-	historyWithoutInitialStep_enseq_main_region_B_r1_E_default(handle);
-}
-
-static void historyWithoutInitialStep_effect_main_region_B_r1_E_tr0(HistoryWithoutInitialStep* handle)
-{
-	historyWithoutInitialStep_exseq_main_region_B_r1_E(handle);
-	historyWithoutInitialStep_enseq_main_region_B_r1_C_default(handle);
-}
-
-/* 'default' enter sequence for state A */
-static void historyWithoutInitialStep_enseq_main_region_A_default(HistoryWithoutInitialStep* handle)
-{
-	/* 'default' enter sequence for state A */
-	handle->stateConfVector[0] = HistoryWithoutInitialStep_main_region_A;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state B */
-static void historyWithoutInitialStep_enseq_main_region_B_default(HistoryWithoutInitialStep* handle)
-{
-	/* 'default' enter sequence for state B */
-	historyWithoutInitialStep_enseq_main_region_B_r1_default(handle);
-}
-
-/* 'default' enter sequence for state C */
-static void historyWithoutInitialStep_enseq_main_region_B_r1_C_default(HistoryWithoutInitialStep* handle)
-{
-	/* 'default' enter sequence for state C */
-	handle->stateConfVector[0] = HistoryWithoutInitialStep_main_region_B_r1_C;
-	handle->stateConfVectorPosition = 0;
-	handle->historyVector[0] = handle->stateConfVector[0];
-}
-
-/* 'default' enter sequence for state D */
-static void historyWithoutInitialStep_enseq_main_region_B_r1_D_default(HistoryWithoutInitialStep* handle)
-{
-	/* 'default' enter sequence for state D */
-	handle->stateConfVector[0] = HistoryWithoutInitialStep_main_region_B_r1_D;
-	handle->stateConfVectorPosition = 0;
-	handle->historyVector[0] = handle->stateConfVector[0];
-}
-
-/* 'default' enter sequence for state E */
-static void historyWithoutInitialStep_enseq_main_region_B_r1_E_default(HistoryWithoutInitialStep* handle)
-{
-	/* 'default' enter sequence for state E */
-	historyWithoutInitialStep_enseq_main_region_B_r1_E__region0_default(handle);
-	handle->historyVector[0] = handle->stateConfVector[0];
-}
-
-/* 'default' enter sequence for state F */
-static void historyWithoutInitialStep_enseq_main_region_B_r1_E__region0_F_default(HistoryWithoutInitialStep* handle)
-{
-	/* 'default' enter sequence for state F */
-	handle->stateConfVector[0] = HistoryWithoutInitialStep_main_region_B_r1_E__region0_F;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-static void historyWithoutInitialStep_enseq_main_region_default(HistoryWithoutInitialStep* handle)
-{
-	/* 'default' enter sequence for region main region */
-	historyWithoutInitialStep_react_main_region__entry_Default(handle);
-}
-
-/* 'default' enter sequence for region r1 */
-static void historyWithoutInitialStep_enseq_main_region_B_r1_default(HistoryWithoutInitialStep* handle)
-{
-	/* 'default' enter sequence for region r1 */
-	historyWithoutInitialStep_react_main_region_B_r1__entry_Default(handle);
-}
-
-/* shallow enterSequence with history in child r1 */
-static void historyWithoutInitialStep_shenseq_main_region_B_r1(HistoryWithoutInitialStep* handle)
-{
-	/* shallow enterSequence with history in child r1 */
-	/* Handle shallow history entry of r1 */
-	switch(handle->historyVector[ 0 ])
-	{
-		case HistoryWithoutInitialStep_main_region_B_r1_C :
-		{
-			historyWithoutInitialStep_enseq_main_region_B_r1_C_default(handle);
-			break;
-		}
-		case HistoryWithoutInitialStep_main_region_B_r1_D :
-		{
-			historyWithoutInitialStep_enseq_main_region_B_r1_D_default(handle);
-			break;
-		}
-		case HistoryWithoutInitialStep_main_region_B_r1_E__region0_F :
-		{
-			historyWithoutInitialStep_enseq_main_region_B_r1_E_default(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* 'default' enter sequence for region null */
-static void historyWithoutInitialStep_enseq_main_region_B_r1_E__region0_default(HistoryWithoutInitialStep* handle)
-{
-	/* 'default' enter sequence for region null */
-	historyWithoutInitialStep_react_main_region_B_r1_E__region0__entry_Default(handle);
-}
-
-/* Default exit sequence for state A */
-static void historyWithoutInitialStep_exseq_main_region_A(HistoryWithoutInitialStep* handle)
-{
-	/* Default exit sequence for state A */
-	handle->stateConfVector[0] = HistoryWithoutInitialStep_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state B */
-static void historyWithoutInitialStep_exseq_main_region_B(HistoryWithoutInitialStep* handle)
-{
-	/* Default exit sequence for state B */
-	historyWithoutInitialStep_exseq_main_region_B_r1(handle);
-}
-
-/* Default exit sequence for state C */
-static void historyWithoutInitialStep_exseq_main_region_B_r1_C(HistoryWithoutInitialStep* handle)
-{
-	/* Default exit sequence for state C */
-	handle->stateConfVector[0] = HistoryWithoutInitialStep_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state D */
-static void historyWithoutInitialStep_exseq_main_region_B_r1_D(HistoryWithoutInitialStep* handle)
-{
-	/* Default exit sequence for state D */
-	handle->stateConfVector[0] = HistoryWithoutInitialStep_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state E */
-static void historyWithoutInitialStep_exseq_main_region_B_r1_E(HistoryWithoutInitialStep* handle)
-{
-	/* Default exit sequence for state E */
-	historyWithoutInitialStep_exseq_main_region_B_r1_E__region0(handle);
-}
-
-/* Default exit sequence for state F */
-static void historyWithoutInitialStep_exseq_main_region_B_r1_E__region0_F(HistoryWithoutInitialStep* handle)
-{
-	/* Default exit sequence for state F */
-	handle->stateConfVector[0] = HistoryWithoutInitialStep_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-static void historyWithoutInitialStep_exseq_main_region(HistoryWithoutInitialStep* handle)
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of HistoryWithoutInitialStep.main_region) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case HistoryWithoutInitialStep_main_region_A :
-		{
-			historyWithoutInitialStep_exseq_main_region_A(handle);
-			break;
-		}
-		case HistoryWithoutInitialStep_main_region_B_r1_C :
-		{
-			historyWithoutInitialStep_exseq_main_region_B_r1_C(handle);
-			break;
-		}
-		case HistoryWithoutInitialStep_main_region_B_r1_D :
-		{
-			historyWithoutInitialStep_exseq_main_region_B_r1_D(handle);
-			break;
-		}
-		case HistoryWithoutInitialStep_main_region_B_r1_E__region0_F :
-		{
-			historyWithoutInitialStep_exseq_main_region_B_r1_E__region0_F(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* Default exit sequence for region r1 */
-static void historyWithoutInitialStep_exseq_main_region_B_r1(HistoryWithoutInitialStep* handle)
-{
-	/* Default exit sequence for region r1 */
-	/* Handle exit of all possible states (of HistoryWithoutInitialStep.main_region.B.r1) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case HistoryWithoutInitialStep_main_region_B_r1_C :
-		{
-			historyWithoutInitialStep_exseq_main_region_B_r1_C(handle);
-			break;
-		}
-		case HistoryWithoutInitialStep_main_region_B_r1_D :
-		{
-			historyWithoutInitialStep_exseq_main_region_B_r1_D(handle);
-			break;
-		}
-		case HistoryWithoutInitialStep_main_region_B_r1_E__region0_F :
-		{
-			historyWithoutInitialStep_exseq_main_region_B_r1_E__region0_F(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* Default exit sequence for region null */
-static void historyWithoutInitialStep_exseq_main_region_B_r1_E__region0(HistoryWithoutInitialStep* handle)
-{
-	/* Default exit sequence for region null */
-	/* Handle exit of all possible states (of HistoryWithoutInitialStep.main_region.B.r1.E._region0) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case HistoryWithoutInitialStep_main_region_B_r1_E__region0_F :
-		{
-			historyWithoutInitialStep_exseq_main_region_B_r1_E__region0_F(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state A. */
-static void historyWithoutInitialStep_react_main_region_A(HistoryWithoutInitialStep* handle)
-{
-	/* The reactions of state A. */
-	if (historyWithoutInitialStep_check_main_region_A_tr0_tr0(handle) == bool_true)
-	{ 
-		historyWithoutInitialStep_effect_main_region_A_tr0(handle);
-	}  else
-	{
-		if (historyWithoutInitialStep_check_main_region_A_tr1_tr1(handle) == bool_true)
-		{ 
-			historyWithoutInitialStep_effect_main_region_A_tr1(handle);
-		} 
-	}
-}
-
-/* The reactions of state C. */
-static void historyWithoutInitialStep_react_main_region_B_r1_C(HistoryWithoutInitialStep* handle)
-{
-	/* The reactions of state C. */
-	if (historyWithoutInitialStep_check_main_region_B_tr0_tr0(handle) == bool_true)
-	{ 
-		historyWithoutInitialStep_effect_main_region_B_tr0(handle);
-	}  else
-	{
-		if (historyWithoutInitialStep_check_main_region_B_r1_C_tr0_tr0(handle) == bool_true)
-		{ 
-			historyWithoutInitialStep_effect_main_region_B_r1_C_tr0(handle);
-		} 
-	}
-}
-
-/* The reactions of state D. */
-static void historyWithoutInitialStep_react_main_region_B_r1_D(HistoryWithoutInitialStep* handle)
-{
-	/* The reactions of state D. */
-	if (historyWithoutInitialStep_check_main_region_B_tr0_tr0(handle) == bool_true)
-	{ 
-		historyWithoutInitialStep_effect_main_region_B_tr0(handle);
-	}  else
-	{
-		if (historyWithoutInitialStep_check_main_region_B_r1_D_tr0_tr0(handle) == bool_true)
-		{ 
-			historyWithoutInitialStep_effect_main_region_B_r1_D_tr0(handle);
-		} 
-	}
-}
-
-/* The reactions of state F. */
-static void historyWithoutInitialStep_react_main_region_B_r1_E__region0_F(HistoryWithoutInitialStep* handle)
-{
-	/* The reactions of state F. */
-	if (historyWithoutInitialStep_check_main_region_B_tr0_tr0(handle) == bool_true)
-	{ 
-		historyWithoutInitialStep_effect_main_region_B_tr0(handle);
-	}  else
-	{
-		if (historyWithoutInitialStep_check_main_region_B_r1_E_tr0_tr0(handle) == bool_true)
-		{ 
-			historyWithoutInitialStep_effect_main_region_B_r1_E_tr0(handle);
-		}  else
-		{
-		}
-	}
-}
-
-/* Default react sequence for initial entry  */
-static void historyWithoutInitialStep_react_main_region__entry_Default(HistoryWithoutInitialStep* handle)
-{
-	/* Default react sequence for initial entry  */
-	historyWithoutInitialStep_enseq_main_region_A_default(handle);
-}
-
-/* Default react sequence for initial entry  */
-static void historyWithoutInitialStep_react_main_region_B_r1__entry_Default(HistoryWithoutInitialStep* handle)
-{
-	/* Default react sequence for initial entry  */
-	historyWithoutInitialStep_enseq_main_region_B_r1_C_default(handle);
-}
-
-/* Default react sequence for shallow history entry he */
-static void historyWithoutInitialStep_react_main_region_B_r1_he(HistoryWithoutInitialStep* handle)
-{
-	/* Default react sequence for shallow history entry he */
-	/* Enter the region with shallow history */
-	if (handle->historyVector[0] != HistoryWithoutInitialStep_last_state)
-	{
-		historyWithoutInitialStep_shenseq_main_region_B_r1(handle);
-	} 
-}
-
-/* Default react sequence for initial entry  */
-static void historyWithoutInitialStep_react_main_region_B_r1_E__region0__entry_Default(HistoryWithoutInitialStep* handle)
-{
-	/* Default react sequence for initial entry  */
-	historyWithoutInitialStep_enseq_main_region_B_r1_E__region0_F_default(handle);
-}
-
-

+ 0 - 99
test-plugins/org.yakindu.sct.generator.c.test/gtests/HistoryWithoutInitialStepTest/HistoryWithoutInitialStep.h

@@ -1,99 +0,0 @@
-
-#ifndef HISTORYWITHOUTINITIALSTEP_H_
-#define HISTORYWITHOUTINITIALSTEP_H_
-
-#include "sc_types.h"
-		
-#ifdef __cplusplus
-extern "C" { 
-#endif 
-
-/*! \file Header of the state machine 'HistoryWithoutInitialStep'.
-*/
-
-/*! Enumeration of all states */ 
-typedef enum
-{
-	HistoryWithoutInitialStep_main_region_A,
-	HistoryWithoutInitialStep_main_region_B,
-	HistoryWithoutInitialStep_main_region_B_r1_C,
-	HistoryWithoutInitialStep_main_region_B_r1_D,
-	HistoryWithoutInitialStep_main_region_B_r1_E,
-	HistoryWithoutInitialStep_main_region_B_r1_E__region0_F,
-	HistoryWithoutInitialStep_last_state
-} HistoryWithoutInitialStepStates;
-
-/*! Type definition of the data structure for the HistoryWithoutInitialStepIface interface scope. */
-typedef struct
-{
-	sc_boolean toA_raised;
-	sc_boolean toB_raised;
-	sc_boolean toHistory_raised;
-	sc_boolean next_raised;
-} HistoryWithoutInitialStepIface;
-
-
-/*! Define dimension of the state configuration vector for orthogonal states. */
-#define HISTORYWITHOUTINITIALSTEP_MAX_ORTHOGONAL_STATES 1
-	/*! Define dimension of the state configuration vector for history states. */
-#define HISTORYWITHOUTINITIALSTEP_MAX_HISTORY_STATES 1
-
-/*! 
- * Type definition of the data structure for the HistoryWithoutInitialStep state machine.
- * This data structure has to be allocated by the client code. 
- */
-typedef struct
-{
-	HistoryWithoutInitialStepStates stateConfVector[HISTORYWITHOUTINITIALSTEP_MAX_ORTHOGONAL_STATES];
-	HistoryWithoutInitialStepStates historyVector[HISTORYWITHOUTINITIALSTEP_MAX_HISTORY_STATES];
-	sc_ushort stateConfVectorPosition; 
-	
-	HistoryWithoutInitialStepIface iface;
-} HistoryWithoutInitialStep;
-
-/*! Initializes the HistoryWithoutInitialStep state machine data structures. Must be called before first usage.*/
-extern void historyWithoutInitialStep_init(HistoryWithoutInitialStep* handle);
-
-/*! Activates the state machine */
-extern void historyWithoutInitialStep_enter(HistoryWithoutInitialStep* handle);
-
-/*! Deactivates the state machine */
-extern void historyWithoutInitialStep_exit(HistoryWithoutInitialStep* handle);
-
-/*! Performs a 'run to completion' step. */
-extern void historyWithoutInitialStep_runCycle(HistoryWithoutInitialStep* handle);
-
-
-/*! Raises the in event 'toA' that is defined in the default interface scope. */ 
-extern void historyWithoutInitialStepIface_raise_toA(HistoryWithoutInitialStep* handle);
-
-/*! Raises the in event 'toB' that is defined in the default interface scope. */ 
-extern void historyWithoutInitialStepIface_raise_toB(HistoryWithoutInitialStep* handle);
-
-/*! Raises the in event 'toHistory' that is defined in the default interface scope. */ 
-extern void historyWithoutInitialStepIface_raise_toHistory(HistoryWithoutInitialStep* handle);
-
-/*! Raises the in event 'next' that is defined in the default interface scope. */ 
-extern void historyWithoutInitialStepIface_raise_next(HistoryWithoutInitialStep* 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 historyWithoutInitialStep_isActive(const HistoryWithoutInitialStep* 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 historyWithoutInitialStep_isFinal(const HistoryWithoutInitialStep* handle);
-
-/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
-extern sc_boolean historyWithoutInitialStep_isStateActive(const HistoryWithoutInitialStep* handle, HistoryWithoutInitialStepStates state);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* HISTORYWITHOUTINITIALSTEP_H_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 210
test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycleTest/InEventLifeCycle.c

@@ -1,210 +0,0 @@
-
-#include <stdlib.h>
-#include <string.h>
-#include "sc_types.h"
-#include "InEventLifeCycle.h"
-/*! \file Implementation of the state machine 'InEventLifeCycle'
-*/
-
-/* prototypes of all internal functions */
-static sc_boolean inEventLifeCycle_check_main_region_A_lr0_lr0(const InEventLifeCycle* handle);
-static void inEventLifeCycle_effect_main_region_A_lr0_lr0(InEventLifeCycle* handle);
-static void inEventLifeCycle_enseq_main_region_A_default(InEventLifeCycle* handle);
-static void inEventLifeCycle_enseq_main_region_default(InEventLifeCycle* handle);
-static void inEventLifeCycle_exseq_main_region_A(InEventLifeCycle* handle);
-static void inEventLifeCycle_exseq_main_region(InEventLifeCycle* handle);
-static void inEventLifeCycle_react_main_region_A(InEventLifeCycle* handle);
-static void inEventLifeCycle_react_main_region__entry_Default(InEventLifeCycle* handle);
-static void inEventLifeCycle_clearInEvents(InEventLifeCycle* handle);
-static void inEventLifeCycle_clearOutEvents(InEventLifeCycle* handle);
-
-
-void inEventLifeCycle_init(InEventLifeCycle* handle)
-{
-	sc_integer i;
-
-	for (i = 0; i < INEVENTLIFECYCLE_MAX_ORTHOGONAL_STATES; ++i)
-	{
-		handle->stateConfVector[i] = InEventLifeCycle_last_state;
-	}
-	
-	
-	handle->stateConfVectorPosition = 0;
-
-	inEventLifeCycle_clearInEvents(handle);
-	inEventLifeCycle_clearOutEvents(handle);
-
-	/* Default init sequence for statechart InEventLifeCycle */
-	handle->iface.i = 0;
-
-}
-
-void inEventLifeCycle_enter(InEventLifeCycle* handle)
-{
-	/* Default enter sequence for statechart InEventLifeCycle */
-	inEventLifeCycle_enseq_main_region_default(handle);
-}
-
-void inEventLifeCycle_exit(InEventLifeCycle* handle)
-{
-	/* Default exit sequence for statechart InEventLifeCycle */
-	inEventLifeCycle_exseq_main_region(handle);
-}
-
-sc_boolean inEventLifeCycle_isActive(const InEventLifeCycle* handle)
-{
-	sc_boolean result;
-	if (handle->stateConfVector[0] != InEventLifeCycle_last_state)
-	{
-		result =  bool_true;
-	}
-	else
-	{
-		result = bool_false;
-	}
-	return result;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean inEventLifeCycle_isFinal(const InEventLifeCycle* handle)
-{
-   return bool_false;
-}
-
-static void inEventLifeCycle_clearInEvents(InEventLifeCycle* handle)
-{
-	handle->iface.e_raised = bool_false;
-}
-
-static void inEventLifeCycle_clearOutEvents(InEventLifeCycle* handle)
-{
-}
-
-void inEventLifeCycle_runCycle(InEventLifeCycle* handle)
-{
-	
-	inEventLifeCycle_clearOutEvents(handle);
-	
-	for (handle->stateConfVectorPosition = 0;
-		handle->stateConfVectorPosition < INEVENTLIFECYCLE_MAX_ORTHOGONAL_STATES;
-		handle->stateConfVectorPosition++)
-		{
-			
-		switch (handle->stateConfVector[handle->stateConfVectorPosition])
-		{
-		case InEventLifeCycle_main_region_A :
-		{
-			inEventLifeCycle_react_main_region_A(handle);
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	inEventLifeCycle_clearInEvents(handle);
-}
-
-
-sc_boolean inEventLifeCycle_isStateActive(const InEventLifeCycle* handle, InEventLifeCycleStates state)
-{
-	sc_boolean result = bool_false;
-	switch (state)
-	{
-		case InEventLifeCycle_main_region_A :
-			result = (sc_boolean) (handle->stateConfVector[0] == InEventLifeCycle_main_region_A
-			);
-			break;
-		default:
-			result = bool_false;
-			break;
-	}
-	return result;
-}
-
-void inEventLifeCycleIface_raise_e(InEventLifeCycle* handle)
-{
-	handle->iface.e_raised = bool_true;
-}
-
-
-sc_integer inEventLifeCycleIface_get_i(const InEventLifeCycle* handle)
-{
-	return handle->iface.i;
-}
-void inEventLifeCycleIface_set_i(InEventLifeCycle* handle, sc_integer value)
-{
-	handle->iface.i = value;
-}
-
-/* implementations of all internal functions */
-
-static sc_boolean inEventLifeCycle_check_main_region_A_lr0_lr0(const InEventLifeCycle* handle)
-{
-	return handle->iface.e_raised;
-}
-
-static void inEventLifeCycle_effect_main_region_A_lr0_lr0(InEventLifeCycle* handle)
-{
-	handle->iface.i += 1;
-}
-
-/* 'default' enter sequence for state A */
-static void inEventLifeCycle_enseq_main_region_A_default(InEventLifeCycle* handle)
-{
-	/* 'default' enter sequence for state A */
-	handle->stateConfVector[0] = InEventLifeCycle_main_region_A;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-static void inEventLifeCycle_enseq_main_region_default(InEventLifeCycle* handle)
-{
-	/* 'default' enter sequence for region main region */
-	inEventLifeCycle_react_main_region__entry_Default(handle);
-}
-
-/* Default exit sequence for state A */
-static void inEventLifeCycle_exseq_main_region_A(InEventLifeCycle* handle)
-{
-	/* Default exit sequence for state A */
-	handle->stateConfVector[0] = InEventLifeCycle_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-static void inEventLifeCycle_exseq_main_region(InEventLifeCycle* handle)
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of InEventLifeCycle.main_region) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case InEventLifeCycle_main_region_A :
-		{
-			inEventLifeCycle_exseq_main_region_A(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state A. */
-static void inEventLifeCycle_react_main_region_A(InEventLifeCycle* handle)
-{
-	/* The reactions of state A. */
-	if (inEventLifeCycle_check_main_region_A_lr0_lr0(handle) == bool_true)
-	{ 
-		inEventLifeCycle_effect_main_region_A_lr0_lr0(handle);
-	} 
-}
-
-/* Default react sequence for initial entry  */
-static void inEventLifeCycle_react_main_region__entry_Default(InEventLifeCycle* handle)
-{
-	/* Default react sequence for initial entry  */
-	inEventLifeCycle_enseq_main_region_A_default(handle);
-}
-
-

+ 0 - 84
test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycleTest/InEventLifeCycle.h

@@ -1,84 +0,0 @@
-
-#ifndef INEVENTLIFECYCLE_H_
-#define INEVENTLIFECYCLE_H_
-
-#include "sc_types.h"
-		
-#ifdef __cplusplus
-extern "C" { 
-#endif 
-
-/*! \file Header of the state machine 'InEventLifeCycle'.
-*/
-
-/*! Enumeration of all states */ 
-typedef enum
-{
-	InEventLifeCycle_main_region_A,
-	InEventLifeCycle_last_state
-} InEventLifeCycleStates;
-
-/*! Type definition of the data structure for the InEventLifeCycleIface interface scope. */
-typedef struct
-{
-	sc_boolean e_raised;
-	sc_integer i;
-} InEventLifeCycleIface;
-
-
-/*! Define dimension of the state configuration vector for orthogonal states. */
-#define INEVENTLIFECYCLE_MAX_ORTHOGONAL_STATES 1
-
-/*! 
- * Type definition of the data structure for the InEventLifeCycle state machine.
- * This data structure has to be allocated by the client code. 
- */
-typedef struct
-{
-	InEventLifeCycleStates stateConfVector[INEVENTLIFECYCLE_MAX_ORTHOGONAL_STATES];
-	sc_ushort stateConfVectorPosition; 
-	
-	InEventLifeCycleIface iface;
-} InEventLifeCycle;
-
-/*! Initializes the InEventLifeCycle state machine data structures. Must be called before first usage.*/
-extern void inEventLifeCycle_init(InEventLifeCycle* handle);
-
-/*! Activates the state machine */
-extern void inEventLifeCycle_enter(InEventLifeCycle* handle);
-
-/*! Deactivates the state machine */
-extern void inEventLifeCycle_exit(InEventLifeCycle* handle);
-
-/*! Performs a 'run to completion' step. */
-extern void inEventLifeCycle_runCycle(InEventLifeCycle* handle);
-
-
-/*! Raises the in event 'e' that is defined in the default interface scope. */ 
-extern void inEventLifeCycleIface_raise_e(InEventLifeCycle* handle);
-
-/*! Gets the value of the variable 'i' that is defined in the default interface scope. */ 
-extern sc_integer inEventLifeCycleIface_get_i(const InEventLifeCycle* handle);
-/*! Sets the value of the variable 'i' that is defined in the default interface scope. */ 
-extern void inEventLifeCycleIface_set_i(InEventLifeCycle* 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 inEventLifeCycle_isActive(const InEventLifeCycle* 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 inEventLifeCycle_isFinal(const InEventLifeCycle* handle);
-
-/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
-extern sc_boolean inEventLifeCycle_isStateActive(const InEventLifeCycle* handle, InEventLifeCycleStates state);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* INEVENTLIFECYCLE_H_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 456
test-plugins/org.yakindu.sct.generator.c.test/gtests/IntegerExpressionsTest/IntegerExpressions.c

@@ -1,456 +0,0 @@
-
-#include <stdlib.h>
-#include <string.h>
-#include "sc_types.h"
-#include "IntegerExpressions.h"
-/*! \file Implementation of the state machine 'IntegerExpressions'
-*/
-
-/* prototypes of all internal functions */
-static sc_boolean integerExpressions_check_main_region_StateA_tr0_tr0(const IntegerExpressions* handle);
-static void integerExpressions_effect_main_region_StateA_tr0(IntegerExpressions* handle);
-static void integerExpressions_enact_main_region_StateA(IntegerExpressions* handle);
-static void integerExpressions_enact_main_region_StateB(IntegerExpressions* handle);
-static void integerExpressions_enseq_main_region_StateA_default(IntegerExpressions* handle);
-static void integerExpressions_enseq_main_region_StateB_default(IntegerExpressions* handle);
-static void integerExpressions_enseq_main_region_default(IntegerExpressions* handle);
-static void integerExpressions_exseq_main_region_StateA(IntegerExpressions* handle);
-static void integerExpressions_exseq_main_region_StateB(IntegerExpressions* handle);
-static void integerExpressions_exseq_main_region(IntegerExpressions* handle);
-static void integerExpressions_react_main_region_StateA(IntegerExpressions* handle);
-static void integerExpressions_react_main_region_StateB(IntegerExpressions* handle);
-static void integerExpressions_react_main_region__entry_Default(IntegerExpressions* handle);
-static void integerExpressions_clearInEvents(IntegerExpressions* handle);
-static void integerExpressions_clearOutEvents(IntegerExpressions* handle);
-
-
-void integerExpressions_init(IntegerExpressions* handle)
-{
-	sc_integer i;
-
-	for (i = 0; i < INTEGEREXPRESSIONS_MAX_ORTHOGONAL_STATES; ++i)
-	{
-		handle->stateConfVector[i] = IntegerExpressions_last_state;
-	}
-	
-	
-	handle->stateConfVectorPosition = 0;
-
-	integerExpressions_clearInEvents(handle);
-	integerExpressions_clearOutEvents(handle);
-
-	/* Default init sequence for statechart IntegerExpressions */
-	handle->iface.myInt1 = 0;
-	handle->iface.myInt2 = 0;
-	handle->iface.less = bool_false;
-	handle->iface.greater = bool_false;
-	handle->iface.equalOrLess = bool_false;
-	handle->iface.equalOrGreater = bool_false;
-	handle->iface.equal = bool_false;
-	handle->iface.notEqual = bool_false;
-	handle->iface.plus = 0;
-	handle->iface.minus = 0;
-	handle->iface.multiply = 0;
-	handle->iface.division = 0;
-	handle->iface.modulo = 0;
-	handle->iface.negat = 0;
-	handle->iface.complement = bool_false;
-	handle->iface.multiAssign = 2;
-	handle->iface.divAssign = 20;
-	handle->iface.plusAssign = 2;
-	handle->iface.minusAssign = 2;
-	handle->iface.moduloAssign = 20;
-
-}
-
-void integerExpressions_enter(IntegerExpressions* handle)
-{
-	/* Default enter sequence for statechart IntegerExpressions */
-	integerExpressions_enseq_main_region_default(handle);
-}
-
-void integerExpressions_exit(IntegerExpressions* handle)
-{
-	/* Default exit sequence for statechart IntegerExpressions */
-	integerExpressions_exseq_main_region(handle);
-}
-
-sc_boolean integerExpressions_isActive(const IntegerExpressions* handle)
-{
-	sc_boolean result;
-	if (handle->stateConfVector[0] != IntegerExpressions_last_state)
-	{
-		result =  bool_true;
-	}
-	else
-	{
-		result = bool_false;
-	}
-	return result;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean integerExpressions_isFinal(const IntegerExpressions* handle)
-{
-   return bool_false;
-}
-
-static void integerExpressions_clearInEvents(IntegerExpressions* handle)
-{
-	handle->iface.e1_raised = bool_false;
-}
-
-static void integerExpressions_clearOutEvents(IntegerExpressions* handle)
-{
-}
-
-void integerExpressions_runCycle(IntegerExpressions* handle)
-{
-	
-	integerExpressions_clearOutEvents(handle);
-	
-	for (handle->stateConfVectorPosition = 0;
-		handle->stateConfVectorPosition < INTEGEREXPRESSIONS_MAX_ORTHOGONAL_STATES;
-		handle->stateConfVectorPosition++)
-		{
-			
-		switch (handle->stateConfVector[handle->stateConfVectorPosition])
-		{
-		case IntegerExpressions_main_region_StateA :
-		{
-			integerExpressions_react_main_region_StateA(handle);
-			break;
-		}
-		case IntegerExpressions_main_region_StateB :
-		{
-			integerExpressions_react_main_region_StateB(handle);
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	integerExpressions_clearInEvents(handle);
-}
-
-
-sc_boolean integerExpressions_isStateActive(const IntegerExpressions* handle, IntegerExpressionsStates state)
-{
-	sc_boolean result = bool_false;
-	switch (state)
-	{
-		case IntegerExpressions_main_region_StateA :
-			result = (sc_boolean) (handle->stateConfVector[0] == IntegerExpressions_main_region_StateA
-			);
-			break;
-		case IntegerExpressions_main_region_StateB :
-			result = (sc_boolean) (handle->stateConfVector[0] == IntegerExpressions_main_region_StateB
-			);
-			break;
-		default:
-			result = bool_false;
-			break;
-	}
-	return result;
-}
-
-void integerExpressionsIface_raise_e1(IntegerExpressions* handle)
-{
-	handle->iface.e1_raised = bool_true;
-}
-
-
-sc_integer integerExpressionsIface_get_myInt1(const IntegerExpressions* handle)
-{
-	return handle->iface.myInt1;
-}
-void integerExpressionsIface_set_myInt1(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.myInt1 = value;
-}
-sc_integer integerExpressionsIface_get_myInt2(const IntegerExpressions* handle)
-{
-	return handle->iface.myInt2;
-}
-void integerExpressionsIface_set_myInt2(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.myInt2 = value;
-}
-sc_boolean integerExpressionsIface_get_less(const IntegerExpressions* handle)
-{
-	return handle->iface.less;
-}
-void integerExpressionsIface_set_less(IntegerExpressions* handle, sc_boolean value)
-{
-	handle->iface.less = value;
-}
-sc_boolean integerExpressionsIface_get_greater(const IntegerExpressions* handle)
-{
-	return handle->iface.greater;
-}
-void integerExpressionsIface_set_greater(IntegerExpressions* handle, sc_boolean value)
-{
-	handle->iface.greater = value;
-}
-sc_boolean integerExpressionsIface_get_equalOrLess(const IntegerExpressions* handle)
-{
-	return handle->iface.equalOrLess;
-}
-void integerExpressionsIface_set_equalOrLess(IntegerExpressions* handle, sc_boolean value)
-{
-	handle->iface.equalOrLess = value;
-}
-sc_boolean integerExpressionsIface_get_equalOrGreater(const IntegerExpressions* handle)
-{
-	return handle->iface.equalOrGreater;
-}
-void integerExpressionsIface_set_equalOrGreater(IntegerExpressions* handle, sc_boolean value)
-{
-	handle->iface.equalOrGreater = value;
-}
-sc_boolean integerExpressionsIface_get_equal(const IntegerExpressions* handle)
-{
-	return handle->iface.equal;
-}
-void integerExpressionsIface_set_equal(IntegerExpressions* handle, sc_boolean value)
-{
-	handle->iface.equal = value;
-}
-sc_boolean integerExpressionsIface_get_notEqual(const IntegerExpressions* handle)
-{
-	return handle->iface.notEqual;
-}
-void integerExpressionsIface_set_notEqual(IntegerExpressions* handle, sc_boolean value)
-{
-	handle->iface.notEqual = value;
-}
-sc_integer integerExpressionsIface_get_plus(const IntegerExpressions* handle)
-{
-	return handle->iface.plus;
-}
-void integerExpressionsIface_set_plus(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.plus = value;
-}
-sc_integer integerExpressionsIface_get_minus(const IntegerExpressions* handle)
-{
-	return handle->iface.minus;
-}
-void integerExpressionsIface_set_minus(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.minus = value;
-}
-sc_integer integerExpressionsIface_get_multiply(const IntegerExpressions* handle)
-{
-	return handle->iface.multiply;
-}
-void integerExpressionsIface_set_multiply(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.multiply = value;
-}
-sc_integer integerExpressionsIface_get_division(const IntegerExpressions* handle)
-{
-	return handle->iface.division;
-}
-void integerExpressionsIface_set_division(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.division = value;
-}
-sc_integer integerExpressionsIface_get_modulo(const IntegerExpressions* handle)
-{
-	return handle->iface.modulo;
-}
-void integerExpressionsIface_set_modulo(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.modulo = value;
-}
-sc_integer integerExpressionsIface_get_negat(const IntegerExpressions* handle)
-{
-	return handle->iface.negat;
-}
-void integerExpressionsIface_set_negat(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.negat = value;
-}
-sc_boolean integerExpressionsIface_get_complement(const IntegerExpressions* handle)
-{
-	return handle->iface.complement;
-}
-void integerExpressionsIface_set_complement(IntegerExpressions* handle, sc_boolean value)
-{
-	handle->iface.complement = value;
-}
-sc_integer integerExpressionsIface_get_multiAssign(const IntegerExpressions* handle)
-{
-	return handle->iface.multiAssign;
-}
-void integerExpressionsIface_set_multiAssign(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.multiAssign = value;
-}
-sc_integer integerExpressionsIface_get_divAssign(const IntegerExpressions* handle)
-{
-	return handle->iface.divAssign;
-}
-void integerExpressionsIface_set_divAssign(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.divAssign = value;
-}
-sc_integer integerExpressionsIface_get_plusAssign(const IntegerExpressions* handle)
-{
-	return handle->iface.plusAssign;
-}
-void integerExpressionsIface_set_plusAssign(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.plusAssign = value;
-}
-sc_integer integerExpressionsIface_get_minusAssign(const IntegerExpressions* handle)
-{
-	return handle->iface.minusAssign;
-}
-void integerExpressionsIface_set_minusAssign(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.minusAssign = value;
-}
-sc_integer integerExpressionsIface_get_moduloAssign(const IntegerExpressions* handle)
-{
-	return handle->iface.moduloAssign;
-}
-void integerExpressionsIface_set_moduloAssign(IntegerExpressions* handle, sc_integer value)
-{
-	handle->iface.moduloAssign = value;
-}
-
-/* implementations of all internal functions */
-
-static sc_boolean integerExpressions_check_main_region_StateA_tr0_tr0(const IntegerExpressions* handle)
-{
-	return handle->iface.e1_raised;
-}
-
-static void integerExpressions_effect_main_region_StateA_tr0(IntegerExpressions* handle)
-{
-	integerExpressions_exseq_main_region_StateA(handle);
-	integerExpressions_enseq_main_region_StateB_default(handle);
-}
-
-/* Entry action for state 'StateA'. */
-static void integerExpressions_enact_main_region_StateA(IntegerExpressions* handle)
-{
-	/* Entry action for state 'StateA'. */
-	handle->iface.myInt1 = 10;
-	handle->iface.myInt2 = 5;
-}
-
-/* Entry action for state 'StateB'. */
-static void integerExpressions_enact_main_region_StateB(IntegerExpressions* handle)
-{
-	/* Entry action for state 'StateB'. */
-	handle->iface.less = (handle->iface.myInt1 < handle->iface.myInt2);
-	handle->iface.greater = (handle->iface.myInt1 > handle->iface.myInt2);
-	handle->iface.equalOrLess = (handle->iface.myInt1 <= handle->iface.myInt2);
-	handle->iface.equalOrGreater = (handle->iface.myInt1 >= handle->iface.myInt2);
-	handle->iface.equal = (handle->iface.myInt1 == handle->iface.myInt2);
-	handle->iface.notEqual = (handle->iface.myInt1 != handle->iface.myInt2);
-	handle->iface.plus = handle->iface.myInt1 + handle->iface.myInt2;
-	handle->iface.minus = handle->iface.myInt1 - handle->iface.myInt2;
-	handle->iface.multiply = handle->iface.myInt1 * handle->iface.myInt2;
-	handle->iface.division = handle->iface.myInt1 / handle->iface.myInt2;
-	handle->iface.modulo = handle->iface.myInt1 % handle->iface.myInt2;
-	handle->iface.negat = -handle->iface.myInt1;
-	handle->iface.multiAssign *= handle->iface.myInt1;
-	handle->iface.divAssign /= handle->iface.myInt1;
-	handle->iface.plusAssign += handle->iface.myInt1;
-	handle->iface.minusAssign -= handle->iface.myInt1;
-	handle->iface.moduloAssign %= handle->iface.myInt1;
-}
-
-/* 'default' enter sequence for state StateA */
-static void integerExpressions_enseq_main_region_StateA_default(IntegerExpressions* handle)
-{
-	/* 'default' enter sequence for state StateA */
-	integerExpressions_enact_main_region_StateA(handle);
-	handle->stateConfVector[0] = IntegerExpressions_main_region_StateA;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state StateB */
-static void integerExpressions_enseq_main_region_StateB_default(IntegerExpressions* handle)
-{
-	/* 'default' enter sequence for state StateB */
-	integerExpressions_enact_main_region_StateB(handle);
-	handle->stateConfVector[0] = IntegerExpressions_main_region_StateB;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-static void integerExpressions_enseq_main_region_default(IntegerExpressions* handle)
-{
-	/* 'default' enter sequence for region main region */
-	integerExpressions_react_main_region__entry_Default(handle);
-}
-
-/* Default exit sequence for state StateA */
-static void integerExpressions_exseq_main_region_StateA(IntegerExpressions* handle)
-{
-	/* Default exit sequence for state StateA */
-	handle->stateConfVector[0] = IntegerExpressions_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state StateB */
-static void integerExpressions_exseq_main_region_StateB(IntegerExpressions* handle)
-{
-	/* Default exit sequence for state StateB */
-	handle->stateConfVector[0] = IntegerExpressions_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-static void integerExpressions_exseq_main_region(IntegerExpressions* handle)
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of IntegerExpressions.main_region) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case IntegerExpressions_main_region_StateA :
-		{
-			integerExpressions_exseq_main_region_StateA(handle);
-			break;
-		}
-		case IntegerExpressions_main_region_StateB :
-		{
-			integerExpressions_exseq_main_region_StateB(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state StateA. */
-static void integerExpressions_react_main_region_StateA(IntegerExpressions* handle)
-{
-	/* The reactions of state StateA. */
-	if (integerExpressions_check_main_region_StateA_tr0_tr0(handle) == bool_true)
-	{ 
-		integerExpressions_effect_main_region_StateA_tr0(handle);
-	} 
-}
-
-/* The reactions of state StateB. */
-static void integerExpressions_react_main_region_StateB(IntegerExpressions* handle)
-{
-	/* The reactions of state StateB. */
-}
-
-/* Default react sequence for initial entry  */
-static void integerExpressions_react_main_region__entry_Default(IntegerExpressions* handle)
-{
-	/* Default react sequence for initial entry  */
-	integerExpressions_enseq_main_region_StateA_default(handle);
-}
-
-

+ 0 - 180
test-plugins/org.yakindu.sct.generator.c.test/gtests/IntegerExpressionsTest/IntegerExpressions.h

@@ -1,180 +0,0 @@
-
-#ifndef INTEGEREXPRESSIONS_H_
-#define INTEGEREXPRESSIONS_H_
-
-#include "sc_types.h"
-		
-#ifdef __cplusplus
-extern "C" { 
-#endif 
-
-/*! \file Header of the state machine 'IntegerExpressions'.
-*/
-
-/*! Enumeration of all states */ 
-typedef enum
-{
-	IntegerExpressions_main_region_StateA,
-	IntegerExpressions_main_region_StateB,
-	IntegerExpressions_last_state
-} IntegerExpressionsStates;
-
-/*! Type definition of the data structure for the IntegerExpressionsIface interface scope. */
-typedef struct
-{
-	sc_integer myInt1;
-	sc_integer myInt2;
-	sc_boolean less;
-	sc_boolean greater;
-	sc_boolean equalOrLess;
-	sc_boolean equalOrGreater;
-	sc_boolean equal;
-	sc_boolean notEqual;
-	sc_integer plus;
-	sc_integer minus;
-	sc_integer multiply;
-	sc_integer division;
-	sc_integer modulo;
-	sc_integer negat;
-	sc_boolean complement;
-	sc_integer multiAssign;
-	sc_integer divAssign;
-	sc_integer plusAssign;
-	sc_integer minusAssign;
-	sc_integer moduloAssign;
-	sc_boolean e1_raised;
-} IntegerExpressionsIface;
-
-
-/*! Define dimension of the state configuration vector for orthogonal states. */
-#define INTEGEREXPRESSIONS_MAX_ORTHOGONAL_STATES 1
-
-/*! 
- * Type definition of the data structure for the IntegerExpressions state machine.
- * This data structure has to be allocated by the client code. 
- */
-typedef struct
-{
-	IntegerExpressionsStates stateConfVector[INTEGEREXPRESSIONS_MAX_ORTHOGONAL_STATES];
-	sc_ushort stateConfVectorPosition; 
-	
-	IntegerExpressionsIface iface;
-} IntegerExpressions;
-
-/*! Initializes the IntegerExpressions state machine data structures. Must be called before first usage.*/
-extern void integerExpressions_init(IntegerExpressions* handle);
-
-/*! Activates the state machine */
-extern void integerExpressions_enter(IntegerExpressions* handle);
-
-/*! Deactivates the state machine */
-extern void integerExpressions_exit(IntegerExpressions* handle);
-
-/*! Performs a 'run to completion' step. */
-extern void integerExpressions_runCycle(IntegerExpressions* handle);
-
-
-/*! Gets the value of the variable 'myInt1' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_myInt1(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'myInt1' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_myInt1(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'myInt2' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_myInt2(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'myInt2' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_myInt2(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'less' that is defined in the default interface scope. */ 
-extern sc_boolean integerExpressionsIface_get_less(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'less' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_less(IntegerExpressions* handle, sc_boolean value);
-/*! Gets the value of the variable 'greater' that is defined in the default interface scope. */ 
-extern sc_boolean integerExpressionsIface_get_greater(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'greater' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_greater(IntegerExpressions* handle, sc_boolean value);
-/*! Gets the value of the variable 'equalOrLess' that is defined in the default interface scope. */ 
-extern sc_boolean integerExpressionsIface_get_equalOrLess(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'equalOrLess' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_equalOrLess(IntegerExpressions* handle, sc_boolean value);
-/*! Gets the value of the variable 'equalOrGreater' that is defined in the default interface scope. */ 
-extern sc_boolean integerExpressionsIface_get_equalOrGreater(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'equalOrGreater' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_equalOrGreater(IntegerExpressions* handle, sc_boolean value);
-/*! Gets the value of the variable 'equal' that is defined in the default interface scope. */ 
-extern sc_boolean integerExpressionsIface_get_equal(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'equal' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_equal(IntegerExpressions* handle, sc_boolean value);
-/*! Gets the value of the variable 'notEqual' that is defined in the default interface scope. */ 
-extern sc_boolean integerExpressionsIface_get_notEqual(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'notEqual' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_notEqual(IntegerExpressions* handle, sc_boolean value);
-/*! Gets the value of the variable 'plus' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_plus(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'plus' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_plus(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'minus' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_minus(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'minus' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_minus(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'multiply' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_multiply(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'multiply' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_multiply(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'division' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_division(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'division' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_division(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'modulo' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_modulo(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'modulo' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_modulo(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'negat' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_negat(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'negat' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_negat(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'complement' that is defined in the default interface scope. */ 
-extern sc_boolean integerExpressionsIface_get_complement(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'complement' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_complement(IntegerExpressions* handle, sc_boolean value);
-/*! Gets the value of the variable 'multiAssign' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_multiAssign(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'multiAssign' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_multiAssign(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'divAssign' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_divAssign(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'divAssign' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_divAssign(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'plusAssign' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_plusAssign(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'plusAssign' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_plusAssign(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'minusAssign' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_minusAssign(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'minusAssign' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_minusAssign(IntegerExpressions* handle, sc_integer value);
-/*! Gets the value of the variable 'moduloAssign' that is defined in the default interface scope. */ 
-extern sc_integer integerExpressionsIface_get_moduloAssign(const IntegerExpressions* handle);
-/*! Sets the value of the variable 'moduloAssign' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_set_moduloAssign(IntegerExpressions* handle, sc_integer value);
-/*! Raises the in event 'e1' that is defined in the default interface scope. */ 
-extern void integerExpressionsIface_raise_e1(IntegerExpressions* 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 integerExpressions_isActive(const IntegerExpressions* 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 integerExpressions_isFinal(const IntegerExpressions* handle);
-
-/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
-extern sc_boolean integerExpressions_isStateActive(const IntegerExpressions* handle, IntegerExpressionsStates state);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* INTEGEREXPRESSIONS_H_ */

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

@@ -1,42 +0,0 @@
-
-#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 - 425
test-plugins/org.yakindu.sct.generator.c.test/gtests/InternalEventLifeCycleTest/InternalEventLifeCycle.c

@@ -1,425 +0,0 @@
-
-#include <stdlib.h>
-#include <string.h>
-#include "sc_types.h"
-#include "InternalEventLifeCycle.h"
-/*! \file Implementation of the state machine 'InternalEventLifeCycle'
-*/
-
-/* prototypes of all internal functions */
-static sc_boolean internalEventLifeCycle_check_r1_A_tr0_tr0(const InternalEventLifeCycle* handle);
-static sc_boolean internalEventLifeCycle_check_r1_A_lr0_lr0(const InternalEventLifeCycle* handle);
-static sc_boolean internalEventLifeCycle_check_r1_B_tr0_tr0(const InternalEventLifeCycle* handle);
-static sc_boolean internalEventLifeCycle_check_r2_C_tr0_tr0(const InternalEventLifeCycle* handle);
-static sc_boolean internalEventLifeCycle_check_r2_D_tr0_tr0(const InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_effect_r1_A_tr0(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_effect_r1_A_lr0_lr0(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_effect_r1_B_tr0(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_effect_r2_C_tr0(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_effect_r2_D_tr0(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_enseq_r1_A_default(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_enseq_r1_B_default(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_enseq_r2_C_default(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_enseq_r2_D_default(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_enseq_r1_default(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_enseq_r2_default(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_exseq_r1_A(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_exseq_r1_B(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_exseq_r2_C(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_exseq_r2_D(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_exseq_r1(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_exseq_r2(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_react_r1_A(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_react_r1_B(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_react_r2_C(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_react_r2_D(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_react_r1__entry_Default(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_react_r2__entry_Default(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_clearInEvents(InternalEventLifeCycle* handle);
-static void internalEventLifeCycle_clearOutEvents(InternalEventLifeCycle* handle);
-
-
-void internalEventLifeCycle_init(InternalEventLifeCycle* handle)
-{
-	sc_integer i;
-
-	for (i = 0; i < INTERNALEVENTLIFECYCLE_MAX_ORTHOGONAL_STATES; ++i)
-	{
-		handle->stateConfVector[i] = InternalEventLifeCycle_last_state;
-	}
-	
-	
-	handle->stateConfVectorPosition = 0;
-
-	internalEventLifeCycle_clearInEvents(handle);
-	internalEventLifeCycle_clearOutEvents(handle);
-
-
-}
-
-void internalEventLifeCycle_enter(InternalEventLifeCycle* handle)
-{
-	/* Default enter sequence for statechart InternalEventLifeCycle */
-	internalEventLifeCycle_enseq_r1_default(handle);
-	internalEventLifeCycle_enseq_r2_default(handle);
-}
-
-void internalEventLifeCycle_exit(InternalEventLifeCycle* handle)
-{
-	/* Default exit sequence for statechart InternalEventLifeCycle */
-	internalEventLifeCycle_exseq_r1(handle);
-	internalEventLifeCycle_exseq_r2(handle);
-}
-
-sc_boolean internalEventLifeCycle_isActive(const InternalEventLifeCycle* handle)
-{
-	sc_boolean result;
-	if (handle->stateConfVector[0] != InternalEventLifeCycle_last_state || handle->stateConfVector[1] != InternalEventLifeCycle_last_state)
-	{
-		result =  bool_true;
-	}
-	else
-	{
-		result = bool_false;
-	}
-	return result;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean internalEventLifeCycle_isFinal(const InternalEventLifeCycle* handle)
-{
-   return bool_false;
-}
-
-static void internalEventLifeCycle_clearInEvents(InternalEventLifeCycle* handle)
-{
-	handle->iface.e_raised = bool_false;
-	handle->iface.f_raised = bool_false;
-	handle->internal.i1_raised = bool_false;
-	handle->internal.i2_raised = bool_false;
-}
-
-static void internalEventLifeCycle_clearOutEvents(InternalEventLifeCycle* handle)
-{
-}
-
-void internalEventLifeCycle_runCycle(InternalEventLifeCycle* handle)
-{
-	
-	internalEventLifeCycle_clearOutEvents(handle);
-	
-	for (handle->stateConfVectorPosition = 0;
-		handle->stateConfVectorPosition < INTERNALEVENTLIFECYCLE_MAX_ORTHOGONAL_STATES;
-		handle->stateConfVectorPosition++)
-		{
-			
-		switch (handle->stateConfVector[handle->stateConfVectorPosition])
-		{
-		case InternalEventLifeCycle_r1_A :
-		{
-			internalEventLifeCycle_react_r1_A(handle);
-			break;
-		}
-		case InternalEventLifeCycle_r1_B :
-		{
-			internalEventLifeCycle_react_r1_B(handle);
-			break;
-		}
-		case InternalEventLifeCycle_r2_C :
-		{
-			internalEventLifeCycle_react_r2_C(handle);
-			break;
-		}
-		case InternalEventLifeCycle_r2_D :
-		{
-			internalEventLifeCycle_react_r2_D(handle);
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	internalEventLifeCycle_clearInEvents(handle);
-}
-
-
-sc_boolean internalEventLifeCycle_isStateActive(const InternalEventLifeCycle* handle, InternalEventLifeCycleStates state)
-{
-	sc_boolean result = bool_false;
-	switch (state)
-	{
-		case InternalEventLifeCycle_r1_A :
-			result = (sc_boolean) (handle->stateConfVector[0] == InternalEventLifeCycle_r1_A
-			);
-			break;
-		case InternalEventLifeCycle_r1_B :
-			result = (sc_boolean) (handle->stateConfVector[0] == InternalEventLifeCycle_r1_B
-			);
-			break;
-		case InternalEventLifeCycle_r2_C :
-			result = (sc_boolean) (handle->stateConfVector[1] == InternalEventLifeCycle_r2_C
-			);
-			break;
-		case InternalEventLifeCycle_r2_D :
-			result = (sc_boolean) (handle->stateConfVector[1] == InternalEventLifeCycle_r2_D
-			);
-			break;
-		default:
-			result = bool_false;
-			break;
-	}
-	return result;
-}
-
-void internalEventLifeCycleIface_raise_e(InternalEventLifeCycle* handle)
-{
-	handle->iface.e_raised = bool_true;
-}
-void internalEventLifeCycleIface_raise_f(InternalEventLifeCycle* handle)
-{
-	handle->iface.f_raised = bool_true;
-}
-
-
-
-/* implementations of all internal functions */
-
-static sc_boolean internalEventLifeCycle_check_r1_A_tr0_tr0(const InternalEventLifeCycle* handle)
-{
-	return handle->internal.i2_raised;
-}
-
-static sc_boolean internalEventLifeCycle_check_r1_A_lr0_lr0(const InternalEventLifeCycle* handle)
-{
-	return handle->iface.e_raised;
-}
-
-static sc_boolean internalEventLifeCycle_check_r1_B_tr0_tr0(const InternalEventLifeCycle* handle)
-{
-	return handle->iface.e_raised;
-}
-
-static sc_boolean internalEventLifeCycle_check_r2_C_tr0_tr0(const InternalEventLifeCycle* handle)
-{
-	return handle->internal.i1_raised;
-}
-
-static sc_boolean internalEventLifeCycle_check_r2_D_tr0_tr0(const InternalEventLifeCycle* handle)
-{
-	return handle->iface.f_raised;
-}
-
-static void internalEventLifeCycle_effect_r1_A_tr0(InternalEventLifeCycle* handle)
-{
-	internalEventLifeCycle_exseq_r1_A(handle);
-	internalEventLifeCycle_enseq_r1_B_default(handle);
-}
-
-static void internalEventLifeCycle_effect_r1_A_lr0_lr0(InternalEventLifeCycle* handle)
-{
-	handle->internal.i1_raised = bool_true;
-}
-
-static void internalEventLifeCycle_effect_r1_B_tr0(InternalEventLifeCycle* handle)
-{
-	internalEventLifeCycle_exseq_r1_B(handle);
-	internalEventLifeCycle_enseq_r1_A_default(handle);
-}
-
-static void internalEventLifeCycle_effect_r2_C_tr0(InternalEventLifeCycle* handle)
-{
-	internalEventLifeCycle_exseq_r2_C(handle);
-	internalEventLifeCycle_enseq_r2_D_default(handle);
-}
-
-static void internalEventLifeCycle_effect_r2_D_tr0(InternalEventLifeCycle* handle)
-{
-	internalEventLifeCycle_exseq_r2_D(handle);
-	handle->internal.i2_raised = bool_true;
-	internalEventLifeCycle_enseq_r2_C_default(handle);
-}
-
-/* 'default' enter sequence for state A */
-static void internalEventLifeCycle_enseq_r1_A_default(InternalEventLifeCycle* handle)
-{
-	/* 'default' enter sequence for state A */
-	handle->stateConfVector[0] = InternalEventLifeCycle_r1_A;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state B */
-static void internalEventLifeCycle_enseq_r1_B_default(InternalEventLifeCycle* handle)
-{
-	/* 'default' enter sequence for state B */
-	handle->stateConfVector[0] = InternalEventLifeCycle_r1_B;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state C */
-static void internalEventLifeCycle_enseq_r2_C_default(InternalEventLifeCycle* handle)
-{
-	/* 'default' enter sequence for state C */
-	handle->stateConfVector[1] = InternalEventLifeCycle_r2_C;
-	handle->stateConfVectorPosition = 1;
-}
-
-/* 'default' enter sequence for state D */
-static void internalEventLifeCycle_enseq_r2_D_default(InternalEventLifeCycle* handle)
-{
-	/* 'default' enter sequence for state D */
-	handle->stateConfVector[1] = InternalEventLifeCycle_r2_D;
-	handle->stateConfVectorPosition = 1;
-}
-
-/* 'default' enter sequence for region r1 */
-static void internalEventLifeCycle_enseq_r1_default(InternalEventLifeCycle* handle)
-{
-	/* 'default' enter sequence for region r1 */
-	internalEventLifeCycle_react_r1__entry_Default(handle);
-}
-
-/* 'default' enter sequence for region r2 */
-static void internalEventLifeCycle_enseq_r2_default(InternalEventLifeCycle* handle)
-{
-	/* 'default' enter sequence for region r2 */
-	internalEventLifeCycle_react_r2__entry_Default(handle);
-}
-
-/* Default exit sequence for state A */
-static void internalEventLifeCycle_exseq_r1_A(InternalEventLifeCycle* handle)
-{
-	/* Default exit sequence for state A */
-	handle->stateConfVector[0] = InternalEventLifeCycle_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state B */
-static void internalEventLifeCycle_exseq_r1_B(InternalEventLifeCycle* handle)
-{
-	/* Default exit sequence for state B */
-	handle->stateConfVector[0] = InternalEventLifeCycle_last_state;
-	handle->stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state C */
-static void internalEventLifeCycle_exseq_r2_C(InternalEventLifeCycle* handle)
-{
-	/* Default exit sequence for state C */
-	handle->stateConfVector[1] = InternalEventLifeCycle_last_state;
-	handle->stateConfVectorPosition = 1;
-}
-
-/* Default exit sequence for state D */
-static void internalEventLifeCycle_exseq_r2_D(InternalEventLifeCycle* handle)
-{
-	/* Default exit sequence for state D */
-	handle->stateConfVector[1] = InternalEventLifeCycle_last_state;
-	handle->stateConfVectorPosition = 1;
-}
-
-/* Default exit sequence for region r1 */
-static void internalEventLifeCycle_exseq_r1(InternalEventLifeCycle* handle)
-{
-	/* Default exit sequence for region r1 */
-	/* Handle exit of all possible states (of InternalEventLifeCycle.r1) at position 0... */
-	switch(handle->stateConfVector[ 0 ])
-	{
-		case InternalEventLifeCycle_r1_A :
-		{
-			internalEventLifeCycle_exseq_r1_A(handle);
-			break;
-		}
-		case InternalEventLifeCycle_r1_B :
-		{
-			internalEventLifeCycle_exseq_r1_B(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* Default exit sequence for region r2 */
-static void internalEventLifeCycle_exseq_r2(InternalEventLifeCycle* handle)
-{
-	/* Default exit sequence for region r2 */
-	/* Handle exit of all possible states (of InternalEventLifeCycle.r2) at position 1... */
-	switch(handle->stateConfVector[ 1 ])
-	{
-		case InternalEventLifeCycle_r2_C :
-		{
-			internalEventLifeCycle_exseq_r2_C(handle);
-			break;
-		}
-		case InternalEventLifeCycle_r2_D :
-		{
-			internalEventLifeCycle_exseq_r2_D(handle);
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state A. */
-static void internalEventLifeCycle_react_r1_A(InternalEventLifeCycle* handle)
-{
-	/* The reactions of state A. */
-	if (internalEventLifeCycle_check_r1_A_tr0_tr0(handle) == bool_true)
-	{ 
-		internalEventLifeCycle_effect_r1_A_tr0(handle);
-	}  else
-	{
-		if (internalEventLifeCycle_check_r1_A_lr0_lr0(handle) == bool_true)
-		{ 
-			internalEventLifeCycle_effect_r1_A_lr0_lr0(handle);
-		} 
-	}
-}
-
-/* The reactions of state B. */
-static void internalEventLifeCycle_react_r1_B(InternalEventLifeCycle* handle)
-{
-	/* The reactions of state B. */
-	if (internalEventLifeCycle_check_r1_B_tr0_tr0(handle) == bool_true)
-	{ 
-		internalEventLifeCycle_effect_r1_B_tr0(handle);
-	} 
-}
-
-/* The reactions of state C. */
-static void internalEventLifeCycle_react_r2_C(InternalEventLifeCycle* handle)
-{
-	/* The reactions of state C. */
-	if (internalEventLifeCycle_check_r2_C_tr0_tr0(handle) == bool_true)
-	{ 
-		internalEventLifeCycle_effect_r2_C_tr0(handle);
-	} 
-}
-
-/* The reactions of state D. */
-static void internalEventLifeCycle_react_r2_D(InternalEventLifeCycle* handle)
-{
-	/* The reactions of state D. */
-	if (internalEventLifeCycle_check_r2_D_tr0_tr0(handle) == bool_true)
-	{ 
-		internalEventLifeCycle_effect_r2_D_tr0(handle);
-	} 
-}
-
-/* Default react sequence for initial entry  */
-static void internalEventLifeCycle_react_r1__entry_Default(InternalEventLifeCycle* handle)
-{
-	/* Default react sequence for initial entry  */
-	internalEventLifeCycle_enseq_r1_A_default(handle);
-}
-
-/* Default react sequence for initial entry  */
-static void internalEventLifeCycle_react_r2__entry_Default(InternalEventLifeCycle* handle)
-{
-	/* Default react sequence for initial entry  */
-	internalEventLifeCycle_enseq_r2_C_default(handle);
-}
-
-

+ 0 - 94
test-plugins/org.yakindu.sct.generator.c.test/gtests/InternalEventLifeCycleTest/InternalEventLifeCycle.h

@@ -1,94 +0,0 @@
-
-#ifndef INTERNALEVENTLIFECYCLE_H_
-#define INTERNALEVENTLIFECYCLE_H_
-
-#include "sc_types.h"
-		
-#ifdef __cplusplus
-extern "C" { 
-#endif 
-
-/*! \file Header of the state machine 'InternalEventLifeCycle'.
-*/
-
-/*! Enumeration of all states */ 
-typedef enum
-{
-	InternalEventLifeCycle_r1_A,
-	InternalEventLifeCycle_r1_B,
-	InternalEventLifeCycle_r2_C,
-	InternalEventLifeCycle_r2_D,
-	InternalEventLifeCycle_last_state
-} InternalEventLifeCycleStates;
-
-/*! Type definition of the data structure for the InternalEventLifeCycleIface interface scope. */
-typedef struct
-{
-	sc_boolean e_raised;
-	sc_boolean f_raised;
-} InternalEventLifeCycleIface;
-
-/*! Type definition of the data structure for the InternalEventLifeCycleInternal interface scope. */
-typedef struct
-{
-	sc_boolean i1_raised;
-	sc_boolean i2_raised;
-} InternalEventLifeCycleInternal;
-
-
-/*! Define dimension of the state configuration vector for orthogonal states. */
-#define INTERNALEVENTLIFECYCLE_MAX_ORTHOGONAL_STATES 2
-
-/*! 
- * Type definition of the data structure for the InternalEventLifeCycle state machine.
- * This data structure has to be allocated by the client code. 
- */
-typedef struct
-{
-	InternalEventLifeCycleStates stateConfVector[INTERNALEVENTLIFECYCLE_MAX_ORTHOGONAL_STATES];
-	sc_ushort stateConfVectorPosition; 
-	
-	InternalEventLifeCycleIface iface;
-	InternalEventLifeCycleInternal internal;
-} InternalEventLifeCycle;
-
-/*! Initializes the InternalEventLifeCycle state machine data structures. Must be called before first usage.*/
-extern void internalEventLifeCycle_init(InternalEventLifeCycle* handle);
-
-/*! Activates the state machine */
-extern void internalEventLifeCycle_enter(InternalEventLifeCycle* handle);
-
-/*! Deactivates the state machine */
-extern void internalEventLifeCycle_exit(InternalEventLifeCycle* handle);
-
-/*! Performs a 'run to completion' step. */
-extern void internalEventLifeCycle_runCycle(InternalEventLifeCycle* handle);
-
-
-/*! Raises the in event 'e' that is defined in the default interface scope. */ 
-extern void internalEventLifeCycleIface_raise_e(InternalEventLifeCycle* handle);
-
-/*! Raises the in event 'f' that is defined in the default interface scope. */ 
-extern void internalEventLifeCycleIface_raise_f(InternalEventLifeCycle* 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 internalEventLifeCycle_isActive(const InternalEventLifeCycle* 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 internalEventLifeCycle_isFinal(const InternalEventLifeCycle* handle);
-
-/*! Checks if the specified state is active (until 2.4.1 the used method for states was called isActive()). */
-extern sc_boolean internalEventLifeCycle_isStateActive(const InternalEventLifeCycle* handle, InternalEventLifeCycleStates state);
-
-#ifdef __cplusplus
-}
-#endif 
-
-#endif /* INTERNALEVENTLIFECYCLE_H_ */

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

@@ -1,42 +0,0 @@
-
-#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/LocalReactionsTest/LocalReactions.c


Vissa filer visades inte eftersom för många filer har ändrats