Browse Source

Added manual executable gtests.

markus.muehlbrandt@gmail.com 13 years ago
parent
commit
32c0a79db6
29 changed files with 3358 additions and 0 deletions
  1. 125 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/.cproject
  2. 33 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/.project
  3. 72 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/model/testModelCode.sgen
  4. 172 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/AlwaysOncycle/AlwaysOncycle.c
  5. 64 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/AlwaysOncycle/AlwaysOncycle.h
  6. 30 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/AlwaysOncycle/AlwaysOncycleRequired.h
  7. 27 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/AlwaysOncycle/sc_types.h
  8. 208 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/BitExpressions/BitExpressions.c
  9. 103 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/BitExpressions/BitExpressions.h
  10. 30 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/BitExpressions/BitExpressionsRequired.h
  11. 27 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/BitExpressions/sc_types.h
  12. 804 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/DeepHistory/DeepHistory.c
  13. 105 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/DeepHistory/DeepHistory.h
  14. 30 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/DeepHistory/DeepHistoryRequired.h
  15. 27 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/DeepHistory/sc_types.h
  16. 765 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/ShallowHistory/ShallowHistory.c
  17. 101 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/ShallowHistory/ShallowHistory.h
  18. 30 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/ShallowHistory/ShallowHistoryRequired.h
  19. 27 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/ShallowHistory/sc_types.h
  20. 186 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/TimeTrigger/TimeTrigger.c
  21. 73 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/TimeTrigger/TimeTrigger.h
  22. 54 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/TimeTrigger/TimeTriggerRequired.h
  23. 27 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/TimeTrigger/sc_types.h
  24. 6 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src/AllStatemachineTests.cc
  25. 31 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src/AlwaysOncycle.cc
  26. 25 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src/BitExpressions.cc
  27. 41 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src/DeepHistory.cc
  28. 68 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src/ShallowHistory.cc
  29. 67 0
      test-plugins/org.yakindu.sct.generator.c.test.manual/src/TimeTrigger.cc

File diff suppressed because it is too large
+ 125 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/.cproject


+ 33 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/.project

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.sct.generator.c.test.manual</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>clean,full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.core.ccnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+	</natures>
+</projectDescription>

+ 72 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/model/testModelCode.sgen

@@ -0,0 +1,72 @@
+GeneratorModel for yakindu::generic {
+
+	statechart AlwaysOncycle {
+		
+		feature Generator {   
+			generatorProject =  "org.yakindu.sct.generator.c" 
+			generatorClass =  "org.yakindu.sct.generator.c.CSCTGenerator" 
+//			configurationModule = ""
+		}
+
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.c.test.manual"
+			targetFolder = "src-gen/AlwaysOncycle" 
+		}
+	}
+	
+	statechart BitExpressions {
+		
+		feature Generator {   
+			generatorProject =  "org.yakindu.sct.generator.c" 
+			generatorClass =  "org.yakindu.sct.generator.c.CSCTGenerator" 
+//			configurationModule = ""
+		}
+
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.c.test.manual"
+			targetFolder = "src-gen/BitExpressions" 
+		}
+	}
+	
+	statechart TimeTrigger {
+		
+		feature Generator {   
+			generatorProject =  "org.yakindu.sct.generator.c" 
+			generatorClass =  "org.yakindu.sct.generator.c.CSCTGenerator" 
+//			configurationModule = ""
+		}
+
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.c.test.manual"
+			targetFolder = "src-gen/TimeTrigger" 
+		}
+	}
+
+	statechart ShallowHistory {
+		
+		feature Generator {   
+			generatorProject =  "org.yakindu.sct.generator.c" 
+			generatorClass =  "org.yakindu.sct.generator.c.CSCTGenerator" 
+//			configurationModule = ""
+		}
+
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.c.test.manual"
+			targetFolder = "src-gen/ShallowHistory" 
+		}
+	}
+	
+	statechart DeepHistory {
+		
+		feature Generator {   
+			generatorProject =  "org.yakindu.sct.generator.c" 
+			generatorClass =  "org.yakindu.sct.generator.c.CSCTGenerator" 
+//			configurationModule = ""
+		}
+
+		feature Outlet {
+			targetProject = "org.yakindu.sct.generator.c.test.manual"
+			targetFolder = "src-gen/DeepHistory" 
+		}
+	}
+} 

+ 172 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/AlwaysOncycle/AlwaysOncycle.c

@@ -0,0 +1,172 @@
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "AlwaysOncycle.h"
+#include "AlwaysOncycleRequired.h"
+
+/*! \file Implementation of the state machine 'AlwaysOncycle'
+*/
+
+// prototypes of all internal functions
+
+static void alwaysOncycle_entryaction(AlwaysOncycle* handle);
+static void alwaysOncycle_exitaction(AlwaysOncycle* handle);
+static void alwaysOncycle_react_main_region_StateA(AlwaysOncycle* handle);
+static void alwaysOncycle_react_main_region_StateB(AlwaysOncycle* handle);
+static void clearInEvents(AlwaysOncycle* handle);
+static void clearOutEvents(AlwaysOncycle* handle);
+
+
+void alwaysOncycle_init(AlwaysOncycle* handle)
+{
+	int i;
+
+	for (i = 0; i < ALWAYSONCYCLE_MAX_ORTHOGONAL_STATES; ++i)
+		handle->stateConfVector[i] = AlwaysOncycle_last_state;
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	// TODO: initialize all events ...
+	// TODO: initialize all variables ... (set default values - here or inenter sequence ?!?)
+
+}
+
+void alwaysOncycle_enter(AlwaysOncycle* handle)
+{
+	/* Default enter sequence for statechart AlwaysOncycle */
+	alwaysOncycle_entryaction(handle);
+	/* Default enter sequence for region main region */
+	/* Default react sequence for initial entry  */
+	/* Default enter sequence for state StateA */
+	/* Entry action for state 'StateA'. */
+	handle->iface.value = 0;
+	handle->stateConfVector[0] = AlwaysOncycle_main_region_StateA;
+	handle->stateConfVectorPosition = 0;
+}
+
+void alwaysOncycle_exit(AlwaysOncycle* handle)
+{
+	/* Default exit sequence for statechart AlwaysOncycle */
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of main region) at position 0... */
+	switch(handle->stateConfVector[ 0 ]) {
+		case AlwaysOncycle_main_region_StateA : {
+			/* Default exit sequence for state StateA */
+			handle->stateConfVector[0] = AlwaysOncycle_last_state;
+			handle->stateConfVectorPosition = 0;
+			/* Exit action for state 'StateA'. */
+			handle->iface.value = 0;
+			break;
+		}
+		case AlwaysOncycle_main_region_StateB : {
+			/* Default exit sequence for state StateB */
+			handle->stateConfVector[0] = AlwaysOncycle_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		default: break;
+	}
+	alwaysOncycle_exitaction(handle);
+}
+
+static void clearInEvents(AlwaysOncycle* handle) {
+}
+
+static void clearOutEvents(AlwaysOncycle* handle) {
+}
+
+void alwaysOncycle_runCycle(AlwaysOncycle* handle) {
+	
+	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;
+		}
+	}
+	
+	clearInEvents(handle);
+}
+
+
+sc_boolean alwaysOncycle_isActive(AlwaysOncycle* handle, AlwaysOncycleStates state) {
+	switch (state) {
+		case AlwaysOncycle_main_region_StateA : 
+			return (sc_boolean) (handle->stateConfVector[0] == AlwaysOncycle_main_region_StateA
+			);
+		case AlwaysOncycle_main_region_StateB : 
+			return (sc_boolean) (handle->stateConfVector[0] == AlwaysOncycle_main_region_StateB
+			);
+		default: return bool_false;
+	}
+}
+
+
+
+sc_integer alwaysOncycleIface_get_value(AlwaysOncycle* handle) {
+	return handle->iface.value;
+}
+void alwaysOncycleIface_set_value(AlwaysOncycle* handle, sc_integer value) {
+	handle->iface.value = value;
+}
+		
+// implementations of all internal functions
+
+/* Entry action for statechart 'AlwaysOncycle'. */
+static void alwaysOncycle_entryaction(AlwaysOncycle* handle) {
+	/* Entry action for statechart 'AlwaysOncycle'. */
+}
+
+/* Exit action for state 'AlwaysOncycle'. */
+static void alwaysOncycle_exitaction(AlwaysOncycle* handle) {
+	/* Exit action for state 'AlwaysOncycle'. */
+}
+
+/* The reactions of state StateA. */
+static void alwaysOncycle_react_main_region_StateA(AlwaysOncycle* handle) {
+	/* The reactions of state StateA. */
+	if (handle->iface.value == 5) { 
+		/* Default exit sequence for state StateA */
+		handle->stateConfVector[0] = AlwaysOncycle_last_state;
+		handle->stateConfVectorPosition = 0;
+		/* Exit action for state 'StateA'. */
+		handle->iface.value = 0;
+		/* Default enter sequence for state StateB */
+		handle->stateConfVector[0] = AlwaysOncycle_main_region_StateB;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		handle->iface.value += 1;
+	}
+}
+
+/* The reactions of state StateB. */
+static void alwaysOncycle_react_main_region_StateB(AlwaysOncycle* handle) {
+	/* The reactions of state StateB. */
+	if (handle->iface.value == 5) { 
+		/* Default exit sequence for state StateB */
+		handle->stateConfVector[0] = AlwaysOncycle_last_state;
+		handle->stateConfVectorPosition = 0;
+		/* Default enter sequence for state StateA */
+		/* Entry action for state 'StateA'. */
+		handle->iface.value = 0;
+		handle->stateConfVector[0] = AlwaysOncycle_main_region_StateA;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		handle->iface.value += 1;
+	}
+}
+
+

+ 64 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/AlwaysOncycle/AlwaysOncycle.h

@@ -0,0 +1,64 @@
+#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;
+} AlwaysOncycleIface;
+
+
+//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
+#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(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);
+
+
+/*! Checks if the specified state is active. */
+extern sc_boolean alwaysOncycle_isActive(AlwaysOncycle* handle, AlwaysOncycleStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* ALWAYSONCYCLE_H_ */

+ 30 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/AlwaysOncycle/AlwaysOncycleRequired.h

@@ -0,0 +1,30 @@
+#ifndef ALWAYSONCYCLEREQUIRED_H_
+#define ALWAYSONCYCLEREQUIRED_H_
+
+#include "sc_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+
+
+/*! \file This header defines prototypes for all functions that are required by the state machine implementation.
+
+
+		
+These functions will be called during a 'run to completion step' (runCycle) of the statechart. 
+There are some constraints that have to be considered for the implementation of these functions:
+	- never call the statechart API functions from within these functions.
+	- make sure that the execution time is as short as possible.
+ 
+*/
+
+
+
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* ALWAYSONCYCLEREQUIRED_H_ */

+ 27 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/AlwaysOncycle/sc_types.h

@@ -0,0 +1,27 @@
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+ 				
+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 char*         sc_string;
+
+typedef void*         sc_eventid;
+
+#ifdef __cplusplus
+}
+#endif 
+#define sc_boolean bool
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 208 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/BitExpressions/BitExpressions.c

@@ -0,0 +1,208 @@
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "BitExpressions.h"
+#include "BitExpressionsRequired.h"
+
+/*! \file Implementation of the state machine 'BitExpressions'
+*/
+
+// prototypes of all internal functions
+
+static void bitExpressions_entryaction(BitExpressions* handle);
+static void bitExpressions_exitaction(BitExpressions* handle);
+static void bitExpressions_react_main_region_StateA(BitExpressions* handle);
+static void bitExpressions_react_main_region_StateB(BitExpressions* handle);
+static void clearInEvents(BitExpressions* handle);
+static void clearOutEvents(BitExpressions* handle);
+
+
+void bitExpressions_init(BitExpressions* handle)
+{
+	int i;
+
+	for (i = 0; i < BITEXPRESSIONS_MAX_ORTHOGONAL_STATES; ++i)
+		handle->stateConfVector[i] = BitExpressions_last_state;
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	// TODO: initialize all events ...
+	// TODO: initialize all variables ... (set default values - here or inenter sequence ?!?)
+
+}
+
+void bitExpressions_enter(BitExpressions* handle)
+{
+	/* Default enter sequence for statechart BitExpressions */
+	bitExpressions_entryaction(handle);
+	/* Default enter sequence for region main region */
+	/* Default react sequence for initial entry  */
+	/* Default enter sequence for state StateA */
+	/* Entry action for state 'StateA'. */
+	handle->iface.myBit1 = 5;
+	handle->iface.myBit2 = 7;
+	handle->stateConfVector[0] = BitExpressions_main_region_StateA;
+	handle->stateConfVectorPosition = 0;
+}
+
+void bitExpressions_exit(BitExpressions* handle)
+{
+	/* Default exit sequence for statechart BitExpressions */
+	/* Default exit sequence for region main region */
+	/* Handle exit of all possible states (of main region) at position 0... */
+	switch(handle->stateConfVector[ 0 ]) {
+		case BitExpressions_main_region_StateA : {
+			/* Default exit sequence for state StateA */
+			handle->stateConfVector[0] = BitExpressions_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case BitExpressions_main_region_StateB : {
+			/* Default exit sequence for state StateB */
+			handle->stateConfVector[0] = BitExpressions_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		default: break;
+	}
+	bitExpressions_exitaction(handle);
+}
+
+static void clearInEvents(BitExpressions* handle) {
+	handle->iface.e1_raised = bool_false;
+}
+
+static void clearOutEvents(BitExpressions* handle) {
+}
+
+void bitExpressions_runCycle(BitExpressions* handle) {
+	
+	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;
+		}
+	}
+	
+	clearInEvents(handle);
+}
+
+
+sc_boolean bitExpressions_isActive(BitExpressions* handle, BitExpressionsStates state) {
+	switch (state) {
+		case BitExpressions_main_region_StateA : 
+			return (sc_boolean) (handle->stateConfVector[0] == BitExpressions_main_region_StateA
+			);
+		case BitExpressions_main_region_StateB : 
+			return (sc_boolean) (handle->stateConfVector[0] == BitExpressions_main_region_StateB
+			);
+		default: return bool_false;
+	}
+}
+
+void bitExpressionsIface_raise_e1(BitExpressions* handle) {
+	handle->iface.e1_raised = bool_true;
+}
+
+
+sc_integer bitExpressionsIface_get_myBit1(BitExpressions* handle) {
+	return handle->iface.myBit1;
+}
+void bitExpressionsIface_set_myBit1(BitExpressions* handle, sc_integer value) {
+	handle->iface.myBit1 = value;
+}
+sc_integer bitExpressionsIface_get_myBit2(BitExpressions* handle) {
+	return handle->iface.myBit2;
+}
+void bitExpressionsIface_set_myBit2(BitExpressions* handle, sc_integer value) {
+	handle->iface.myBit2 = value;
+}
+sc_integer bitExpressionsIface_get_leftBitshift(BitExpressions* handle) {
+	return handle->iface.leftBitshift;
+}
+void bitExpressionsIface_set_leftBitshift(BitExpressions* handle, sc_integer value) {
+	handle->iface.leftBitshift = value;
+}
+sc_integer bitExpressionsIface_get_rightBitshift(BitExpressions* handle) {
+	return handle->iface.rightBitshift;
+}
+void bitExpressionsIface_set_rightBitshift(BitExpressions* handle, sc_integer value) {
+	handle->iface.rightBitshift = value;
+}
+sc_integer bitExpressionsIface_get_complementBitshift(BitExpressions* handle) {
+	return handle->iface.complementBitshift;
+}
+void bitExpressionsIface_set_complementBitshift(BitExpressions* handle, sc_integer value) {
+	handle->iface.complementBitshift = value;
+}
+sc_integer bitExpressionsIface_get_bitwiseAnd(BitExpressions* handle) {
+	return handle->iface.bitwiseAnd;
+}
+void bitExpressionsIface_set_bitwiseAnd(BitExpressions* handle, sc_integer value) {
+	handle->iface.bitwiseAnd = value;
+}
+sc_integer bitExpressionsIface_get_bitwiseOr(BitExpressions* handle) {
+	return handle->iface.bitwiseOr;
+}
+void bitExpressionsIface_set_bitwiseOr(BitExpressions* handle, sc_integer value) {
+	handle->iface.bitwiseOr = value;
+}
+sc_integer bitExpressionsIface_get_bitwiseXor(BitExpressions* handle) {
+	return handle->iface.bitwiseXor;
+}
+void bitExpressionsIface_set_bitwiseXor(BitExpressions* handle, sc_integer value) {
+	handle->iface.bitwiseXor = value;
+}
+		
+// implementations of all internal functions
+
+/* Entry action for statechart 'BitExpressions'. */
+static void bitExpressions_entryaction(BitExpressions* handle) {
+	/* Entry action for statechart 'BitExpressions'. */
+}
+
+/* Exit action for state 'BitExpressions'. */
+static void bitExpressions_exitaction(BitExpressions* handle) {
+	/* Exit action for state 'BitExpressions'. */
+}
+
+/* The reactions of state StateA. */
+static void bitExpressions_react_main_region_StateA(BitExpressions* handle) {
+	/* The reactions of state StateA. */
+	if (handle->iface.e1_raised) { 
+		/* Default exit sequence for state StateA */
+		handle->stateConfVector[0] = BitExpressions_last_state;
+		handle->stateConfVectorPosition = 0;
+		/* Default enter sequence for state StateB */
+		/* 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;
+		handle->stateConfVector[0] = BitExpressions_main_region_StateB;
+		handle->stateConfVectorPosition = 0;
+	} 
+}
+
+/* The reactions of state StateB. */
+static void bitExpressions_react_main_region_StateB(BitExpressions* handle) {
+	/* The reactions of state StateB. */
+}
+
+

+ 103 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/BitExpressions/BitExpressions.h

@@ -0,0 +1,103 @@
+#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;
+
+
+//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
+#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(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(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(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(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(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(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(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(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 if the specified state is active. */
+extern sc_boolean bitExpressions_isActive(BitExpressions* handle, BitExpressionsStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* BITEXPRESSIONS_H_ */

+ 30 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/BitExpressions/BitExpressionsRequired.h

@@ -0,0 +1,30 @@
+#ifndef BITEXPRESSIONSREQUIRED_H_
+#define BITEXPRESSIONSREQUIRED_H_
+
+#include "sc_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+
+
+/*! \file This header defines prototypes for all functions that are required by the state machine implementation.
+
+
+		
+These functions will be called during a 'run to completion step' (runCycle) of the statechart. 
+There are some constraints that have to be considered for the implementation of these functions:
+	- never call the statechart API functions from within these functions.
+	- make sure that the execution time is as short as possible.
+ 
+*/
+
+
+
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* BITEXPRESSIONSREQUIRED_H_ */

+ 27 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/BitExpressions/sc_types.h

@@ -0,0 +1,27 @@
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+ 				
+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 char*         sc_string;
+
+typedef void*         sc_eventid;
+
+#ifdef __cplusplus
+}
+#endif 
+#define sc_boolean bool
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 804 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/DeepHistory/DeepHistory.c

@@ -0,0 +1,804 @@
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "DeepHistory.h"
+#include "DeepHistoryRequired.h"
+
+/*! \file Implementation of the state machine 'DeepHistory'
+*/
+
+// prototypes of all internal functions
+
+static void deepHistory_entryaction(DeepHistory* handle);
+static void deepHistory_exitaction(DeepHistory* handle);
+static void deepHistory_deepentersequence_mainRegion_State2_region0(DeepHistory* handle);
+static void deepHistory_deepentersequence_mainRegion_State2_region0_State4_region0(DeepHistory* handle);
+static void deepHistory_deepentersequence_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 clearInEvents(DeepHistory* handle);
+static void clearOutEvents(DeepHistory* handle);
+
+
+void deepHistory_init(DeepHistory* handle)
+{
+	int 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;
+
+	// TODO: initialize all events ...
+	// TODO: initialize all variables ... (set default values - here or inenter sequence ?!?)
+
+}
+
+void deepHistory_enter(DeepHistory* handle)
+{
+	/* Default enter sequence for statechart DeepHistory */
+	deepHistory_entryaction(handle);
+	/* Default enter sequence for region mainRegion */
+	/* Default react sequence for initial entry  */
+	/* Default enter sequence for state State1 */
+	handle->stateConfVector[0] = DeepHistory_mainRegion_State1;
+	handle->stateConfVectorPosition = 0;
+}
+
+void deepHistory_exit(DeepHistory* handle)
+{
+	/* Default exit sequence for statechart DeepHistory */
+	/* Default exit sequence for region mainRegion */
+	/* Handle exit of all possible states (of mainRegion) at position 0... */
+	switch(handle->stateConfVector[ 0 ]) {
+		case DeepHistory_mainRegion_State1 : {
+			/* Default exit sequence for state State1 */
+			handle->stateConfVector[0] = DeepHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_a : {
+			handle->historyVector[0] = handle->stateConfVector[0];
+			/* Default exit sequence for state a */
+			handle->stateConfVector[0] = DeepHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : {
+			handle->historyVector[1] = handle->stateConfVector[0];
+			handle->historyVector[0] = handle->stateConfVector[0];
+			/* Default exit sequence for state State6 */
+			handle->stateConfVector[0] = DeepHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+			handle->historyVector[2] = handle->stateConfVector[0];
+			handle->historyVector[1] = handle->stateConfVector[0];
+			handle->historyVector[0] = handle->stateConfVector[0];
+			/* Default exit sequence for state State8 */
+			handle->stateConfVector[0] = DeepHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+			handle->historyVector[2] = handle->stateConfVector[0];
+			handle->historyVector[1] = handle->stateConfVector[0];
+			handle->historyVector[0] = handle->stateConfVector[0];
+			/* Default exit sequence for state State9 */
+			handle->stateConfVector[0] = DeepHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State5 : {
+			handle->historyVector[0] = handle->stateConfVector[0];
+			/* Default exit sequence for state State5 */
+			handle->stateConfVector[0] = DeepHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		default: break;
+	}
+	deepHistory_exitaction(handle);
+}
+
+static void 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 clearOutEvents(DeepHistory* handle) {
+}
+
+void deepHistory_runCycle(DeepHistory* handle) {
+	
+	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;
+		}
+	}
+	
+	clearInEvents(handle);
+}
+
+
+sc_boolean deepHistory_isActive(DeepHistory* handle, DeepHistoryStates state) {
+	switch (state) {
+		case DeepHistory_mainRegion_State1 : 
+			return (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State1
+			);
+		case DeepHistory_mainRegion_State2 : 
+			return (sc_boolean) (handle->stateConfVector[0] >= DeepHistory_mainRegion_State2
+				&& handle->stateConfVector[0] <= DeepHistory_mainRegion_State2__region0_State5);
+		case DeepHistory_mainRegion_State2__region0_a : 
+			return (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State2__region0_a
+			);
+		case DeepHistory_mainRegion_State2__region0_State4 : 
+			return (sc_boolean) (handle->stateConfVector[0] >= DeepHistory_mainRegion_State2__region0_State4
+				&& handle->stateConfVector[0] <= DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9);
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : 
+			return (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State2__region0_State4__region0_State6
+			);
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7 : 
+			return (sc_boolean) (handle->stateConfVector[0] >= DeepHistory_mainRegion_State2__region0_State4__region0_State7
+				&& handle->stateConfVector[0] <= DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9);
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : 
+			return (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8
+			);
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : 
+			return (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9
+			);
+		case DeepHistory_mainRegion_State2__region0_State5 : 
+			return (sc_boolean) (handle->stateConfVector[0] == DeepHistory_mainRegion_State2__region0_State5
+			);
+		default: return bool_false;
+	}
+}
+
+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
+
+/* Entry action for statechart 'DeepHistory'. */
+static void deepHistory_entryaction(DeepHistory* handle) {
+	/* Entry action for statechart 'DeepHistory'. */
+}
+
+/* Exit action for state 'DeepHistory'. */
+static void deepHistory_exitaction(DeepHistory* handle) {
+	/* Exit action for state 'DeepHistory'. */
+}
+
+/* deep enterSequence with history in child null */
+static void deepHistory_deepentersequence_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 */
+			/* Default enter sequence for state a */
+			handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_a;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : {
+			/* enterSequence with history in child State4 for leaf State6 */
+			deepHistory_deepentersequence_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_deepentersequence_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_deepentersequence_mainRegion_State2_region0_State4_region0(handle);
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State5 : {
+			/* enterSequence with history in child State5 for leaf State5 */
+			/* Default enter sequence for state State5 */
+			handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State5;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		default: break;
+	}
+}
+
+/* deep enterSequence with history in child null */
+static void deepHistory_deepentersequence_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 */
+			/* Default enter sequence for state State6 */
+			handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State6;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+			/* enterSequence with history in child State7 for leaf State8 */
+			deepHistory_deepentersequence_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_deepentersequence_mainRegion_State2_region0_State4_region0_State7_region0(handle);
+			break;
+		}
+		default: break;
+	}
+}
+
+/* deep enterSequence with history in child null */
+static void deepHistory_deepentersequence_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 */
+			/* Default enter sequence for state State8 */
+			handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+			/* enterSequence with history in child State9 for leaf State9 */
+			/* Default enter sequence for state State9 */
+			handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state State1. */
+static void deepHistory_react_mainRegion_State1(DeepHistory* handle) {
+	/* The reactions of state State1. */
+	if (handle->iface.event1_raised) { 
+		/* Default exit sequence for state State1 */
+		handle->stateConfVector[0] = DeepHistory_last_state;
+		handle->stateConfVectorPosition = 0;
+		/* Default enter sequence for state State2 */
+		/* Default enter sequence for region null */
+		/* Default react sequence for deep history entry  */
+		/* Enter the region with deep history */
+		if (handle->historyVector[0] != DeepHistory_last_state) {
+			deepHistory_deepentersequence_mainRegion_State2_region0(handle);
+		} else {
+			/* Default enter sequence for state a */
+			handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_a;
+			handle->stateConfVectorPosition = 0;
+		}
+	} 
+}
+
+/* The reactions of state a. */
+static void deepHistory_react_mainRegion_State2_region0_a(DeepHistory* handle) {
+	/* The reactions of state a. */
+	if (handle->iface.event2_raised) { 
+		/* Default exit sequence for state State2 */
+		/* Default exit sequence for region null */
+		handle->historyVector[0] = handle->stateConfVector[0];
+		/* Handle exit of all possible states (of region0) at position 0... */
+		switch(handle->stateConfVector[ 0 ]) {
+			case DeepHistory_mainRegion_State2__region0_a : {
+				/* Default exit sequence for state a */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+				handle->historyVector[2] = handle->stateConfVector[0];
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State8 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+				handle->historyVector[2] = handle->stateConfVector[0];
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State9 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State5 : {
+				/* Default exit sequence for state State5 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			default: break;
+		}
+		/* Default enter sequence for state State1 */
+		handle->stateConfVector[0] = DeepHistory_mainRegion_State1;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		if (bool_true) { 
+			/* Default exit sequence for state a */
+			handle->stateConfVector[0] = DeepHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			/* Default enter sequence for state State4 */
+			/* Default enter sequence for region null */
+			/* Default react sequence for initial entry  */
+			/* Default enter sequence for state State6 */
+			handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State6;
+			handle->stateConfVectorPosition = 0;
+		} 
+	}
+}
+
+/* The reactions of state State6. */
+static void deepHistory_react_mainRegion_State2_region0_State4_region0_State6(DeepHistory* handle) {
+	/* The reactions of state State6. */
+	if (handle->iface.event2_raised) { 
+		/* Default exit sequence for state State2 */
+		/* Default exit sequence for region null */
+		handle->historyVector[0] = handle->stateConfVector[0];
+		/* Handle exit of all possible states (of region0) at position 0... */
+		switch(handle->stateConfVector[ 0 ]) {
+			case DeepHistory_mainRegion_State2__region0_a : {
+				/* Default exit sequence for state a */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+				handle->historyVector[2] = handle->stateConfVector[0];
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State8 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+				handle->historyVector[2] = handle->stateConfVector[0];
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State9 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State5 : {
+				/* Default exit sequence for state State5 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			default: break;
+		}
+		/* Default enter sequence for state State1 */
+		handle->stateConfVector[0] = DeepHistory_mainRegion_State1;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		if (handle->iface.event4_raised) { 
+			/* Default exit sequence for state State4 */
+			/* Default exit sequence for region null */
+			handle->historyVector[1] = handle->stateConfVector[0];
+			/* Handle exit of all possible states (of region0) at position 0... */
+			switch(handle->stateConfVector[ 0 ]) {
+				case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : {
+					/* Default exit sequence for state State6 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+					handle->historyVector[2] = handle->stateConfVector[0];
+					/* Default exit sequence for state State8 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+					handle->historyVector[2] = handle->stateConfVector[0];
+					/* Default exit sequence for state State9 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				default: break;
+			}
+			/* Default enter sequence for state State5 */
+			handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State5;
+			handle->stateConfVectorPosition = 0;
+		}  else {
+			if (handle->iface.event5_raised) { 
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				/* Default enter sequence for state State7 */
+				/* Default enter sequence for region null */
+				/* Default react sequence for initial entry  */
+				/* Default enter sequence for state State8 */
+				handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8;
+				handle->stateConfVectorPosition = 0;
+			} 
+		}
+	}
+}
+
+/* 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 (handle->iface.event2_raised) { 
+		/* Default exit sequence for state State2 */
+		/* Default exit sequence for region null */
+		handle->historyVector[0] = handle->stateConfVector[0];
+		/* Handle exit of all possible states (of region0) at position 0... */
+		switch(handle->stateConfVector[ 0 ]) {
+			case DeepHistory_mainRegion_State2__region0_a : {
+				/* Default exit sequence for state a */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+				handle->historyVector[2] = handle->stateConfVector[0];
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State8 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+				handle->historyVector[2] = handle->stateConfVector[0];
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State9 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State5 : {
+				/* Default exit sequence for state State5 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			default: break;
+		}
+		/* Default enter sequence for state State1 */
+		handle->stateConfVector[0] = DeepHistory_mainRegion_State1;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		if (handle->iface.event4_raised) { 
+			/* Default exit sequence for state State4 */
+			/* Default exit sequence for region null */
+			handle->historyVector[1] = handle->stateConfVector[0];
+			/* Handle exit of all possible states (of region0) at position 0... */
+			switch(handle->stateConfVector[ 0 ]) {
+				case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : {
+					/* Default exit sequence for state State6 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+					handle->historyVector[2] = handle->stateConfVector[0];
+					/* Default exit sequence for state State8 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+					handle->historyVector[2] = handle->stateConfVector[0];
+					/* Default exit sequence for state State9 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				default: break;
+			}
+			/* Default enter sequence for state State5 */
+			handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State5;
+			handle->stateConfVectorPosition = 0;
+		}  else {
+			if (handle->iface.event6_raised) { 
+				/* Default exit sequence for state State7 */
+				/* Default exit sequence for region null */
+				handle->historyVector[2] = handle->stateConfVector[0];
+				/* Handle exit of all possible states (of region0) at position 0... */
+				switch(handle->stateConfVector[ 0 ]) {
+					case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+						/* Default exit sequence for state State8 */
+						handle->stateConfVector[0] = DeepHistory_last_state;
+						handle->stateConfVectorPosition = 0;
+						break;
+					}
+					case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+						/* Default exit sequence for state State9 */
+						handle->stateConfVector[0] = DeepHistory_last_state;
+						handle->stateConfVectorPosition = 0;
+						break;
+					}
+					default: break;
+				}
+				/* Default enter sequence for state State6 */
+				handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State6;
+				handle->stateConfVectorPosition = 0;
+			}  else {
+				if (handle->iface.event7_raised) { 
+					/* Default exit sequence for state State8 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					/* Default enter sequence for state State9 */
+					handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9;
+					handle->stateConfVectorPosition = 0;
+				} 
+			}
+		}
+	}
+}
+
+/* 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 (handle->iface.event2_raised) { 
+		/* Default exit sequence for state State2 */
+		/* Default exit sequence for region null */
+		handle->historyVector[0] = handle->stateConfVector[0];
+		/* Handle exit of all possible states (of region0) at position 0... */
+		switch(handle->stateConfVector[ 0 ]) {
+			case DeepHistory_mainRegion_State2__region0_a : {
+				/* Default exit sequence for state a */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+				handle->historyVector[2] = handle->stateConfVector[0];
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State8 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+				handle->historyVector[2] = handle->stateConfVector[0];
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State9 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State5 : {
+				/* Default exit sequence for state State5 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			default: break;
+		}
+		/* Default enter sequence for state State1 */
+		handle->stateConfVector[0] = DeepHistory_mainRegion_State1;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		if (handle->iface.event4_raised) { 
+			/* Default exit sequence for state State4 */
+			/* Default exit sequence for region null */
+			handle->historyVector[1] = handle->stateConfVector[0];
+			/* Handle exit of all possible states (of region0) at position 0... */
+			switch(handle->stateConfVector[ 0 ]) {
+				case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : {
+					/* Default exit sequence for state State6 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+					handle->historyVector[2] = handle->stateConfVector[0];
+					/* Default exit sequence for state State8 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+					handle->historyVector[2] = handle->stateConfVector[0];
+					/* Default exit sequence for state State9 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				default: break;
+			}
+			/* Default enter sequence for state State5 */
+			handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State5;
+			handle->stateConfVectorPosition = 0;
+		}  else {
+			if (handle->iface.event6_raised) { 
+				/* Default exit sequence for state State7 */
+				/* Default exit sequence for region null */
+				handle->historyVector[2] = handle->stateConfVector[0];
+				/* Handle exit of all possible states (of region0) at position 0... */
+				switch(handle->stateConfVector[ 0 ]) {
+					case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+						/* Default exit sequence for state State8 */
+						handle->stateConfVector[0] = DeepHistory_last_state;
+						handle->stateConfVectorPosition = 0;
+						break;
+					}
+					case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+						/* Default exit sequence for state State9 */
+						handle->stateConfVector[0] = DeepHistory_last_state;
+						handle->stateConfVectorPosition = 0;
+						break;
+					}
+					default: break;
+				}
+				/* Default enter sequence for state State6 */
+				handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State6;
+				handle->stateConfVectorPosition = 0;
+			}  else {
+				if (handle->iface.event8_raised) { 
+					/* Default exit sequence for state State9 */
+					handle->stateConfVector[0] = DeepHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					/* Default enter sequence for state State8 */
+					handle->stateConfVector[0] = DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8;
+					handle->stateConfVectorPosition = 0;
+				} 
+			}
+		}
+	}
+}
+
+/* The reactions of state State5. */
+static void deepHistory_react_mainRegion_State2_region0_State5(DeepHistory* handle) {
+	/* The reactions of state State5. */
+	if (handle->iface.event2_raised) { 
+		/* Default exit sequence for state State2 */
+		/* Default exit sequence for region null */
+		handle->historyVector[0] = handle->stateConfVector[0];
+		/* Handle exit of all possible states (of region0) at position 0... */
+		switch(handle->stateConfVector[ 0 ]) {
+			case DeepHistory_mainRegion_State2__region0_a : {
+				/* Default exit sequence for state a */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State6 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+				handle->historyVector[2] = handle->stateConfVector[0];
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State8 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+				handle->historyVector[2] = handle->stateConfVector[0];
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State9 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case DeepHistory_mainRegion_State2__region0_State5 : {
+				/* Default exit sequence for state State5 */
+				handle->stateConfVector[0] = DeepHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			default: break;
+		}
+		/* Default enter sequence for state State1 */
+		handle->stateConfVector[0] = DeepHistory_mainRegion_State1;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+	}
+}
+
+

+ 105 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/DeepHistory/DeepHistory.h

@@ -0,0 +1,105 @@
+#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;
+
+
+//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
+#define DEEPHISTORY_MAX_ORTHOGONAL_STATES 1
+//! 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 if the specified state is active. */
+extern sc_boolean deepHistory_isActive(DeepHistory* handle, DeepHistoryStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* DEEPHISTORY_H_ */

+ 30 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/DeepHistory/DeepHistoryRequired.h

@@ -0,0 +1,30 @@
+#ifndef DEEPHISTORYREQUIRED_H_
+#define DEEPHISTORYREQUIRED_H_
+
+#include "sc_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+
+
+/*! \file This header defines prototypes for all functions that are required by the state machine implementation.
+
+
+		
+These functions will be called during a 'run to completion step' (runCycle) of the statechart. 
+There are some constraints that have to be considered for the implementation of these functions:
+	- never call the statechart API functions from within these functions.
+	- make sure that the execution time is as short as possible.
+ 
+*/
+
+
+
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* DEEPHISTORYREQUIRED_H_ */

+ 27 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/DeepHistory/sc_types.h

@@ -0,0 +1,27 @@
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+ 				
+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 char*         sc_string;
+
+typedef void*         sc_eventid;
+
+#ifdef __cplusplus
+}
+#endif 
+#define sc_boolean bool
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 765 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/ShallowHistory/ShallowHistory.c

@@ -0,0 +1,765 @@
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "ShallowHistory.h"
+#include "ShallowHistoryRequired.h"
+
+/*! \file Implementation of the state machine 'ShallowHistory'
+*/
+
+// prototypes of all internal functions
+
+static void shallowHistory_entryaction(ShallowHistory* handle);
+static void shallowHistory_exitaction(ShallowHistory* handle);
+static void shallowHistory_shallowentersequence_mainRegion_State2_region0(ShallowHistory* handle);
+static void shallowHistory_shallowentersequence_mainRegion_State2_region0_State4_region0_State7_region0(ShallowHistory* handle);
+static void shallowHistory_react_mainRegion_State1(ShallowHistory* handle);
+static void shallowHistory_react_mainRegion_State2_region0_State3(ShallowHistory* handle);
+static void shallowHistory_react_mainRegion_State2_region0_State4_region0_State6(ShallowHistory* handle);
+static void shallowHistory_react_mainRegion_State2_region0_State4_region0_State7_region0_State8(ShallowHistory* handle);
+static void shallowHistory_react_mainRegion_State2_region0_State4_region0_State7_region0_State9(ShallowHistory* handle);
+static void shallowHistory_react_mainRegion_State2_region0_State5(ShallowHistory* handle);
+static void clearInEvents(ShallowHistory* handle);
+static void clearOutEvents(ShallowHistory* handle);
+
+
+void shallowHistory_init(ShallowHistory* handle)
+{
+	int i;
+
+	for (i = 0; i < SHALLOWHISTORY_MAX_ORTHOGONAL_STATES; ++i)
+		handle->stateConfVector[i] = ShallowHistory_last_state;
+	
+	for (i = 0; i < SHALLOWHISTORY_MAX_HISTORY_STATES; ++i)
+		handle->historyVector[i] = ShallowHistory_last_state;
+	
+	handle->stateConfVectorPosition = 0;
+
+	// TODO: initialize all events ...
+	// TODO: initialize all variables ... (set default values - here or inenter sequence ?!?)
+
+}
+
+void shallowHistory_enter(ShallowHistory* handle)
+{
+	/* Default enter sequence for statechart ShallowHistory */
+	shallowHistory_entryaction(handle);
+	/* Default enter sequence for region mainRegion */
+	/* Default react sequence for initial entry  */
+	/* Default enter sequence for state State1 */
+	handle->stateConfVector[0] = ShallowHistory_mainRegion_State1;
+	handle->stateConfVectorPosition = 0;
+}
+
+void shallowHistory_exit(ShallowHistory* handle)
+{
+	/* Default exit sequence for statechart ShallowHistory */
+	/* Default exit sequence for region mainRegion */
+	/* Handle exit of all possible states (of mainRegion) at position 0... */
+	switch(handle->stateConfVector[ 0 ]) {
+		case ShallowHistory_mainRegion_State1 : {
+			/* Default exit sequence for state State1 */
+			handle->stateConfVector[0] = ShallowHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State3 : {
+			handle->historyVector[0] = handle->stateConfVector[0];
+			/* Default exit sequence for state State3 */
+			handle->stateConfVector[0] = ShallowHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+			handle->historyVector[0] = handle->stateConfVector[0];
+			/* Default exit sequence for state State6 */
+			handle->stateConfVector[0] = ShallowHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+			handle->historyVector[1] = handle->stateConfVector[0];
+			handle->historyVector[0] = handle->stateConfVector[0];
+			/* Default exit sequence for state State8 */
+			handle->stateConfVector[0] = ShallowHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+			handle->historyVector[1] = handle->stateConfVector[0];
+			handle->historyVector[0] = handle->stateConfVector[0];
+			/* Default exit sequence for state State9 */
+			handle->stateConfVector[0] = ShallowHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State5 : {
+			handle->historyVector[0] = handle->stateConfVector[0];
+			/* Default exit sequence for state State5 */
+			handle->stateConfVector[0] = ShallowHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		default: break;
+	}
+	shallowHistory_exitaction(handle);
+}
+
+static void clearInEvents(ShallowHistory* 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;
+}
+
+static void clearOutEvents(ShallowHistory* handle) {
+}
+
+void shallowHistory_runCycle(ShallowHistory* handle) {
+	
+	clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < SHALLOWHISTORY_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++) {
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition]) {
+		case ShallowHistory_mainRegion_State1 : {
+			shallowHistory_react_mainRegion_State1(handle);
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State3 : {
+			shallowHistory_react_mainRegion_State2_region0_State3(handle);
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+			shallowHistory_react_mainRegion_State2_region0_State4_region0_State6(handle);
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+			shallowHistory_react_mainRegion_State2_region0_State4_region0_State7_region0_State8(handle);
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+			shallowHistory_react_mainRegion_State2_region0_State4_region0_State7_region0_State9(handle);
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State5 : {
+			shallowHistory_react_mainRegion_State2_region0_State5(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	clearInEvents(handle);
+}
+
+
+sc_boolean shallowHistory_isActive(ShallowHistory* handle, ShallowHistoryStates state) {
+	switch (state) {
+		case ShallowHistory_mainRegion_State1 : 
+			return (sc_boolean) (handle->stateConfVector[0] == ShallowHistory_mainRegion_State1
+			);
+		case ShallowHistory_mainRegion_State2 : 
+			return (sc_boolean) (handle->stateConfVector[0] >= ShallowHistory_mainRegion_State2
+				&& handle->stateConfVector[0] <= ShallowHistory_mainRegion_State2__region0_State5);
+		case ShallowHistory_mainRegion_State2__region0_State3 : 
+			return (sc_boolean) (handle->stateConfVector[0] == ShallowHistory_mainRegion_State2__region0_State3
+			);
+		case ShallowHistory_mainRegion_State2__region0_State4 : 
+			return (sc_boolean) (handle->stateConfVector[0] >= ShallowHistory_mainRegion_State2__region0_State4
+				&& handle->stateConfVector[0] <= ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9);
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : 
+			return (sc_boolean) (handle->stateConfVector[0] == ShallowHistory_mainRegion_State2__region0_State4__region0_State6
+			);
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7 : 
+			return (sc_boolean) (handle->stateConfVector[0] >= ShallowHistory_mainRegion_State2__region0_State4__region0_State7
+				&& handle->stateConfVector[0] <= ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9);
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : 
+			return (sc_boolean) (handle->stateConfVector[0] == ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8
+			);
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : 
+			return (sc_boolean) (handle->stateConfVector[0] == ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9
+			);
+		case ShallowHistory_mainRegion_State2__region0_State5 : 
+			return (sc_boolean) (handle->stateConfVector[0] == ShallowHistory_mainRegion_State2__region0_State5
+			);
+		default: return bool_false;
+	}
+}
+
+void shallowHistoryIface_raise_event1(ShallowHistory* handle) {
+	handle->iface.event1_raised = bool_true;
+}
+void shallowHistoryIface_raise_event2(ShallowHistory* handle) {
+	handle->iface.event2_raised = bool_true;
+}
+void shallowHistoryIface_raise_event3(ShallowHistory* handle) {
+	handle->iface.event3_raised = bool_true;
+}
+void shallowHistoryIface_raise_event4(ShallowHistory* handle) {
+	handle->iface.event4_raised = bool_true;
+}
+void shallowHistoryIface_raise_event5(ShallowHistory* handle) {
+	handle->iface.event5_raised = bool_true;
+}
+void shallowHistoryIface_raise_event6(ShallowHistory* handle) {
+	handle->iface.event6_raised = bool_true;
+}
+void shallowHistoryIface_raise_event7(ShallowHistory* handle) {
+	handle->iface.event7_raised = bool_true;
+}
+void shallowHistoryIface_raise_event8(ShallowHistory* handle) {
+	handle->iface.event8_raised = bool_true;
+}
+
+
+		
+// implementations of all internal functions
+
+/* Entry action for statechart 'ShallowHistory'. */
+static void shallowHistory_entryaction(ShallowHistory* handle) {
+	/* Entry action for statechart 'ShallowHistory'. */
+}
+
+/* Exit action for state 'ShallowHistory'. */
+static void shallowHistory_exitaction(ShallowHistory* handle) {
+	/* Exit action for state 'ShallowHistory'. */
+}
+
+/* shallow enterSequence with history in child null */
+static void shallowHistory_shallowentersequence_mainRegion_State2_region0(ShallowHistory* handle) {
+	/* shallow enterSequence with history in child null */
+	/* Handle shallow history entry of null */
+	switch(handle->historyVector[ 0 ]) {
+		case ShallowHistory_mainRegion_State2__region0_State3 : {
+			/* Default enter sequence for state State3 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State3;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+			/* Default enter sequence for state State4 */
+			/* Default enter sequence for region null */
+			/* Default react sequence for initial entry  */
+			/* Default enter sequence for state State6 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State6;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+			/* Default enter sequence for state State4 */
+			/* Default enter sequence for region null */
+			/* Default react sequence for initial entry  */
+			/* Default enter sequence for state State6 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State6;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+			/* Default enter sequence for state State4 */
+			/* Default enter sequence for region null */
+			/* Default react sequence for initial entry  */
+			/* Default enter sequence for state State6 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State6;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State5 : {
+			/* Default enter sequence for state State5 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State5;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		default: break;
+	}
+}
+
+/* shallow enterSequence with history in child null */
+static void shallowHistory_shallowentersequence_mainRegion_State2_region0_State4_region0_State7_region0(ShallowHistory* handle) {
+	/* shallow enterSequence with history in child null */
+	/* Handle shallow history entry of null */
+	switch(handle->historyVector[ 1 ]) {
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+			/* Default enter sequence for state State8 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+			/* Default enter sequence for state State9 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9;
+			handle->stateConfVectorPosition = 0;
+			break;
+		}
+		default: break;
+	}
+}
+
+/* The reactions of state State1. */
+static void shallowHistory_react_mainRegion_State1(ShallowHistory* handle) {
+	/* The reactions of state State1. */
+	if (handle->iface.event1_raised) { 
+		/* Default exit sequence for state State1 */
+		handle->stateConfVector[0] = ShallowHistory_last_state;
+		handle->stateConfVectorPosition = 0;
+		/* Default enter sequence for state State2 */
+		/* Default enter sequence for region null */
+		/* Default react sequence for shallow history entry  */
+		/* Enter the region with shallow history */
+		if (handle->historyVector[0] != ShallowHistory_last_state) {
+			shallowHistory_shallowentersequence_mainRegion_State2_region0(handle);
+		} else {
+			/* Default enter sequence for state State3 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State3;
+			handle->stateConfVectorPosition = 0;
+		}
+	} 
+}
+
+/* The reactions of state State3. */
+static void shallowHistory_react_mainRegion_State2_region0_State3(ShallowHistory* handle) {
+	/* The reactions of state State3. */
+	if (handle->iface.event2_raised) { 
+		/* Default exit sequence for state State2 */
+		/* Default exit sequence for region null */
+		handle->historyVector[0] = handle->stateConfVector[0];
+		/* Handle exit of all possible states (of region0) at position 0... */
+		switch(handle->stateConfVector[ 0 ]) {
+			case ShallowHistory_mainRegion_State2__region0_State3 : {
+				/* Default exit sequence for state State3 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State8 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State9 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State5 : {
+				/* Default exit sequence for state State5 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			default: break;
+		}
+		/* Default enter sequence for state State1 */
+		handle->stateConfVector[0] = ShallowHistory_mainRegion_State1;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		if (handle->iface.event3_raised) { 
+			/* Default exit sequence for state State3 */
+			handle->stateConfVector[0] = ShallowHistory_last_state;
+			handle->stateConfVectorPosition = 0;
+			/* Default enter sequence for state State4 */
+			/* Default enter sequence for region null */
+			/* Default react sequence for initial entry  */
+			/* Default enter sequence for state State6 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State6;
+			handle->stateConfVectorPosition = 0;
+		} 
+	}
+}
+
+/* The reactions of state State6. */
+static void shallowHistory_react_mainRegion_State2_region0_State4_region0_State6(ShallowHistory* handle) {
+	/* The reactions of state State6. */
+	if (handle->iface.event2_raised) { 
+		/* Default exit sequence for state State2 */
+		/* Default exit sequence for region null */
+		handle->historyVector[0] = handle->stateConfVector[0];
+		/* Handle exit of all possible states (of region0) at position 0... */
+		switch(handle->stateConfVector[ 0 ]) {
+			case ShallowHistory_mainRegion_State2__region0_State3 : {
+				/* Default exit sequence for state State3 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State8 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State9 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State5 : {
+				/* Default exit sequence for state State5 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			default: break;
+		}
+		/* Default enter sequence for state State1 */
+		handle->stateConfVector[0] = ShallowHistory_mainRegion_State1;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		if (handle->iface.event4_raised) { 
+			/* Default exit sequence for state State4 */
+			/* Default exit sequence for region null */
+			/* Handle exit of all possible states (of region0) at position 0... */
+			switch(handle->stateConfVector[ 0 ]) {
+				case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+					/* Default exit sequence for state State6 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+					handle->historyVector[1] = handle->stateConfVector[0];
+					/* Default exit sequence for state State8 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+					handle->historyVector[1] = handle->stateConfVector[0];
+					/* Default exit sequence for state State9 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				default: break;
+			}
+			/* Default enter sequence for state State5 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State5;
+			handle->stateConfVectorPosition = 0;
+		}  else {
+			if (handle->iface.event5_raised) { 
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				/* Default enter sequence for state State7 */
+				/* Default enter sequence for region null */
+				/* Default react sequence for shallow history entry  */
+				/* Enter the region with shallow history */
+				if (handle->historyVector[1] != ShallowHistory_last_state) {
+					shallowHistory_shallowentersequence_mainRegion_State2_region0_State4_region0_State7_region0(handle);
+				} else {
+					/* Default enter sequence for state State8 */
+					handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8;
+					handle->stateConfVectorPosition = 0;
+				}
+			} 
+		}
+	}
+}
+
+/* The reactions of state State8. */
+static void shallowHistory_react_mainRegion_State2_region0_State4_region0_State7_region0_State8(ShallowHistory* handle) {
+	/* The reactions of state State8. */
+	if (handle->iface.event2_raised) { 
+		/* Default exit sequence for state State2 */
+		/* Default exit sequence for region null */
+		handle->historyVector[0] = handle->stateConfVector[0];
+		/* Handle exit of all possible states (of region0) at position 0... */
+		switch(handle->stateConfVector[ 0 ]) {
+			case ShallowHistory_mainRegion_State2__region0_State3 : {
+				/* Default exit sequence for state State3 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State8 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State9 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State5 : {
+				/* Default exit sequence for state State5 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			default: break;
+		}
+		/* Default enter sequence for state State1 */
+		handle->stateConfVector[0] = ShallowHistory_mainRegion_State1;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		if (handle->iface.event4_raised) { 
+			/* Default exit sequence for state State4 */
+			/* Default exit sequence for region null */
+			/* Handle exit of all possible states (of region0) at position 0... */
+			switch(handle->stateConfVector[ 0 ]) {
+				case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+					/* Default exit sequence for state State6 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+					handle->historyVector[1] = handle->stateConfVector[0];
+					/* Default exit sequence for state State8 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+					handle->historyVector[1] = handle->stateConfVector[0];
+					/* Default exit sequence for state State9 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				default: break;
+			}
+			/* Default enter sequence for state State5 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State5;
+			handle->stateConfVectorPosition = 0;
+		}  else {
+			if (handle->iface.event6_raised) { 
+				/* Default exit sequence for state State7 */
+				/* Default exit sequence for region null */
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Handle exit of all possible states (of region0) at position 0... */
+				switch(handle->stateConfVector[ 0 ]) {
+					case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+						/* Default exit sequence for state State8 */
+						handle->stateConfVector[0] = ShallowHistory_last_state;
+						handle->stateConfVectorPosition = 0;
+						break;
+					}
+					case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+						/* Default exit sequence for state State9 */
+						handle->stateConfVector[0] = ShallowHistory_last_state;
+						handle->stateConfVectorPosition = 0;
+						break;
+					}
+					default: break;
+				}
+				/* Default enter sequence for state State6 */
+				handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State6;
+				handle->stateConfVectorPosition = 0;
+			}  else {
+				if (handle->iface.event7_raised) { 
+					/* Default exit sequence for state State8 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					/* Default enter sequence for state State9 */
+					handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9;
+					handle->stateConfVectorPosition = 0;
+				} 
+			}
+		}
+	}
+}
+
+/* The reactions of state State9. */
+static void shallowHistory_react_mainRegion_State2_region0_State4_region0_State7_region0_State9(ShallowHistory* handle) {
+	/* The reactions of state State9. */
+	if (handle->iface.event2_raised) { 
+		/* Default exit sequence for state State2 */
+		/* Default exit sequence for region null */
+		handle->historyVector[0] = handle->stateConfVector[0];
+		/* Handle exit of all possible states (of region0) at position 0... */
+		switch(handle->stateConfVector[ 0 ]) {
+			case ShallowHistory_mainRegion_State2__region0_State3 : {
+				/* Default exit sequence for state State3 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State8 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State9 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State5 : {
+				/* Default exit sequence for state State5 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			default: break;
+		}
+		/* Default enter sequence for state State1 */
+		handle->stateConfVector[0] = ShallowHistory_mainRegion_State1;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		if (handle->iface.event4_raised) { 
+			/* Default exit sequence for state State4 */
+			/* Default exit sequence for region null */
+			/* Handle exit of all possible states (of region0) at position 0... */
+			switch(handle->stateConfVector[ 0 ]) {
+				case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+					/* Default exit sequence for state State6 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+					handle->historyVector[1] = handle->stateConfVector[0];
+					/* Default exit sequence for state State8 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+					handle->historyVector[1] = handle->stateConfVector[0];
+					/* Default exit sequence for state State9 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					break;
+				}
+				default: break;
+			}
+			/* Default enter sequence for state State5 */
+			handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State5;
+			handle->stateConfVectorPosition = 0;
+		}  else {
+			if (handle->iface.event6_raised) { 
+				/* Default exit sequence for state State7 */
+				/* Default exit sequence for region null */
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Handle exit of all possible states (of region0) at position 0... */
+				switch(handle->stateConfVector[ 0 ]) {
+					case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+						/* Default exit sequence for state State8 */
+						handle->stateConfVector[0] = ShallowHistory_last_state;
+						handle->stateConfVectorPosition = 0;
+						break;
+					}
+					case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+						/* Default exit sequence for state State9 */
+						handle->stateConfVector[0] = ShallowHistory_last_state;
+						handle->stateConfVectorPosition = 0;
+						break;
+					}
+					default: break;
+				}
+				/* Default enter sequence for state State6 */
+				handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State6;
+				handle->stateConfVectorPosition = 0;
+			}  else {
+				if (handle->iface.event8_raised) { 
+					/* Default exit sequence for state State9 */
+					handle->stateConfVector[0] = ShallowHistory_last_state;
+					handle->stateConfVectorPosition = 0;
+					/* Default enter sequence for state State8 */
+					handle->stateConfVector[0] = ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8;
+					handle->stateConfVectorPosition = 0;
+				} 
+			}
+		}
+	}
+}
+
+/* The reactions of state State5. */
+static void shallowHistory_react_mainRegion_State2_region0_State5(ShallowHistory* handle) {
+	/* The reactions of state State5. */
+	if (handle->iface.event2_raised) { 
+		/* Default exit sequence for state State2 */
+		/* Default exit sequence for region null */
+		handle->historyVector[0] = handle->stateConfVector[0];
+		/* Handle exit of all possible states (of region0) at position 0... */
+		switch(handle->stateConfVector[ 0 ]) {
+			case ShallowHistory_mainRegion_State2__region0_State3 : {
+				/* Default exit sequence for state State3 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State6 : {
+				/* Default exit sequence for state State6 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State8 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 : {
+				handle->historyVector[1] = handle->stateConfVector[0];
+				/* Default exit sequence for state State9 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			case ShallowHistory_mainRegion_State2__region0_State5 : {
+				/* Default exit sequence for state State5 */
+				handle->stateConfVector[0] = ShallowHistory_last_state;
+				handle->stateConfVectorPosition = 0;
+				break;
+			}
+			default: break;
+		}
+		/* Default enter sequence for state State1 */
+		handle->stateConfVector[0] = ShallowHistory_mainRegion_State1;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+	}
+}
+
+

+ 101 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/ShallowHistory/ShallowHistory.h

@@ -0,0 +1,101 @@
+#ifndef SHALLOWHISTORY_H_
+#define SHALLOWHISTORY_H_
+
+#include "sc_types.h"
+
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'ShallowHistory'.
+*/
+
+//! enumeration of all states 
+typedef enum {
+	ShallowHistory_mainRegion_State1 ,
+	ShallowHistory_mainRegion_State2 ,
+	ShallowHistory_mainRegion_State2__region0_State3 ,
+	ShallowHistory_mainRegion_State2__region0_State4 ,
+	ShallowHistory_mainRegion_State2__region0_State4__region0_State6 ,
+	ShallowHistory_mainRegion_State2__region0_State4__region0_State7 ,
+	ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8 ,
+	ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9 ,
+	ShallowHistory_mainRegion_State2__region0_State5 ,
+	ShallowHistory_last_state
+} ShallowHistoryStates;
+
+//! Type definition of the data structure for the ShallowHistoryIface 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;
+} ShallowHistoryIface;
+
+
+//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
+#define SHALLOWHISTORY_MAX_ORTHOGONAL_STATES 1
+//! dimension of the state configuration vector for history states
+#define SHALLOWHISTORY_MAX_HISTORY_STATES 2
+
+/*! Type definition of the data structure for the ShallowHistory state machine.
+This data structure has to be allocated by the client code. */
+typedef struct {
+	ShallowHistoryStates stateConfVector[SHALLOWHISTORY_MAX_ORTHOGONAL_STATES];
+	ShallowHistoryStates historyVector[SHALLOWHISTORY_MAX_HISTORY_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	ShallowHistoryIface iface;
+} ShallowHistory;
+
+/*! Initializes the ShallowHistory state machine data structures. Must be called before first usage.*/
+extern void shallowHistory_init(ShallowHistory* handle);
+
+/*! Activates the state machine */
+extern void shallowHistory_enter(ShallowHistory* handle);
+
+/*! Deactivates the state machine */
+extern void shallowHistory_exit(ShallowHistory* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void shallowHistory_runCycle(ShallowHistory* handle);
+
+
+/*! Raises the in event 'event1' that is defined in the default interface scope. */ 
+extern void shallowHistoryIface_raise_event1(ShallowHistory* handle);
+
+/*! Raises the in event 'event2' that is defined in the default interface scope. */ 
+extern void shallowHistoryIface_raise_event2(ShallowHistory* handle);
+
+/*! Raises the in event 'event3' that is defined in the default interface scope. */ 
+extern void shallowHistoryIface_raise_event3(ShallowHistory* handle);
+
+/*! Raises the in event 'event4' that is defined in the default interface scope. */ 
+extern void shallowHistoryIface_raise_event4(ShallowHistory* handle);
+
+/*! Raises the in event 'event5' that is defined in the default interface scope. */ 
+extern void shallowHistoryIface_raise_event5(ShallowHistory* handle);
+
+/*! Raises the in event 'event6' that is defined in the default interface scope. */ 
+extern void shallowHistoryIface_raise_event6(ShallowHistory* handle);
+
+/*! Raises the in event 'event7' that is defined in the default interface scope. */ 
+extern void shallowHistoryIface_raise_event7(ShallowHistory* handle);
+
+/*! Raises the in event 'event8' that is defined in the default interface scope. */ 
+extern void shallowHistoryIface_raise_event8(ShallowHistory* handle);
+
+
+
+/*! Checks if the specified state is active. */
+extern sc_boolean shallowHistory_isActive(ShallowHistory* handle, ShallowHistoryStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* SHALLOWHISTORY_H_ */

+ 30 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/ShallowHistory/ShallowHistoryRequired.h

@@ -0,0 +1,30 @@
+#ifndef SHALLOWHISTORYREQUIRED_H_
+#define SHALLOWHISTORYREQUIRED_H_
+
+#include "sc_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+
+
+/*! \file This header defines prototypes for all functions that are required by the state machine implementation.
+
+
+		
+These functions will be called during a 'run to completion step' (runCycle) of the statechart. 
+There are some constraints that have to be considered for the implementation of these functions:
+	- never call the statechart API functions from within these functions.
+	- make sure that the execution time is as short as possible.
+ 
+*/
+
+
+
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* SHALLOWHISTORYREQUIRED_H_ */

+ 27 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/ShallowHistory/sc_types.h

@@ -0,0 +1,27 @@
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+ 				
+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 char*         sc_string;
+
+typedef void*         sc_eventid;
+
+#ifdef __cplusplus
+}
+#endif 
+#define sc_boolean bool
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 186 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/TimeTrigger/TimeTrigger.c

@@ -0,0 +1,186 @@
+#include <stdlib.h>
+#include <string.h>
+#include "sc_types.h"
+#include "TimeTrigger.h"
+#include "TimeTriggerRequired.h"
+
+/*! \file Implementation of the state machine 'TimeTrigger'
+*/
+
+// prototypes of all internal functions
+
+static void timeTrigger_entryaction(TimeTrigger* handle);
+static void timeTrigger_exitaction(TimeTrigger* handle);
+static void timeTrigger_react_mainRegion_StateA(TimeTrigger* handle);
+static void timeTrigger_react_mainRegion_StateB(TimeTrigger* handle);
+static void clearInEvents(TimeTrigger* handle);
+static void clearOutEvents(TimeTrigger* handle);
+
+
+void timeTrigger_init(TimeTrigger* handle)
+{
+	int i;
+
+	for (i = 0; i < TIMETRIGGER_MAX_ORTHOGONAL_STATES; ++i)
+		handle->stateConfVector[i] = TimeTrigger_last_state;
+	
+	
+	handle->stateConfVectorPosition = 0;
+
+	// TODO: initialize all events ...
+	// TODO: initialize all variables ... (set default values - here or inenter sequence ?!?)
+
+}
+
+void timeTrigger_enter(TimeTrigger* handle)
+{
+	/* Default enter sequence for statechart TimeTrigger */
+	timeTrigger_entryaction(handle);
+	/* Default enter sequence for region mainRegion */
+	/* Default react sequence for initial entry  */
+	/* Default enter sequence for state StateA */
+	/* Entry action for state 'StateA'. */
+	timeTrigger_setTimer( (sc_eventid) &(handle->timeEvents.StateA_time_event_0_raised) , 100, bool_false);
+	handle->iface.value = 0;
+	handle->stateConfVector[0] = TimeTrigger_mainRegion_StateA;
+	handle->stateConfVectorPosition = 0;
+}
+
+void timeTrigger_exit(TimeTrigger* handle)
+{
+	/* Default exit sequence for statechart TimeTrigger */
+	/* Default exit sequence for region mainRegion */
+	/* Handle exit of all possible states (of mainRegion) at position 0... */
+	switch(handle->stateConfVector[ 0 ]) {
+		case TimeTrigger_mainRegion_StateA : {
+			/* Default exit sequence for state StateA */
+			handle->stateConfVector[0] = TimeTrigger_last_state;
+			handle->stateConfVectorPosition = 0;
+			/* Exit action for state 'StateA'. */
+			timeTrigger_unsetTimer( (sc_eventid) &(handle->timeEvents.StateA_time_event_0_raised) );		
+			break;
+		}
+		case TimeTrigger_mainRegion_StateB : {
+			/* Default exit sequence for state StateB */
+			handle->stateConfVector[0] = TimeTrigger_last_state;
+			handle->stateConfVectorPosition = 0;
+			/* Exit action for state 'StateB'. */
+			timeTrigger_unsetTimer( (sc_eventid) &(handle->timeEvents.StateB_time_event_0_raised) );		
+			break;
+		}
+		default: break;
+	}
+	timeTrigger_exitaction(handle);
+}
+
+static void clearInEvents(TimeTrigger* handle) {
+}
+
+static void clearOutEvents(TimeTrigger* handle) {
+}
+
+void timeTrigger_runCycle(TimeTrigger* handle) {
+	
+	clearOutEvents(handle);
+	
+	for (handle->stateConfVectorPosition = 0;
+		handle->stateConfVectorPosition < TIMETRIGGER_MAX_ORTHOGONAL_STATES;
+		handle->stateConfVectorPosition++) {
+			
+		switch (handle->stateConfVector[handle->stateConfVectorPosition]) {
+		case TimeTrigger_mainRegion_StateA : {
+			timeTrigger_react_mainRegion_StateA(handle);
+			break;
+		}
+		case TimeTrigger_mainRegion_StateB : {
+			timeTrigger_react_mainRegion_StateB(handle);
+			break;
+		}
+		default:
+			break;
+		}
+	}
+	
+	clearInEvents(handle);
+}
+
+void timeTrigger_raiseTimeEvent(TimeTrigger* handle, sc_eventid evid) {
+	if ( ((intptr_t)evid) >= ((intptr_t)&(handle->timeEvents))
+		&&  ((intptr_t)evid) < ((intptr_t)&(handle->timeEvents)) + sizeof(TimeTriggerTimeEvents)) {
+		*(sc_boolean*)evid = bool_true;
+	}		
+}
+
+sc_boolean timeTrigger_isActive(TimeTrigger* handle, TimeTriggerStates state) {
+	switch (state) {
+		case TimeTrigger_mainRegion_StateA : 
+			return (sc_boolean) (handle->stateConfVector[0] == TimeTrigger_mainRegion_StateA
+			);
+		case TimeTrigger_mainRegion_StateB : 
+			return (sc_boolean) (handle->stateConfVector[0] == TimeTrigger_mainRegion_StateB
+			);
+		default: return bool_false;
+	}
+}
+
+
+
+sc_integer timeTriggerIface_get_value(TimeTrigger* handle) {
+	return handle->iface.value;
+}
+void timeTriggerIface_set_value(TimeTrigger* handle, sc_integer value) {
+	handle->iface.value = value;
+}
+		
+// implementations of all internal functions
+
+/* Entry action for statechart 'TimeTrigger'. */
+static void timeTrigger_entryaction(TimeTrigger* handle) {
+	/* Entry action for statechart 'TimeTrigger'. */
+}
+
+/* Exit action for state 'TimeTrigger'. */
+static void timeTrigger_exitaction(TimeTrigger* handle) {
+	/* Exit action for state 'TimeTrigger'. */
+}
+
+/* The reactions of state StateA. */
+static void timeTrigger_react_mainRegion_StateA(TimeTrigger* handle) {
+	/* The reactions of state StateA. */
+	if (handle->timeEvents.StateA_time_event_0_raised) { 
+		/* Default exit sequence for state StateA */
+		handle->stateConfVector[0] = TimeTrigger_last_state;
+		handle->stateConfVectorPosition = 0;
+		/* Exit action for state 'StateA'. */
+		timeTrigger_unsetTimer( (sc_eventid) &(handle->timeEvents.StateA_time_event_0_raised) );		
+		/* Default enter sequence for state StateB */
+		/* Entry action for state 'StateB'. */
+		timeTrigger_setTimer( (sc_eventid) &(handle->timeEvents.StateB_time_event_0_raised) , 20, bool_true);
+		handle->stateConfVector[0] = TimeTrigger_mainRegion_StateB;
+		handle->stateConfVectorPosition = 0;
+	} 
+}
+
+/* The reactions of state StateB. */
+static void timeTrigger_react_mainRegion_StateB(TimeTrigger* handle) {
+	/* The reactions of state StateB. */
+	if (handle->iface.value == 10) { 
+		/* Default exit sequence for state StateB */
+		handle->stateConfVector[0] = TimeTrigger_last_state;
+		handle->stateConfVectorPosition = 0;
+		/* Exit action for state 'StateB'. */
+		timeTrigger_unsetTimer( (sc_eventid) &(handle->timeEvents.StateB_time_event_0_raised) );		
+		/* Default enter sequence for state StateA */
+		/* Entry action for state 'StateA'. */
+		timeTrigger_setTimer( (sc_eventid) &(handle->timeEvents.StateA_time_event_0_raised) , 100, bool_false);
+		handle->iface.value = 0;
+		handle->stateConfVector[0] = TimeTrigger_mainRegion_StateA;
+		handle->stateConfVectorPosition = 0;
+	}  else {
+		if (handle->timeEvents.StateB_time_event_0_raised) { 
+			handle->iface.value += 1;
+		} 
+	}
+}
+
+

+ 73 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/TimeTrigger/TimeTrigger.h

@@ -0,0 +1,73 @@
+#ifndef TIMETRIGGER_H_
+#define TIMETRIGGER_H_
+
+#include "sc_types.h"
+
+#ifdef __cplusplus
+extern "C" { 
+#endif 
+
+/*! \file Header of the state machine 'TimeTrigger'.
+*/
+
+//! enumeration of all states 
+typedef enum {
+	TimeTrigger_mainRegion_StateA ,
+	TimeTrigger_mainRegion_StateB ,
+	TimeTrigger_last_state
+} TimeTriggerStates;
+
+//! Type definition of the data structure for the TimeTriggerIface interface scope.
+typedef struct {
+	sc_integer  value;
+} TimeTriggerIface;
+
+//! Type definition of the data structure for the TimeTriggerTimeEvents interface scope.
+typedef struct {
+	sc_boolean StateA_time_event_0_raised;
+	sc_boolean StateB_time_event_0_raised;
+} TimeTriggerTimeEvents;
+
+
+//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
+#define TIMETRIGGER_MAX_ORTHOGONAL_STATES 1
+
+/*! Type definition of the data structure for the TimeTrigger state machine.
+This data structure has to be allocated by the client code. */
+typedef struct {
+	TimeTriggerStates stateConfVector[TIMETRIGGER_MAX_ORTHOGONAL_STATES];
+	sc_ushort stateConfVectorPosition; 
+	
+	TimeTriggerIface iface;
+	TimeTriggerTimeEvents timeEvents;
+} TimeTrigger;
+
+/*! Initializes the TimeTrigger state machine data structures. Must be called before first usage.*/
+extern void timeTrigger_init(TimeTrigger* handle);
+
+/*! Activates the state machine */
+extern void timeTrigger_enter(TimeTrigger* handle);
+
+/*! Deactivates the state machine */
+extern void timeTrigger_exit(TimeTrigger* handle);
+
+/*! Performs a 'run to completion' step. */
+extern void timeTrigger_runCycle(TimeTrigger* handle);
+
+/*! Raises a time event. */
+extern void timeTrigger_raiseTimeEvent(TimeTrigger* handle, sc_eventid evid);
+
+/*! Gets the value of the variable 'value' that is defined in the default interface scope. */ 
+extern sc_integer timeTriggerIface_get_value(TimeTrigger* handle);
+/*! Sets the value of the variable 'value' that is defined in the default interface scope. */ 
+extern void timeTriggerIface_set_value(TimeTrigger* handle, sc_integer value);
+
+
+/*! Checks if the specified state is active. */
+extern sc_boolean timeTrigger_isActive(TimeTrigger* handle, TimeTriggerStates state);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* TIMETRIGGER_H_ */

+ 54 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/TimeTrigger/TimeTriggerRequired.h

@@ -0,0 +1,54 @@
+#ifndef TIMETRIGGERREQUIRED_H_
+#define TIMETRIGGERREQUIRED_H_
+
+#include "sc_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+
+
+/*! \file This header defines prototypes for all functions that are required by the state machine implementation.
+
+This is a state machine uses time events which require access to a timing service. Thus the function prototypes:
+	- timeTrigger_setTimer and
+	- timeTrigger_unsetTimer
+are defined.
+
+		
+These functions will be called during a 'run to completion step' (runCycle) of the statechart. 
+There are some constraints that have to be considered for the implementation of these functions:
+	- never call the statechart API functions from within these functions.
+	- make sure that the execution time is as short as possible.
+ 
+*/
+
+
+
+
+//
+// This is a timed state machine that requires timer services
+// 
+
+//! This function has to set up timers for the time events that are required by the state machine.
+/*! 
+	This function will be called for each time event that is relevant for a state when a state will be entered.
+	\param evid An unique identifier of the event.
+	\time_ms The time in milli seconds
+	\periodic Indicates the the time event must be raised periodically until the timer is unset 
+*/
+extern void timeTrigger_setTimer(const sc_eventid evid, const sc_integer time_ms, const sc_boolean periodic);
+
+//! This function has to unset timers for the time events that are required by the state machine.
+/*! 
+	This function will be called for each time event taht is relevant for a state when a state will be left.
+	\param evid An unique identifier of the event.
+*/
+extern void timeTrigger_unsetTimer(const sc_eventid evid);
+
+#ifdef __cplusplus
+}
+#endif 
+
+#endif /* TIMETRIGGERREQUIRED_H_ */

+ 27 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src-gen/TimeTrigger/sc_types.h

@@ -0,0 +1,27 @@
+#ifndef SC_TYPES_H_
+#define SC_TYPES_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif 
+
+#include <stdint.h>
+#include <stdbool.h>
+ 				
+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 char*         sc_string;
+
+typedef void*         sc_eventid;
+
+#ifdef __cplusplus
+}
+#endif 
+#define sc_boolean bool
+#define bool_true true
+#define bool_false false
+
+#endif /* SC_TYPES_H_ */

+ 6 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src/AllStatemachineTests.cc

@@ -0,0 +1,6 @@
+#include "gtest/gtest.h"
+#include "AlwaysOncycle.cc"
+#include "BitExpressions.cc"
+#include "DeepHistory.cc"
+#include "ShallowHistory.cc"
+#include "TimeTrigger.cc"

+ 31 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src/AlwaysOncycle.cc

@@ -0,0 +1,31 @@
+#include "gtest/gtest.h"
+#include "../src-gen/AlwaysOncycle/AlwaysOncycle.h"
+#include "../src-gen/AlwaysOncycle/AlwaysOncycle.c"
+
+TEST(StatemachineTest, AlwaysOncycle) {
+	AlwaysOncycle handle;
+	alwaysOncycle_init(&handle);
+	alwaysOncycle_enter(&handle);
+	EXPECT_TRUE(
+			alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
+
+	for (int value = 0; value < 5; value++) {
+		alwaysOncycle_runCycle(&handle);
+		EXPECT_TRUE(
+				alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
+	}
+
+	alwaysOncycle_runCycle(&handle);
+	EXPECT_TRUE(
+			alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateB));
+
+	for (int value = 0; value < 5; value++) {
+		alwaysOncycle_runCycle(&handle);
+		EXPECT_TRUE(
+				alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateB));
+	}
+
+	alwaysOncycle_runCycle(&handle);
+	EXPECT_TRUE(
+				alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
+}

+ 25 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src/BitExpressions.cc

@@ -0,0 +1,25 @@
+#include "gtest/gtest.h"
+#include "../src-gen/BitExpressions/BitExpressions.h"
+#include "../src-gen/BitExpressions/BitExpressions.c"
+
+TEST(StatemachineTest, BitExpressions) {
+	BitExpressions handle;
+	bitExpressions_init(&handle);
+	bitExpressions_enter(&handle);
+	EXPECT_TRUE(
+			bitExpressions_isActive(&handle, BitExpressions_main_region_StateA));
+	EXPECT_TRUE(bitExpressionsIface_get_myBit1(&handle) == 5);
+	EXPECT_TRUE(bitExpressionsIface_get_myBit2(&handle) == 7);
+
+	bitExpressionsIface_raise_e1(&handle);
+	bitExpressions_runCycle(&handle);
+	EXPECT_TRUE(
+				bitExpressions_isActive(&handle, BitExpressions_main_region_StateB));
+	EXPECT_TRUE(bitExpressionsIface_get_leftBitshift(&handle) == 10);
+	EXPECT_TRUE(bitExpressionsIface_get_rightBitshift(&handle) == 2);
+	EXPECT_TRUE(bitExpressionsIface_get_complementBitshift(&handle) == -6);
+	EXPECT_TRUE(bitExpressionsIface_get_bitwiseAnd(&handle) == 5);
+	EXPECT_TRUE(bitExpressionsIface_get_bitwiseOr(&handle) == 7);
+	EXPECT_TRUE(bitExpressionsIface_get_bitwiseXor(&handle) == 2);
+
+}

+ 41 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src/DeepHistory.cc

@@ -0,0 +1,41 @@
+#include "gtest/gtest.h"
+#include "../src-gen/DeepHistory/DeepHistory.h"
+#include "../src-gen/DeepHistory/DeepHistory.c"
+
+TEST(StatemachineTest, DeepHistory) {
+	DeepHistory handle;
+	deepHistory_init(&handle);
+	deepHistory_enter(&handle);
+	EXPECT_TRUE(
+			deepHistory_isActive(&handle, DeepHistory_mainRegion_State1));
+
+	deepHistoryIface_raise_event1(&handle);
+	deepHistory_runCycle(&handle);
+
+	deepHistoryIface_raise_event3(&handle);
+	deepHistory_runCycle(&handle);
+
+	deepHistoryIface_raise_event5(&handle);
+	deepHistory_runCycle(&handle);
+
+	deepHistoryIface_raise_event7(&handle);
+	deepHistory_runCycle(&handle);
+	EXPECT_FALSE(
+			deepHistory_isActive(&handle, DeepHistory_mainRegion_State1));
+	EXPECT_TRUE(
+			deepHistory_isActive(&handle, DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+
+	deepHistoryIface_raise_event2(&handle);
+	deepHistory_runCycle(&handle);
+	EXPECT_FALSE(
+			deepHistory_isActive(&handle, DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	EXPECT_TRUE(
+			deepHistory_isActive(&handle, DeepHistory_mainRegion_State1));
+
+	deepHistoryIface_raise_event1(&handle);
+	deepHistory_runCycle(&handle);
+	EXPECT_FALSE(
+			deepHistory_isActive(&handle, DeepHistory_mainRegion_State1));
+	EXPECT_TRUE(
+			deepHistory_isActive(&handle, DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+}

+ 68 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src/ShallowHistory.cc

@@ -0,0 +1,68 @@
+#include "gtest/gtest.h"
+#include "../src-gen/ShallowHistory/ShallowHistory.h"
+#include "../src-gen/ShallowHistory/ShallowHistory.c"
+
+TEST(StatemachineTest, ShallowHistory) {
+	ShallowHistory handle;
+	shallowHistory_init(&handle);
+	shallowHistory_enter(&handle);
+	EXPECT_TRUE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State1));
+
+	shallowHistoryIface_raise_event1(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_TRUE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State3));
+
+	shallowHistoryIface_raise_event3(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_TRUE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
+
+	shallowHistoryIface_raise_event5(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_TRUE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8));
+
+	shallowHistoryIface_raise_event7(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_FALSE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State1));
+	EXPECT_TRUE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+
+	shallowHistoryIface_raise_event6(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_FALSE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	EXPECT_TRUE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
+
+	shallowHistoryIface_raise_event5(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_FALSE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8));
+	EXPECT_TRUE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+
+	shallowHistoryIface_raise_event2(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_FALSE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	EXPECT_TRUE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State1));
+
+	shallowHistoryIface_raise_event1(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_FALSE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State1));
+	EXPECT_TRUE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
+
+	shallowHistoryIface_raise_event5(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_FALSE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
+	EXPECT_TRUE(
+			shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+}

+ 67 - 0
test-plugins/org.yakindu.sct.generator.c.test.manual/src/TimeTrigger.cc

@@ -0,0 +1,67 @@
+#include "gtest/gtest.h"
+#include "../src-gen/TimeTrigger/TimeTrigger.h"
+#include "../src-gen/TimeTrigger/TimeTrigger.c"
+#include "../src-gen/TimeTrigger/TimeTriggerRequired.h"
+
+typedef struct {
+	sc_eventid unsetEvid;
+	sc_eventid setEvid;
+	sc_integer time_ms;sc_boolean periodic;
+} TimeEvent;
+
+TimeEvent timeEvent;
+
+TEST(StatemachineTest, TimeTrigger) {
+	TimeTrigger handle;
+	timeTrigger_init(&handle);
+
+	//Enter calls setTimer the first time event!
+	timeTrigger_enter(&handle);
+	EXPECT_TRUE(timeTrigger_isActive(&handle, TimeTrigger_mainRegion_StateA));
+	EXPECT_TRUE(timeTriggerIface_get_value(&handle) == 0);
+	EXPECT_TRUE(
+			timeEvent.setEvid == &(handle.timeEvents.StateA_time_event_0_raised));
+	EXPECT_TRUE(timeEvent.time_ms == 100);
+	EXPECT_FALSE(timeEvent.periodic);
+
+	timeTrigger_raiseTimeEvent(&handle, timeEvent.setEvid);
+	timeTrigger_runCycle(&handle);
+	EXPECT_TRUE( timeTrigger_isActive(&handle, TimeTrigger_mainRegion_StateB));
+	//Reset TimeEvent0 of state A
+	EXPECT_TRUE(
+			timeEvent.unsetEvid == &(handle.timeEvents.StateA_time_event_0_raised));
+	//Queue TimeEvent0 of state B
+	EXPECT_TRUE(
+			timeEvent.setEvid == &(handle.timeEvents.StateB_time_event_0_raised));
+	EXPECT_TRUE(timeEvent.time_ms == 20);
+	EXPECT_TRUE(timeEvent.periodic);
+
+	for (int i = 1; i <= 10; i++) {
+		timeTrigger_raiseTimeEvent(&handle, timeEvent.setEvid);
+		timeTrigger_runCycle(&handle);
+		EXPECT_TRUE(
+				timeTrigger_isActive(&handle, TimeTrigger_mainRegion_StateB));
+		EXPECT_TRUE(timeTriggerIface_get_value(&handle) == i);
+	}
+	//timeTrigger_raiseTimeEvent(&handle, timeEvent.setEvid);
+	timeTrigger_runCycle(&handle);
+	EXPECT_TRUE( timeTrigger_isActive(&handle, TimeTrigger_mainRegion_StateA));
+	EXPECT_TRUE(timeTriggerIface_get_value(&handle) == 0);
+	EXPECT_TRUE(
+			timeEvent.setEvid == &(handle.timeEvents.StateA_time_event_0_raised));
+	EXPECT_TRUE(
+			timeEvent.unsetEvid == &(handle.timeEvents.StateB_time_event_0_raised));
+	EXPECT_TRUE(timeEvent.time_ms == 100);
+	EXPECT_FALSE(timeEvent.periodic);
+}
+
+void timeTrigger_setTimer(const sc_eventid evid, const sc_integer time_ms,
+		const sc_boolean periodic) {
+	timeEvent.setEvid = evid;
+	timeEvent.time_ms = time_ms;
+	timeEvent.periodic = periodic;
+}
+
+void timeTrigger_unsetTimer(const sc_eventid evid) {
+	timeEvent.unsetEvid = evid;
+}