Просмотр исходного кода

Changed project encoding to UTF-8

markus.muehlbrandt@gmail.com 13 лет назад
Родитель
Сommit
fdc62bccb0
32 измененных файлов с 1214 добавлено и 1214 удалено
  1. 1 1
      plugins/org.yakindu.sct.generator.c/.settings/org.eclipse.core.resources.prefs
  2. 33 33
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/ActionCode.xtend
  3. 50 50
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/FlowCode.xtend
  4. 6 6
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/Naming.xtend
  5. 64 64
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/Statemachine.xtend
  6. 129 129
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/StatemachineC.xtend
  7. 24 24
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/StatemachineRequired.xtend
  8. 10 10
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/Timer.xtend
  9. 3 3
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/Types.xtend
  10. 18 18
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CMakeLists.xpt
  11. 22 22
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CustomEventC.xpt
  12. 36 36
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CustomEventH.xpt
  13. 356 356
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CustomStatemachineC.xpt
  14. 55 55
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CustomStatemachineHOOW.xpt
  15. 13 13
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/DummyTimer.xpt
  16. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventC.xpt
  17. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventH.xpt
  18. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventPoolC.xpt
  19. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventPoolH.xpt
  20. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventSetC.xpt
  21. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventSetH.xpt
  22. 66 66
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/InterfaceOOW.xpt
  23. 132 132
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Interfaces.xpt
  24. 35 35
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Main.xpt
  25. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/StatemachineBaseC.xpt
  26. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/StatemachineBaseH.xpt
  27. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Statemachine_cyC.xpt
  28. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Statemachine_cyH.xpt
  29. 18 18
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/States.xpt
  30. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/TimerC.xpt
  31. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/TimerH.xpt
  32. 11 11
      plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/definitionH.xpt

+ 1 - 1
plugins/org.yakindu.sct.generator.c/.settings/org.eclipse.core.resources.prefs

@@ -1,3 +1,3 @@
 eclipse.preferences.version=1
 eclipse.preferences.version=1
 encoding//.settings/org.eclipse.xtend.shared.ui.prefs=Cp1252
 encoding//.settings/org.eclipse.xtend.shared.ui.prefs=Cp1252
-encoding/<project>=Cp1252
+encoding/<project>=UTF-8

+ 33 - 33
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/ActionCode.xtend

@@ -52,108 +52,108 @@ class ActionCode {
 	}
 	}
 		
 		
 	def dispatch code (Expression it, Event target) 
 	def dispatch code (Expression it, Event target) 
-		'''«target.access»'''
+		'''«target.access»'''
 		
 		
 	def dispatch code (Expression it, VariableDefinition target) 
 	def dispatch code (Expression it, VariableDefinition target) 
-		'''«target.access»'''
+		'''«target.access»'''
 	
 	
 	def dispatch code (ElementReferenceExpression it, OperationDefinition target) 
 	def dispatch code (ElementReferenceExpression it, OperationDefinition target) 
-		'''«target.access»(«FOR arg:args SEPARATOR ', '»«arg.code»«ENDFOR»)'''
+		'''«target.access»(«FOR arg:args SEPARATOR ', '»«arg.code»«ENDFOR»)'''
 	
 	
 	def dispatch code (FeatureCall it, OperationDefinition target) 
 	def dispatch code (FeatureCall it, OperationDefinition target) 
-		'''«target.access»(«FOR arg:args SEPARATOR ', '»«arg.code»«ENDFOR»)'''
+		'''«target.access»(«FOR arg:args SEPARATOR ', '»«arg.code»«ENDFOR»)'''
 	
 	
 	/*  */
 	/*  */
 	
 	
 	def dispatch code (Statement it) 
 	def dispatch code (Statement it) 
-		'''#error TODO: generate code for «getClass().name»'''
+		'''#error TODO: generate code for «getClass().name»'''
 
 
 	
 	
 	/* HANDLING LITERALS */
 	/* HANDLING LITERALS */
 	def dispatch code (Literal it)
 	def dispatch code (Literal it)
-		'''#error unknown literal type «getClass().name» '''
+		'''#error unknown literal type «getClass().name» '''
 	
 	
 	def dispatch code (StringLiteral it) 
 	def dispatch code (StringLiteral it) 
-		'''"«value»"'''	
+		'''"«value»"'''	
 
 
 	def dispatch code (BoolLiteral it) 
 	def dispatch code (BoolLiteral it) 
-		'''«IF value»bool_true«ELSE»bool_false«ENDIF»'''	
+		'''«IF value»bool_true«ELSE»bool_false«ENDIF»'''	
 
 
 	def dispatch code (IntLiteral it) 
 	def dispatch code (IntLiteral it) 
-		'''«value.toString»'''	
+		'''«value.toString»'''	
 
 
 	def dispatch code (RealLiteral it) 
 	def dispatch code (RealLiteral it) 
-		'''«value.toString»'''	
+		'''«value.toString»'''	
 		
 		
 	def dispatch code (HexLiteral it) 
 	def dispatch code (HexLiteral it) 
-		'''0x«Integer::toHexString(value)»'''	
+		'''0x«Integer::toHexString(value)»'''	
 
 
 	def dispatch code (PrimitiveValueExpression it) 
 	def dispatch code (PrimitiveValueExpression it) 
-		'''«value.code»'''	
+		'''«value.code»'''	
 
 
 		
 		
 	/* Statements */
 	/* Statements */
 	
 	
 	def dispatch code (AssignmentExpression it)
 	def dispatch code (AssignmentExpression it)
-		'''«varRef.code» «operator.literal» «expression.code»'''
+		'''«varRef.code» «operator.literal» «expression.code»'''
 		
 		
 	def dispatch code (EventRaisingExpression it)
 	def dispatch code (EventRaisingExpression it)
 		'''
 		'''
-		«IF value != null»
-			«event.definition.event.valueAccess» = «value.code»;
-		«ENDIF»
-		«event.definition.event.access» = bool_true'''	
+		«IF value != null»
+			«event.definition.event.valueAccess» = «value.code»;
+		«ENDIF»
+		«event.definition.event.access» = bool_true'''	
 
 
 
 
 	/* Logical Expressions */
 	/* Logical Expressions */
 	
 	
 	def dispatch code (LogicalOrExpression it)
 	def dispatch code (LogicalOrExpression it)
-		'''«rightOperand.code» || «leftOperand.code»'''
+		'''«rightOperand.code» || «leftOperand.code»'''
 		
 		
 	def dispatch code (LogicalAndExpression it)
 	def dispatch code (LogicalAndExpression it)
-		'''«rightOperand.code» && «leftOperand.code»'''
+		'''«rightOperand.code» && «leftOperand.code»'''
 	 	
 	 	
 	def dispatch code (LogicalNotExpression it)
 	def dispatch code (LogicalNotExpression it)
-		'''! «operand.code»'''
+		'''! «operand.code»'''
 		
 		
 	def dispatch code (LogicalRelationExpression it) '''
 	def dispatch code (LogicalRelationExpression it) '''
-		«IF leftOperand.type.isString»
-			(strcmp(«leftOperand.code», «rightOperand.code») «operator.literal» 0)
-		«ELSE»«leftOperand.code» «operator.literal» «rightOperand.code»«ENDIF»'''
+		«IF leftOperand.type.isString»
+			(strcmp(«leftOperand.code», «rightOperand.code») «operator.literal» 0)
+		«ELSE»«leftOperand.code» «operator.literal» «rightOperand.code»«ENDIF»'''
 	
 	
 	/* Bitwise Operations */
 	/* Bitwise Operations */
 	
 	
 	def dispatch code (BitwiseAndExpression it)
 	def dispatch code (BitwiseAndExpression it)
-		'''«leftOperand.code» & «rightOperand.code»'''
+		'''«leftOperand.code» & «rightOperand.code»'''
 	
 	
 	def dispatch code (BitwiseOrExpression it)
 	def dispatch code (BitwiseOrExpression it)
-		'''«leftOperand.code» | «rightOperand.code»'''
+		'''«leftOperand.code» | «rightOperand.code»'''
 	
 	
 	def dispatch code (BitwiseXorExpression it)
 	def dispatch code (BitwiseXorExpression it)
-		'''«leftOperand.code» ^ «rightOperand.code»'''
+		'''«leftOperand.code» ^ «rightOperand.code»'''
 	
 	
 	def dispatch code (ShiftExpression it)
 	def dispatch code (ShiftExpression it)
-		'''«leftOperand.code» «operator.literal» «rightOperand.code»'''
+		'''«leftOperand.code» «operator.literal» «rightOperand.code»'''
 
 
 	/* Numerical operations */
 	/* Numerical operations */
 	
 	
 	def dispatch code (NumericalAddSubtractExpression it)
 	def dispatch code (NumericalAddSubtractExpression it)
-		'''«leftOperand.code» «operator.literal» «rightOperand.code»'''
+		'''«leftOperand.code» «operator.literal» «rightOperand.code»'''
 	
 	
 	def dispatch code (NumericalMultiplyDivideExpression it)
 	def dispatch code (NumericalMultiplyDivideExpression it)
-		'''«leftOperand.code» «operator.literal» «rightOperand.code»'''
+		'''«leftOperand.code» «operator.literal» «rightOperand.code»'''
 	
 	
 	def dispatch code (NumericalUnaryExpression it)
 	def dispatch code (NumericalUnaryExpression it)
-		'''«operator.literal» «operand.code»'''
+		'''«operator.literal» «operand.code»'''
 	
 	
 	/* TODO: check if event is active */
 	/* TODO: check if event is active */
 	def dispatch code (EventValueReferenceExpression it)
 	def dispatch code (EventValueReferenceExpression it)
-		'''«value.definition.event.valueAccess»'''
+		'''«value.definition.event.valueAccess»'''
 	
 	
 	def dispatch code (ActiveStateReferenceExpression it)
 	def dispatch code (ActiveStateReferenceExpression it)
-		'''«flow.nameOfIsActiveFunction»(«scHandle», «value.fullyQualifiedName»)'''
+		'''«flow.nameOfIsActiveFunction»(«scHandle», «value.fullyQualifiedName»)'''
 	
 	
 	def dispatch code (ParenthesizedExpression it)
 	def dispatch code (ParenthesizedExpression it)
-		'''(«expression.code»)'''
+		'''(«expression.code»)'''
 	
 	
 }
 }

+ 50 - 50
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/FlowCode.xtend

@@ -25,100 +25,100 @@ class FlowCode {
 	
 	
  
  
 	def stepComment(Step it) '''
 	def stepComment(Step it) '''
-		«IF comment != null && ! comment.empty»
-			/* «comment» */
-		«ENDIF»
+		«IF comment != null && ! comment.empty»
+			/* «comment» */
+		«ENDIF»
 	'''
 	'''
 	
 	
 	def dispatch code(Step it) '''
 	def dispatch code(Step it) '''
-		#error ActionCode for Step '«getClass().name»' not defined
+		#error ActionCode for Step '«getClass().name»' not defined
 	'''
 	'''
 
 
 	def dispatch code(SaveHistory it) '''
 	def dispatch code(SaveHistory it) '''
-		«stepComment»
-		«scHandle»->historyVector[«region.historyVector.offset»] = «scHandle»->stateConfVector[«region.stateVector.offset»];
+		«stepComment»
+		«scHandle»->historyVector[«region.historyVector.offset»] = «scHandle»->stateConfVector[«region.stateVector.offset»];
 	'''
 	'''
 	
 	
 	def dispatch code(HistoryEntry it) '''
 	def dispatch code(HistoryEntry it) '''
-		«stepComment»
-		if («scHandle»->historyVector[«region.historyVector.offset»] != «last_state») {
-			«historyStep.code»
+		«stepComment»
+		if («scHandle»->historyVector[«region.historyVector.offset»] != «last_state») {
+			«historyStep.code»
 		} else {
 		} else {
-			«initialStep.code»
+			«initialStep.code»
 		}
 		}
 	'''
 	'''
 
 
 	def dispatch code(StateSwitch it) '''
 	def dispatch code(StateSwitch it) '''
-		«stepComment»
-		«IF historyRegion != null»
-			switch(«scHandle»->historyVector[ «historyRegion.historyVector.offset» ]) {
-		«ELSE»
-			switch(«scHandle»->stateConfVector[ «stateConfigurationIdx» ]) {
-		«ENDIF»
-			«FOR caseid : cases»
-				case «caseid.state.name.asIdentifier» : {
-					«caseid.step.code»
+		«stepComment»
+		«IF historyRegion != null»
+			switch(«scHandle»->historyVector[ «historyRegion.historyVector.offset» ]) {
+		«ELSE»
+			switch(«scHandle»->stateConfVector[ «stateConfigurationIdx» ]) {
+		«ENDIF»
+			«FOR caseid : cases»
+				case «caseid.state.name.asIdentifier» : {
+					«caseid.step.code»
 					break;
 					break;
 				}
 				}
-			«ENDFOR»
+			«ENDFOR»
 			default: break;
 			default: break;
 		}
 		}
 	'''
 	'''
 
 
 	def dispatch code(ScheduleTimeEvent it) '''
 	def dispatch code(ScheduleTimeEvent it) '''
-		«stepComment»
-		«flow.type.toFirstLower»_setTimer( (sc_eventid) &(«scHandle»->timeEvents.«timeEvent.name.asIdentifier»_raised) , «timeValue.code», «IF timeEvent.periodic»bool_true«ELSE»bool_false«ENDIF»);
+		«stepComment»
+		«flow.type.toFirstLower»_setTimer( (sc_eventid) &(«scHandle»->timeEvents.«timeEvent.name.asIdentifier»_raised) , «timeValue.code», «IF timeEvent.periodic»bool_true«ELSE»bool_false«ENDIF»);
 	'''
 	'''
 
 
 	def dispatch code(UnscheduleTimeEvent it) '''
 	def dispatch code(UnscheduleTimeEvent it) '''
-		«stepComment»
-		«flow.type.toFirstLower»_unsetTimer( (sc_eventid) &(«scHandle»->timeEvents.«timeEvent.name.asIdentifier»_raised) );		
+		«stepComment»
+		«flow.type.toFirstLower»_unsetTimer( (sc_eventid) &(«scHandle»->timeEvents.«timeEvent.name.asIdentifier»_raised) );		
 	'''
 	'''
 
 
 	def dispatch code(Execution it) 
 	def dispatch code(Execution it) 
-		'''«statement.code»;'''
+		'''«statement.code»;'''
 	
 	
 	def dispatch code(Call it) 
 	def dispatch code(Call it) 
-		'''«step.functionName»(«scHandle»);'''
+		'''«step.functionName»(«scHandle»);'''
 
 
 	def dispatch code(Sequence it) '''
 	def dispatch code(Sequence it) '''
-«««		«IF comment != null»
-«««			{
-				«stepComment»
-				«FOR s : steps»
-					«s.code»
-				«ENDFOR»
-«««			}
-«««		«ELSE»
-«««			«FOR s : steps»
-«««				«s.code»
-«««			«ENDFOR»
-«««		«ENDIF»
+		«IF comment != null»
+			{
+				«stepComment»
+				«FOR s : steps»
+					«s.code»
+				«ENDFOR»
+			}
+		«ELSE»
+			«FOR s : steps»
+				«s.code»
+			«ENDFOR»
+		«ENDIF»
 	'''	
 	'''	
 
 
 	def dispatch code(Check it) 
 	def dispatch code(Check it) 
-		'''«IF condition != null»«condition.code»«ELSE»bool_true«ENDIF»'''
+		'''«IF condition != null»«condition.code»«ELSE»bool_true«ENDIF»'''
 	
 	
 	def dispatch code(CheckRef it) 
 	def dispatch code(CheckRef it) 
-		'''«IF check != null»«check.functionName»(«scHandle»)«ELSE»bool_true«ENDIF»'''
+		'''«IF check != null»«check.functionName»(«scHandle»)«ELSE»bool_true«ENDIF»'''
 
 
 	def dispatch code(If it) '''
 	def dispatch code(If it) '''
-		«stepComment»
-		if («check.code») { 
-			«thenStep.code»
-		} «IF (elseStep != null)» else {
-			«elseStep.code»
+		«stepComment»
+		if («check.code») { 
+			«thenStep.code»
+		} «IF (elseStep != null)» else {
+			«elseStep.code»
 		}
 		}
-		«ENDIF»
+		«ENDIF»
 	'''
 	'''
 	
 	
 	def dispatch code(EnterState it) '''
 	def dispatch code(EnterState it) '''
-		«scHandle»->stateConfVector[«state.stateVector.offset»] = «state.name.asEscapedIdentifier»;
-		«scHandle»->stateConfVectorPosition = «state.stateVector.offset»;
+		«scHandle»->stateConfVector[«state.stateVector.offset»] = «state.name.asEscapedIdentifier»;
+		«scHandle»->stateConfVectorPosition = «state.stateVector.offset»;
 	'''
 	'''
 
 
 	def dispatch code(ExitState it) '''
 	def dispatch code(ExitState it) '''
-		«scHandle»->stateConfVector[«state.stateVector.offset»] = «last_state»;
-		«scHandle»->stateConfVectorPosition = «state.stateVector.offset»;
+		«scHandle»->stateConfVector[«state.stateVector.offset»] = «last_state»;
+		«scHandle»->stateConfVectorPosition = «state.stateVector.offset»;
 	'''
 	'''
 }
 }

+ 6 - 6
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/Naming.xtend

@@ -231,7 +231,7 @@ class Naming implements INaming{
 	
 	
 	def dispatch scopeDescription(Scope it) '''scope'''
 	def dispatch scopeDescription(Scope it) '''scope'''
 	
 	
-	def dispatch scopeDescription(InterfaceScope it) '''«IF name==null || name.empty»default interface scope«ELSE»interface scope '«name»'«ENDIF»'''
+	def dispatch scopeDescription(InterfaceScope it) '''«IF name==null || name.empty»default interface scope«ELSE»interface scope '«name»'«ENDIF»'''
 	def dispatch scopeDescription(InternalScope it) '''internal scope'''
 	def dispatch scopeDescription(InternalScope it) '''internal scope'''
 	
 	
 	def scHandleDecl(EObject it) { flow.type + '* ' + scHandle }
 	def scHandleDecl(EObject it) { flow.type + '* ' + scHandle }
@@ -245,22 +245,22 @@ class Naming implements INaming{
 	
 	
 	/** todo externalize */
 	/** todo externalize */
 	def dispatch access (VariableDefinition it) 
 	def dispatch access (VariableDefinition it) 
-		'''«scHandle»->«scope.instance».«name.asEscapedIdentifier»'''
+		'''«scHandle»->«scope.instance».«name.asEscapedIdentifier»'''
 
 
 	/** todo externalize */
 	/** todo externalize */
 	def dispatch access (OperationDefinition it) 
 	def dispatch access (OperationDefinition it) 
-		'''«asFunction»'''
+		'''«asFunction»'''
 		
 		
 	/** todo externalize */
 	/** todo externalize */
 	def dispatch access (Event it) 
 	def dispatch access (Event it) 
-		'''«scHandle»->«scope.instance».«name.asIdentifier.raised»'''
+		'''«scHandle»->«scope.instance».«name.asIdentifier.raised»'''
 				
 				
 	def dispatch access (EObject it) 
 	def dispatch access (EObject it) 
-		'''#error cannot access elements of type «getClass().name» '''
+		'''#error cannot access elements of type «getClass().name» '''
 		
 		
 	
 	
 	def valueAccess(Event it) 
 	def valueAccess(Event it) 
-		'''«scHandle»->«scope.instance».«name.asIdentifier.value»'''
+		'''«scHandle»->«scope.instance».«name.asIdentifier.value»'''
 		
 		
 	def boolean isCKeyword(String name) {
 	def boolean isCKeyword(String name) {
 		var String lowName = name.toLowerCase();
 		var String lowName = name.toLowerCase();

+ 64 - 64
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/Statemachine.xtend

@@ -27,90 +27,90 @@ class Statemachine {
 	
 	
 	
 	
 	def statemachineHContent(ExecutionFlow it) '''
 	def statemachineHContent(ExecutionFlow it) '''
-			#ifndef «module.define»_H_
-			#define «module.define»_H_
+			#ifndef «module.define»_H_
+			#define «module.define»_H_
 
 
-			#include "«typesModule.h»"
+			#include "«typesModule.h»"
 			
 			
 			#ifdef __cplusplus
 			#ifdef __cplusplus
 			extern "C" { 
 			extern "C" { 
 			#endif 
 			#endif 
 
 
-			/*! \file Header of the state machine '«name»'.
+			/*! \file Header of the state machine '«name»'.
 			*/
 			*/
 			
 			
-			«statesEnumDecl»
+			«statesEnumDecl»
 			
 			
-			«FOR s : it.scopes»«s.scopeTypeDecl»«ENDFOR»
+			«FOR s : it.scopes»«s.scopeTypeDecl»«ENDFOR»
 			
 			
-			«statemachineTypeDecl»
+			«statemachineTypeDecl»
 
 
-			/*! Initializes the «type» state machine data structures. Must be called before first usage.*/
-			extern void «type.toFirstLower»_init(«type»* handle);
+			/*! Initializes the «type» state machine data structures. Must be called before first usage.*/
+			extern void «type.toFirstLower»_init(«type»* handle);
 			
 			
 			/*! Activates the state machine */
 			/*! Activates the state machine */
-			extern void «type.toFirstLower»_enter(«type»* handle);
+			extern void «type.toFirstLower»_enter(«type»* handle);
 			
 			
 			/*! Deactivates the state machine */
 			/*! Deactivates the state machine */
-			extern void «type.toFirstLower»_exit(«type»* handle);
+			extern void «type.toFirstLower»_exit(«type»* handle);
 			
 			
 			/*! Performs a 'run to completion' step. */
 			/*! Performs a 'run to completion' step. */
-			extern void «type.toFirstLower»_runCycle(«type»* handle);
+			extern void «type.toFirstLower»_runCycle(«type»* handle);
 
 
-			«IF timed»
+			«IF timed»
 				/*! Raises a time event. */
 				/*! Raises a time event. */
-				extern void «nameOfRaiseTimeEventFunction»(«type»* handle, sc_eventid evid);
-			«ENDIF»
+				extern void «nameOfRaiseTimeEventFunction»(«type»* handle, sc_eventid evid);
+			«ENDIF»
 			
 			
-			«FOR s : it.scopes.filter( typeof(InterfaceScope) )»
-				«s.scopeFunctionPrototypes»
+			«FOR s : it.scopes.filter( typeof(InterfaceScope) )»
+				«s.scopeFunctionPrototypes»
 				
 				
-			«ENDFOR»
+			«ENDFOR»
 			
 			
 			/*! Checks if the specified state is active. */
 			/*! Checks if the specified state is active. */
-			extern sc_boolean «nameOfIsActiveFunction»(«scHandleDecl», «statesEnumType» state);
+			extern sc_boolean «nameOfIsActiveFunction»(«scHandleDecl», «statesEnumType» state);
 			
 			
 			#ifdef __cplusplus
 			#ifdef __cplusplus
 			}
 			}
 			#endif 
 			#endif 
 			
 			
-			#endif /* «module.define»_H_ */
+			#endif /* «module.define»_H_ */
 	'''
 	'''
 
 
 	def statesEnumDecl(ExecutionFlow it) '''
 	def statesEnumDecl(ExecutionFlow it) '''
 		//! enumeration of all states 
 		//! enumeration of all states 
 		typedef enum {
 		typedef enum {
-			«FOR state : states »
-			«state.name.asEscapedIdentifier» ,
-			«ENDFOR»
-			«last_state»
-		} «statesEnumType»;
+			«FOR state : states »
+			«state.name.asEscapedIdentifier» ,
+			«ENDFOR»
+			«last_state»
+		} «statesEnumType»;
 	'''
 	'''
 
 
 
 
 	def dispatch structDeclaration(EventDefinition it) '''
 	def dispatch structDeclaration(EventDefinition it) '''
-		sc_boolean «name.asIdentifier»_raised;
-		«IF type != null && type.name != 'void'»«type.cPrimitive»  «name.asIdentifier»_value;«ENDIF»
+		sc_boolean «name.asIdentifier»_raised;
+		«IF type != null && type.name != 'void'»«type.cPrimitive»  «name.asIdentifier»_value;«ENDIF»
 	'''
 	'''
 
 
 	def dispatch structDeclaration(TimeEvent it) '''
 	def dispatch structDeclaration(TimeEvent it) '''
-		sc_boolean «name.asIdentifier»_raised;
+		sc_boolean «name.asIdentifier»_raised;
 	'''
 	'''
 
 
 	def dispatch structDeclaration(VariableDefinition it) '''
 	def dispatch structDeclaration(VariableDefinition it) '''
-		«IF type.name != 'void'»«type.cPrimitive»  «name.asEscapedIdentifier»;«ENDIF»
+		«IF type.name != 'void'»«type.cPrimitive»  «name.asEscapedIdentifier»;«ENDIF»
 	'''
 	'''
 	
 	
 	def dispatch structDeclaration(Declaration it) ''''''
 	def dispatch structDeclaration(Declaration it) ''''''
 	
 	
 	
 	
 	def scopeTypeDecl(Scope it) '''
 	def scopeTypeDecl(Scope it) '''
-		//! Type definition of the data structure for the «it.type» interface scope.
+		//! Type definition of the data structure for the «it.type» interface scope.
 		typedef struct {
 		typedef struct {
-			«FOR d : declarations »
-			«d.structDeclaration »
-			«ENDFOR»
-		} «it.type»;
+			«FOR d : declarations »
+			«d.structDeclaration »
+			«ENDFOR»
+		} «it.type»;
 
 
 	'''	
 	'''	
 
 
@@ -118,29 +118,29 @@ class Statemachine {
 
 
 	def statemachineTypeDecl(ExecutionFlow it) '''
 	def statemachineTypeDecl(ExecutionFlow it) '''
 		//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
 		//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
-		#define «type.toUpperCase»_MAX_ORTHOGONAL_STATES «stateVector.size»
-		«IF ! historyVector.empty»
+		#define «type.toUpperCase»_MAX_ORTHOGONAL_STATES «stateVector.size»
+		«IF ! historyVector.empty»
 		//! dimension of the state configuration vector for history states
 		//! dimension of the state configuration vector for history states
-		#define «type.toUpperCase»_MAX_HISTORY_STATES «historyVector.size»«ENDIF»
+		#define «type.toUpperCase»_MAX_HISTORY_STATES «historyVector.size»«ENDIF»
 		
 		
-		/*! Type definition of the data structure for the «type» state machine.
+		/*! Type definition of the data structure for the «type» state machine.
 		This data structure has to be allocated by the client code. */
 		This data structure has to be allocated by the client code. */
 		typedef struct {
 		typedef struct {
-			«statesEnumType» stateConfVector[«type.toUpperCase»_MAX_ORTHOGONAL_STATES];
-			«IF ! historyVector.empty»«statesEnumType» historyVector[«type.toUpperCase»_MAX_HISTORY_STATES];«ENDIF»
+			«statesEnumType» stateConfVector[«type.toUpperCase»_MAX_ORTHOGONAL_STATES];
+			«IF ! historyVector.empty»«statesEnumType» historyVector[«type.toUpperCase»_MAX_HISTORY_STATES];«ENDIF»
 			sc_ushort stateConfVectorPosition; 
 			sc_ushort stateConfVectorPosition; 
 			
 			
-			«FOR iScope : scopes »
-			«iScope.type» «iScope.instance»;
-			«ENDFOR»			
-		} «type»;
+			«FOR iScope : scopes »
+			«iScope.type» «iScope.instance»;
+			«ENDFOR»			
+		} «type»;
 	'''
 	'''
 
 
 
 
 	def dispatch scopeFunctionPrototypes(StatechartScope it) '''
 	def dispatch scopeFunctionPrototypes(StatechartScope it) '''
-		«FOR d : declarations »
-		«d.functionPrototypes »
-		«ENDFOR»
+		«FOR d : declarations »
+		«d.functionPrototypes »
+		«ENDFOR»
 	'''	
 	'''	
 
 
 	def dispatch scopeFunctionPrototypes(Object it) ''''''	
 	def dispatch scopeFunctionPrototypes(Object it) ''''''	
@@ -149,28 +149,28 @@ class Statemachine {
 	def dispatch functionPrototypes(Declaration it) ''''''
 	def dispatch functionPrototypes(Declaration it) ''''''
 
 
 	def dispatch functionPrototypes(EventDefinition it) '''
 	def dispatch functionPrototypes(EventDefinition it) '''
-		«IF direction == Direction::IN»
-		/*! Raises the in event '«name»' that is defined in the «scope.scopeDescription». */ 
-		extern void «asRaiser»(«it.flow.type»* handle«valueParams»);
+		«IF direction == Direction::IN»
+		/*! Raises the in event '«name»' that is defined in the «scope.scopeDescription». */ 
+		extern void «asRaiser»(«it.flow.type»* handle«valueParams»);
 		
 		
-		«ELSE»
-			/*! Checks if the out event '«name»' that is defined in the «scope.scopeDescription» has been raised. */ 
-			extern sc_boolean «asRaised»(«it.flow.type»* handle);
+		«ELSE»
+			/*! Checks if the out event '«name»' that is defined in the «scope.scopeDescription» has been raised. */ 
+			extern sc_boolean «asRaised»(«it.flow.type»* handle);
 			
 			
-			«IF hasValue»
-				/*! Gets the value of the out event '«name»' that is defined in the «scope.scopeDescription». */ 
-				extern «type.cPrimitive» «asGetter»(«it.flow.type»* handle);
+			«IF hasValue»
+				/*! Gets the value of the out event '«name»' that is defined in the «scope.scopeDescription». */ 
+				extern «type.cPrimitive» «asGetter»(«it.flow.type»* handle);
 				
 				
-			«ENDIF»
-		«ENDIF»
+			«ENDIF»
+		«ENDIF»
 	'''
 	'''
 
 
 	def dispatch functionPrototypes(VariableDefinition it) '''
 	def dispatch functionPrototypes(VariableDefinition it) '''
-		/*! Gets the value of the variable '«name»' that is defined in the «scope.scopeDescription». */ 
-		extern «type.cPrimitive» «it.asGetter»(«it.flow.type»* handle);
-		«IF ! readonly »
-			/*! Sets the value of the variable '«name»' that is defined in the «scope.scopeDescription». */ 
-			extern void «asSetter»(«it.flow.type»* handle, «type.cPrimitive» value);
-		«ENDIF»
+		/*! Gets the value of the variable '«name»' that is defined in the «scope.scopeDescription». */ 
+		extern «type.cPrimitive» «it.asGetter»(«it.flow.type»* handle);
+		«IF ! readonly »
+			/*! Sets the value of the variable '«name»' that is defined in the «scope.scopeDescription». */ 
+			extern void «asSetter»(«it.flow.type»* handle, «type.cPrimitive» value);
+		«ENDIF»
 	'''
 	'''
 }
 }

+ 129 - 129
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/StatemachineC.xtend

@@ -28,51 +28,51 @@ class StatemachineC {
 	def statemachineCContent(ExecutionFlow it) '''
 	def statemachineCContent(ExecutionFlow it) '''
 		#include <stdlib.h>
 		#include <stdlib.h>
 		#include <string.h>
 		#include <string.h>
-		#include "«typesModule.h»"
-		#include "«module.h»"
-		#include "«module.client.h»"
+		#include "«typesModule.h»"
+		#include "«module.h»"
+		#include "«module.client.h»"
 
 
-		/*! \file Implementation of the state machine '«name»'
+		/*! \file Implementation of the state machine '«name»'
 		*/
 		*/
 		
 		
-		«functionPrototypes»
+		«functionPrototypes»
 		
 		
-		«initFunction»
+		«initFunction»
 		
 		
-		«enterFunction»
+		«enterFunction»
 		
 		
-		«exitFunction»
+		«exitFunction»
 		
 		
-		«clearInEventsFunction»
+		«clearInEventsFunction»
 		
 		
-		«clearOutEventsFunction»
+		«clearOutEventsFunction»
 		
 		
-		«runCycleFunction»
+		«runCycleFunction»
 
 
-		«raiseTimeEventFunction»
+		«raiseTimeEventFunction»
 
 
-		«isActiveFunction»
+		«isActiveFunction»
 		
 		
-		«interfaceFunctions»
+		«interfaceFunctions»
 				
 				
-		«functionImplementations»
+		«functionImplementations»
 	'''
 	'''
 	
 	
 	
 	
 	def initFunction(ExecutionFlow it) '''
 	def initFunction(ExecutionFlow it) '''
-		void «type.toFirstLower»_init(«scHandleDecl»)
+		void «type.toFirstLower»_init(«scHandleDecl»)
 		{
 		{
 			int i;
 			int i;
 
 
-			for (i = 0; i < «type.toUpperCase»_MAX_ORTHOGONAL_STATES; ++i)
-				«scHandle»->stateConfVector[i] = «last_state»;
+			for (i = 0; i < «type.toUpperCase»_MAX_ORTHOGONAL_STATES; ++i)
+				«scHandle»->stateConfVector[i] = «last_state»;
 			
 			
-			«IF ! historyVector.empty»
-			for (i = 0; i < «type.toUpperCase»_MAX_HISTORY_STATES; ++i)
-				«scHandle»->historyVector[i] = «last_state»;
-			«ENDIF»
+			«IF ! historyVector.empty»
+			for (i = 0; i < «type.toUpperCase»_MAX_HISTORY_STATES; ++i)
+				«scHandle»->historyVector[i] = «last_state»;
+			«ENDIF»
 			
 			
-			«scHandle»->stateConfVectorPosition = 0;
+			«scHandle»->stateConfVectorPosition = 0;
 		
 		
 		clearInEvents(handle);
 		clearInEvents(handle);
 		clearOutEvents(handle);
 		clearOutEvents(handle);
@@ -84,96 +84,96 @@ class StatemachineC {
 	'''
 	'''
 	
 	
 	def enterFunction(ExecutionFlow it) '''
 	def enterFunction(ExecutionFlow it) '''
-		void «type.toFirstLower»_enter(«scHandleDecl»)
+		void «type.toFirstLower»_enter(«scHandleDecl»)
 		{
 		{
-			«enterSequence.code»
+			«enterSequence.code»
 		}
 		}
 	'''
 	'''
 	
 	
 	def exitFunction(ExecutionFlow it) '''
 	def exitFunction(ExecutionFlow it) '''
-		void «type.toFirstLower»_exit(«scHandleDecl»)
+		void «type.toFirstLower»_exit(«scHandleDecl»)
 		{
 		{
-			«exitSequence.code»
+			«exitSequence.code»
 		}
 		}
 	'''
 	'''
 	
 	
 	def clearInEventsFunction(ExecutionFlow it) '''
 	def clearInEventsFunction(ExecutionFlow it) '''
-		static void clearInEvents(«scHandleDecl») {
-			«FOR scope : it.scopes»
-				«FOR event : scope.incomingEvents»
-				«event.access» = bool_false;
-				«ENDFOR»
-			«ENDFOR»
-			«IF hasLocalScope»
-				«FOR event : localScope.events»
-				«event.access» = bool_false; 
-				«ENDFOR»
-			«ENDIF»
-			«IF timed»
-				«FOR event : timeEventScope.events»
-				«event.access» = bool_false; 
-				«ENDFOR»
-			«ENDIF»
+		static void clearInEvents(«scHandleDecl») {
+			«FOR scope : it.scopes»
+				«FOR event : scope.incomingEvents»
+				«event.access» = bool_false;
+				«ENDFOR»
+			«ENDFOR»
+			«IF hasLocalScope»
+				«FOR event : localScope.events»
+				«event.access» = bool_false; 
+				«ENDFOR»
+			«ENDIF»
+			«IF timed»
+				«FOR event : timeEventScope.events»
+				«event.access» = bool_false; 
+				«ENDFOR»
+			«ENDIF»
 		}
 		}
 	'''
 	'''
 	
 	
 	def clearOutEventsFunction(ExecutionFlow it) '''
 	def clearOutEventsFunction(ExecutionFlow it) '''
-		static void clearOutEvents(«scHandleDecl») {
-			«FOR scope : it.scopes»
-				«FOR event : scope.outgoingEvents»
-				«event.access» = bool_false;
-				«ENDFOR»
-			«ENDFOR»
+		static void clearOutEvents(«scHandleDecl») {
+			«FOR scope : it.scopes»
+				«FOR event : scope.outgoingEvents»
+				«event.access» = bool_false;
+				«ENDFOR»
+			«ENDFOR»
 		}
 		}
 	'''
 	'''
 	
 	
 	def runCycleFunction(ExecutionFlow it) '''
 	def runCycleFunction(ExecutionFlow it) '''
-		void «type.toFirstLower»_runCycle(«scHandleDecl») {
+		void «type.toFirstLower»_runCycle(«scHandleDecl») {
 			
 			
-			clearOutEvents(«scHandle»);
+			clearOutEvents(«scHandle»);
 			
 			
-			for («scHandle»->stateConfVectorPosition = 0;
-				«scHandle»->stateConfVectorPosition < «type.toUpperCase»_MAX_ORTHOGONAL_STATES;
-				«scHandle»->stateConfVectorPosition++) {
+			for («scHandle»->stateConfVectorPosition = 0;
+				«scHandle»->stateConfVectorPosition < «type.toUpperCase»_MAX_ORTHOGONAL_STATES;
+				«scHandle»->stateConfVectorPosition++) {
 					
 					
-				switch («scHandle»->stateConfVector[handle->stateConfVectorPosition]) {
-				«FOR state : states»
-					«IF state.reactSequence!=null»
-					case «state.name.asEscapedIdentifier» : {
-						«state.reactSequence.functionName»(«scHandle»);
+				switch («scHandle»->stateConfVector[handle->stateConfVectorPosition]) {
+				«FOR state : states»
+					«IF state.reactSequence!=null»
+					case «state.name.asEscapedIdentifier» : {
+						«state.reactSequence.functionName»(«scHandle»);
 						break;
 						break;
 					}
 					}
-					«ENDIF»
-				«ENDFOR»
+					«ENDIF»
+				«ENDFOR»
 				default:
 				default:
 					break;
 					break;
 				}
 				}
 			}
 			}
 			
 			
-			clearInEvents(«scHandle»);
+			clearInEvents(«scHandle»);
 		}
 		}
 	'''
 	'''
 	
 	
 	def raiseTimeEventFunction(ExecutionFlow it) '''
 	def raiseTimeEventFunction(ExecutionFlow it) '''
-		«IF timed»
-			void «nameOfRaiseTimeEventFunction»(«type»* handle, sc_eventid evid) {
-				if ( ((intptr_t)evid) >= ((intptr_t)&(«scHandle»->timeEvents))
-					&&  ((intptr_t)evid) < ((intptr_t)&(«scHandle»->timeEvents)) + sizeof(«timeEventScope.type»)) {
+		«IF timed»
+			void «nameOfRaiseTimeEventFunction»(«type»* handle, sc_eventid evid) {
+				if ( ((intptr_t)evid) >= ((intptr_t)&(«scHandle»->timeEvents))
+					&&  ((intptr_t)evid) < ((intptr_t)&(«scHandle»->timeEvents)) + sizeof(«timeEventScope.type»)) {
 					*(sc_boolean*)evid = bool_true;
 					*(sc_boolean*)evid = bool_true;
 				}		
 				}		
 			}
 			}
-		«ENDIF»
+		«ENDIF»
 	'''
 	'''
 	
 	
 	def isActiveFunction(ExecutionFlow it) '''
 	def isActiveFunction(ExecutionFlow it) '''
-		sc_boolean «nameOfIsActiveFunction»(«scHandleDecl», «statesEnumType» state) {
+		sc_boolean «nameOfIsActiveFunction»(«scHandleDecl», «statesEnumType» state) {
 			switch (state) {
 			switch (state) {
-				«FOR s : states»
-				case «s.name.asIdentifier» : 
-					return (sc_boolean) («IF s.leaf»«scHandle»->stateConfVector[«s.stateVector.offset»] == «s.name.asIdentifier»
-					«ELSE»«scHandle»->stateConfVector[«s.stateVector.offset»] >= «s.name.asIdentifier»
-						&& «scHandle»->stateConfVector[«s.stateVector.offset»] <= «s.subStates.last.name.asIdentifier»«ENDIF»);
-				«ENDFOR»
+				«FOR s : states»
+				case «s.name.asIdentifier» : 
+					return (sc_boolean) («IF s.leaf»«scHandle»->stateConfVector[«s.stateVector.offset»] == «s.name.asIdentifier»
+					«ELSE»«scHandle»->stateConfVector[«s.stateVector.offset»] >= «s.name.asIdentifier»
+						&& «scHandle»->stateConfVector[«s.stateVector.offset»] <= «s.subStates.last.name.asIdentifier»«ENDIF»);
+				«ENDFOR»
 				default: return bool_false;
 				default: return bool_false;
 			}
 			}
 		}
 		}
@@ -184,39 +184,39 @@ class StatemachineC {
 	 */
 	 */
 	
 	
 	def interfaceFunctions(ExecutionFlow it) '''
 	def interfaceFunctions(ExecutionFlow it) '''
-		«FOR scope : interfaceScopes»
-			«FOR event : scope.incomingEvents»
-				void «event.asRaiser»(«scHandleDecl»«event.valueParams») {
-					«IF event.hasValue»
-					«event.valueAccess» = value;
-					«ENDIF»
-					«event.access» = bool_true;
+		«FOR scope : interfaceScopes»
+			«FOR event : scope.incomingEvents»
+				void «event.asRaiser»(«scHandleDecl»«event.valueParams») {
+					«IF event.hasValue»
+					«event.valueAccess» = value;
+					«ENDIF»
+					«event.access» = bool_true;
 				}
 				}
-			«ENDFOR»
+			«ENDFOR»
 			
 			
-			«FOR event : scope.outgoingEvents»
-				sc_boolean «event.asRaised»(«scHandleDecl») {
-					return «event.access»;
+			«FOR event : scope.outgoingEvents»
+				sc_boolean «event.asRaised»(«scHandleDecl») {
+					return «event.access»;
 				}
 				}
-				«IF event.hasValue» 
-					«event.type.cPrimitive» «event.asGetter»(«scHandleDecl») {
+				«IF event.hasValue» 
+					«event.type.cPrimitive» «event.asGetter»(«scHandleDecl») {
 						//TODO: Check if event is not raised
 						//TODO: Check if event is not raised
-						return «event.valueAccess»;
+						return «event.valueAccess»;
 					}
 					}
-				«ENDIF»
-			«ENDFOR»
+				«ENDIF»
+			«ENDFOR»
 			
 			
-			«FOR variable : scope.variableDefinitions»
-				«variable.type.cPrimitive» «variable.asGetter»(«scHandleDecl») {
-					return «variable.access»;
+			«FOR variable : scope.variableDefinitions»
+				«variable.type.cPrimitive» «variable.asGetter»(«scHandleDecl») {
+					return «variable.access»;
 				}
 				}
-				«IF !variable.readonly »
-				void «variable.asSetter»(«scHandleDecl», «variable.type.cPrimitive» value) {
-					«variable.access» = value;
+				«IF !variable.readonly »
+				void «variable.asSetter»(«scHandleDecl», «variable.type.cPrimitive» value) {
+					«variable.access» = value;
 				}
 				}
-				«ENDIF»
-			«ENDFOR»
-		«ENDFOR»
+				«ENDIF»
+			«ENDFOR»
+		«ENDFOR»
 	'''
 	'''
 	
 	
 	/* ===================================================================================
 	/* ===================================================================================
@@ -227,31 +227,31 @@ class StatemachineC {
 	def functionPrototypes(ExecutionFlow it) '''
 	def functionPrototypes(ExecutionFlow it) '''
 		// prototypes of all internal functions
 		// prototypes of all internal functions
 		
 		
-		«checkFunctions.toPrototypes»
-		«effectFunctions.toPrototypes»
-		«entryActionFunctions.toPrototypes»
-		«exitActionFunctions.toPrototypes»
-		«enterSequenceFunctions.toPrototypes»
-		«exitSequenceFunctions.toPrototypes»
-		«reactFunctions.toPrototypes»
-		static void clearInEvents(«scHandleDecl»);
-		static void clearOutEvents(«scHandleDecl»);
+		«checkFunctions.toPrototypes»
+		«effectFunctions.toPrototypes»
+		«entryActionFunctions.toPrototypes»
+		«exitActionFunctions.toPrototypes»
+		«enterSequenceFunctions.toPrototypes»
+		«exitSequenceFunctions.toPrototypes»
+		«reactFunctions.toPrototypes»
+		static void clearInEvents(«scHandleDecl»);
+		static void clearOutEvents(«scHandleDecl»);
 		
 		
 	'''
 	'''
 	 
 	 
 	 
 	 
 	def toPrototypes(List<Step> steps) '''
 	def toPrototypes(List<Step> steps) '''
-		«FOR s : steps»
-			«s.functionPrototype»
-		«ENDFOR»
+		«FOR s : steps»
+			«s.functionPrototype»
+		«ENDFOR»
 	'''
 	'''
 	
 	
 	def dispatch functionPrototype(Check it) '''
 	def dispatch functionPrototype(Check it) '''
-		static sc_boolean «asCheckFunction»(«scHandleDecl»);
+		static sc_boolean «asCheckFunction»(«scHandleDecl»);
 	'''
 	'''
 	
 	
 	def dispatch functionPrototype(Step it) '''
 	def dispatch functionPrototype(Step it) '''
-		static void «functionName»(«scHandleDecl»);
+		static void «functionName»(«scHandleDecl»);
 	'''	
 	'''	
 	
 	
 	
 	
@@ -264,34 +264,34 @@ class StatemachineC {
 	def functionImplementations(ExecutionFlow it) '''
 	def functionImplementations(ExecutionFlow it) '''
 		// implementations of all internal functions
 		// implementations of all internal functions
 		
 		
-		«checkFunctions.toImplementation»
-		«effectFunctions.toImplementation»
-		«entryActionFunctions.toImplementation»
-		«exitActionFunctions.toImplementation»
-		«enterSequenceFunctions.toImplementation»
-		«exitSequenceFunctions.toImplementation»
-		«reactFunctions.toImplementation»
+		«checkFunctions.toImplementation»
+		«effectFunctions.toImplementation»
+		«entryActionFunctions.toImplementation»
+		«exitActionFunctions.toImplementation»
+		«enterSequenceFunctions.toImplementation»
+		«exitSequenceFunctions.toImplementation»
+		«reactFunctions.toImplementation»
 		
 		
 	'''
 	'''
 	 
 	 
 	def toImplementation(List<Step> steps) '''
 	def toImplementation(List<Step> steps) '''
-		«FOR s : steps»
-			«s.functionImplementation»
-		«ENDFOR»
+		«FOR s : steps»
+			«s.functionImplementation»
+		«ENDFOR»
 	'''
 	'''
 	
 	
 	def dispatch functionImplementation(Check it) '''
 	def dispatch functionImplementation(Check it) '''
-		«stepComment»
-		static sc_boolean «asCheckFunction»(«scHandleDecl») {
-			return «code»;
+		«stepComment»
+		static sc_boolean «asCheckFunction»(«scHandleDecl») {
+			return «code»;
 		}
 		}
 		
 		
 	'''
 	'''
 	
 	
 	def dispatch functionImplementation(Step it) '''
 	def dispatch functionImplementation(Step it) '''
-		«stepComment»
-		static void «functionName»(«scHandleDecl») {
-			«code»
+		«stepComment»
+		static void «functionName»(«scHandleDecl») {
+			«code»
 		}
 		}
 		
 		
 	'''
 	'''

+ 24 - 24
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/StatemachineRequired.xtend

@@ -21,10 +21,10 @@ class StatemachineRequired {
 	
 	
 	
 	
 	def statemachineClientHContent(ExecutionFlow it) '''
 	def statemachineClientHContent(ExecutionFlow it) '''
-			#ifndef «module.client.define»_H_
-			#define «module.client.define»_H_
+			#ifndef «module.client.define»_H_
+			#define «module.client.define»_H_
 
 
-			#include "«typesModule.h»"
+			#include "«typesModule.h»"
 
 
 			#ifdef __cplusplus
 			#ifdef __cplusplus
 			extern "C" {
 			extern "C" {
@@ -34,20 +34,20 @@ class StatemachineRequired {
 
 
 			/*! \file This header defines prototypes for all functions that are required by the state machine implementation.
 			/*! \file This header defines prototypes for all functions that are required by the state machine implementation.
 			
 			
-			«IF timed»
+			«IF timed»
 				This is a state machine uses time events which require access to a timing service. Thus the function prototypes:
 				This is a state machine uses time events which require access to a timing service. Thus the function prototypes:
-					- «type.toFirstLower»_setTimer and
-					- «type.toFirstLower»_unsetTimer
+					- «type.toFirstLower»_setTimer and
+					- «type.toFirstLower»_unsetTimer
 				are defined.
 				are defined.
-			«ENDIF»
+			«ENDIF»
 			
 			
-			«IF operations.size > 0»
+			«IF operations.size > 0»
 				This state machine makes use of operations declared in the state machines interface or internal scopes. Thus the function prototypes:
 				This state machine makes use of operations declared in the state machines interface or internal scopes. Thus the function prototypes:
-					«FOR o : operations»
-					- «o.asFunction»
-					«ENDFOR»
+					«FOR o : operations»
+					- «o.asFunction»
+					«ENDFOR»
 				are defined.
 				are defined.
-			«ENDIF»
+			«ENDIF»
 					
 					
 			These functions will be called during a 'run to completion step' (runCycle) of the statechart. 
 			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:
 			There are some constraints that have to be considered for the implementation of these functions:
@@ -56,12 +56,12 @@ class StatemachineRequired {
 			 
 			 
 			*/
 			*/
 
 
-			«FOR s : it.scopes »
-			«s.scopeFunctionPrototypes»
+			«FOR s : it.scopes »
+			«s.scopeFunctionPrototypes»
 			
 			
-			«ENDFOR»
+			«ENDFOR»
 			
 			
-			«IF timed»
+			«IF timed»
 			//
 			//
 			// This is a timed state machine that requires timer services
 			// This is a timed state machine that requires timer services
 			// 
 			// 
@@ -73,28 +73,28 @@ class StatemachineRequired {
 				\time_ms The time in milli seconds
 				\time_ms The time in milli seconds
 				\periodic Indicates the the time event must be raised periodically until the timer is unset 
 				\periodic Indicates the the time event must be raised periodically until the timer is unset 
 			*/
 			*/
-			extern void «type.toFirstLower»_setTimer(const sc_eventid evid, const sc_integer time_ms, const sc_boolean periodic);
+			extern void «type.toFirstLower»_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 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.
 				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.
 				\param evid An unique identifier of the event.
 			*/
 			*/
-			extern void «type.toFirstLower»_unsetTimer(const sc_eventid evid);
-			«ENDIF»
+			extern void «type.toFirstLower»_unsetTimer(const sc_eventid evid);
+			«ENDIF»
 			
 			
 			#ifdef __cplusplus
 			#ifdef __cplusplus
 			}
 			}
 			#endif 
 			#endif 
 			
 			
-			#endif /* «module.client.define»_H_ */
+			#endif /* «module.client.define»_H_ */
 	'''
 	'''
 	
 	
 	
 	
 	def dispatch scopeFunctionPrototypes(StatechartScope it) '''
 	def dispatch scopeFunctionPrototypes(StatechartScope it) '''
-		«FOR d : declarations »
-		«d.functionPrototypes »
-		«ENDFOR»
+		«FOR d : declarations »
+		«d.functionPrototypes »
+		«ENDFOR»
 	'''	
 	'''	
 
 
 	def dispatch scopeFunctionPrototypes(Object it) ''''''	
 	def dispatch scopeFunctionPrototypes(Object it) ''''''	
@@ -103,7 +103,7 @@ class StatemachineRequired {
 	def dispatch functionPrototypes(Declaration it) ''''''
 	def dispatch functionPrototypes(Declaration it) ''''''
 
 
 	def dispatch functionPrototypes(OperationDefinition it) '''
 	def dispatch functionPrototypes(OperationDefinition it) '''
-		extern «type.cPrimitive» «asFunction»(«FOR p : parameters SEPARATOR ', '»const «p.type.cPrimitive» «p.name.asIdentifier»«ENDFOR»);
+		extern «type.cPrimitive» «asFunction»(«FOR p : parameters SEPARATOR ', '»const «p.type.cPrimitive» «p.name.asIdentifier»«ENDFOR»);
 	'''
 	'''
 
 
 }
 }

+ 10 - 10
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/Timer.xtend

@@ -19,10 +19,10 @@ class Timer {
 	
 	
 	
 	
 	def timerHContent(ExecutionFlow it)  '''
 	def timerHContent(ExecutionFlow it)  '''
-		#ifndef «timerModule.define»_H_
-		#define «timerModule.define»_H_
+		#ifndef «timerModule.define»_H_
+		#define «timerModule.define»_H_
 		
 		
-		#include "«typesModule.h»"
+		#include "«typesModule.h»"
 		
 		
 		#ifdef __cplusplus
 		#ifdef __cplusplus
 		extern "C" {
 		extern "C" {
@@ -37,22 +37,22 @@ class Timer {
 			setTimerFPtr   setTimer;
 			setTimerFPtr   setTimer;
 			unsetTimerFPtr unsetTimer;
 			unsetTimerFPtr unsetTimer;
 		
 		
-		}  «timerType»;
+		}  «timerType»;
 		
 		
-		extern void sc_timer_setFPtr(«timerType»* handle, setTimerFPtr stfptr, unsetTimerFPtr utfptr);
-		extern void sc_timer_exit(«timerType»* handle);
+		extern void sc_timer_setFPtr(«timerType»* handle, setTimerFPtr stfptr, unsetTimerFPtr utfptr);
+		extern void sc_timer_exit(«timerType»* handle);
 		
 		
 		#ifdef __cplusplus
 		#ifdef __cplusplus
 		}
 		}
 		#endif 
 		#endif 
 		 
 		 
-		#endif /* «timerModule.define»_H_ */
+		#endif /* «timerModule.define»_H_ */
 	'''
 	'''
 		
 		
 	def timerCContent(ExecutionFlow it) '''
 	def timerCContent(ExecutionFlow it) '''
-		#include "«timerModule.h»"
+		#include "«timerModule.h»"
 		
 		
-		void sc_timer_setFPtr(«timerType»* handle, setTimerFPtr stfptr, unsetTimerFPtr utfptr)
+		void sc_timer_setFPtr(«timerType»* handle, setTimerFPtr stfptr, unsetTimerFPtr utfptr)
 		{
 		{
 		
 		
 			handle->setTimer = stfptr;
 			handle->setTimer = stfptr;
@@ -60,7 +60,7 @@ class Timer {
 		
 		
 		}
 		}
 		
 		
-		void sc_timer_exit(«timerType»* handle)
+		void sc_timer_exit(«timerType»* handle)
 		{
 		{
 		}
 		}
 	'''
 	'''

+ 3 - 3
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/Types.xtend

@@ -15,8 +15,8 @@ class Types {
 	
 	
 	
 	
 	def typesHContent(ExecutionFlow it) '''
 	def typesHContent(ExecutionFlow it) '''
-		#ifndef «typesModule.define»_H_
-		#define «typesModule.define»_H_
+		#ifndef «typesModule.define»_H_
+		#define «typesModule.define»_H_
 		
 		
 		#ifdef __cplusplus
 		#ifdef __cplusplus
 		extern "C" {
 		extern "C" {
@@ -41,6 +41,6 @@ class Types {
 		#define bool_true true
 		#define bool_true true
 		#define bool_false false
 		#define bool_false false
 
 
-		#endif /* «typesModule.define»_H_ */
+		#endif /* «typesModule.define»_H_ */
 	'''
 	'''
 }
 }

+ 18 - 18
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CMakeLists.xpt

@@ -1,39 +1,39 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart cpp file.
 Templates for the main statechart cpp file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'CMakeLists.txt'»
-«getLicenseHeaderPlain()»
+«FILE 'CMakeLists.txt'»
+«getLicenseHeaderPlain()»
 set( SRC
 set( SRC
 	Statemachine_cy.c
 	Statemachine_cy.c
 	StatemachineBase.c
 	StatemachineBase.c
 	Event.c
 	Event.c
 	EventSet.c
 	EventSet.c
 	EventPool.c
 	EventPool.c
-	«StName()».c
-	«EvName()».c
-«FOREACH this.scopes.getUsableScopes() AS interface -»
-	«interface.interfaceClassName()».c
-«ENDFOREACH»
+	«StName()».c
+	«EvName()».c
+«FOREACH this.scopes.getUsableScopes() AS interface -»
+	«interface.interfaceClassName()».c
+«ENDFOREACH»
 	Timer.c
 	Timer.c
 	DummyTimer.c
 	DummyTimer.c
 )
 )
 
 
-add_library(«StName()» ${SRC})
+add_library(«StName()» ${SRC})
 
 
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 22 - 22
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CustomEventC.xpt

@@ -1,38 +1,38 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart cpp file.
 Templates for the main statechart cpp file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE EvName()+'.c'»
-«getLicenseHeader()»
-#include "«EvName()».h"
+«FILE EvName()+'.c'»
+«getLicenseHeader()»
+#include "«EvName()».h"
 
 
 /* This is needed by the EventPool */
 /* This is needed by the EventPool */
-uint32_t «scName()»_getSizeofEvent(uint32_t evid)
+uint32_t «scName()»_getSizeofEvent(uint32_t evid)
 {
 {
 	switch((EventID) evid) {
 	switch((EventID) evid) {
 
 
-«FOREACH this.declaredEvents() AS ev -»
-  case «((EventDefinition)ev).getEventEnumName()»:
-    return sizeof(«((EventDefinition)ev).getEventName()»);
-«ENDFOREACH -»
-«FOREACH this.declaredTimerEvents() AS ev -»
-  case «((TimeEvent)ev).getEventEnumName()»:
-    return sizeof(«((TimeEvent)ev).name»);
-«ENDFOREACH -»
+«FOREACH this.declaredEvents() AS ev -»
+  case «((EventDefinition)ev).getEventEnumName()»:
+    return sizeof(«((EventDefinition)ev).getEventName()»);
+«ENDFOREACH -»
+«FOREACH this.declaredTimerEvents() AS ev -»
+  case «((TimeEvent)ev).getEventEnumName()»:
+    return sizeof(«((TimeEvent)ev).name»);
+«ENDFOREACH -»
 	default:
 	default:
 		break;
 		break;
 	}
 	}
@@ -40,6 +40,6 @@ uint32_t 
 	return(0);
 	return(0);
 }
 }
 
 
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 36 - 36
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CustomEventH.xpt

@@ -1,26 +1,26 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart cpp file.
 Templates for the main statechart cpp file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::TypeModelExtensions»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
+«EXTENSION org::yakindu::sct::generator::c::templates::TypeModelExtensions»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE EvName()+'.h'»
-«getLicenseHeader()»
-#ifndef «EVNAME()»_H_
-#define «EVNAME()»_H_
+«FILE EvName()+'.h'»
+«getLicenseHeader()»
+#ifndef «EVNAME()»_H_
+#define «EVNAME()»_H_
 
 
  
  
 #include "Event.h"
 #include "Event.h"
@@ -29,43 +29,43 @@ Templates for the main statechart cpp file.
 extern "C" {
 extern "C" {
 #endif 
 #endif 
 
 
-«REM» lost things:
-  ev_«((EventDefinition)ev).name.toLowerCase()»,
-  ev_«((TimeEvent)ev).name.toLowerCase()»,
-«ENDREM»
+«REM» lost things:
+  ev_«((EventDefinition)ev).name.toLowerCase()»,
+  ev_«((TimeEvent)ev).name.toLowerCase()»,
+«ENDREM»
 
 
 typedef enum {
 typedef enum {
-«FOREACH this.declaredEvents() AS ev -»
-  «((EventDefinition)ev).getEventEnumName()»,
-«ENDFOREACH -»
-«FOREACH this.declaredTimerEvents() AS ev -»
-  «((TimeEvent)ev).getEventEnumName()»,
-«ENDFOREACH -»
+«FOREACH this.declaredEvents() AS ev -»
+  «((EventDefinition)ev).getEventEnumName()»,
+«ENDFOREACH -»
+«FOREACH this.declaredTimerEvents() AS ev -»
+  «((TimeEvent)ev).getEventEnumName()»,
+«ENDFOREACH -»
   event_last
   event_last
 } EventID;
 } EventID;
  
  
-«FOREACH this.declaredEvents() AS ev»
+«FOREACH this.declaredEvents() AS ev»
 typedef struct { 
 typedef struct { 
   _Event baseEvent;
   _Event baseEvent;
-  «IF !((EventDefinition)ev).type.isVoid() -»
-  «asCType(((EventDefinition)ev).type)» value;    
-  «ENDIF -»
-} «((EventDefinition)ev).getEventName()»;
-«ENDFOREACH -»
-«FOREACH this.declaredTimerEvents() AS ev»
+  «IF !((EventDefinition)ev).type.isVoid() -»
+  «asCType(((EventDefinition)ev).type)» value;    
+  «ENDIF -»
+} «((EventDefinition)ev).getEventName()»;
+«ENDFOREACH -»
+«FOREACH this.declaredTimerEvents() AS ev»
 typedef struct { 
 typedef struct { 
   _Event baseEvent;
   _Event baseEvent;
-} «((TimeEvent)ev).name»;
-«ENDFOREACH»
+} «((TimeEvent)ev).name»;
+«ENDFOREACH»
  
  
-extern uint32_t «scName()»_getSizeofEvent(uint32_t evid);
+extern uint32_t «scName()»_getSizeofEvent(uint32_t evid);
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif 
 #endif 
  
  
-#endif /* «name.toUpperCase()»_H_ */
+#endif /* «name.toUpperCase()»_H_ */
 
 
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 356 - 356
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CustomStatemachineC.xpt

@@ -1,449 +1,449 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
-«IMPORT ecore»
-«IMPORT genmodel»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
+«IMPORT ecore»
+«IMPORT genmodel»
 
 
-«IMPORT org::yakindu::sct::generator::c::templates»
+«IMPORT org::yakindu::sct::generator::c::templates»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::Constants»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
+«EXTENSION org::yakindu::sct::generator::c::templates::Constants»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
  
  
-«DEFINE ActionCode FOR Step»
+«DEFINE ActionCode FOR Step»
 #warning ActionCode for Step not defined 
 #warning ActionCode for Step not defined 
-«ENDDEFINE»
-
-«DEFINE ActionCode FOR SaveHistory»
-«IF this.comment != null -»
-	/* «this.comment» */
-«ENDIF»
-	«statemachineHandleName()»->base.base.history[«region.historyVector.offset»] = «statemachineHandleName()»->base.base.state[«region.stateVector.offset»];
-«ENDDEFINE»
-
-«DEFINE ActionCode FOR HistoryEntry»
-«IF this.comment != null -»
-	/* «this.comment» */
-«ENDIF»
-if («statemachineHandleName()»->base.base.history[«region.historyVector.offset»] != last_state) {
-	«EXPAND ActionCode FOR historyStep-»
+«ENDDEFINE»
+
+«DEFINE ActionCode FOR SaveHistory»
+«IF this.comment != null -»
+	/* «this.comment» */
+«ENDIF»
+	«statemachineHandleName()»->base.base.history[«region.historyVector.offset»] = «statemachineHandleName()»->base.base.state[«region.stateVector.offset»];
+«ENDDEFINE»
+
+«DEFINE ActionCode FOR HistoryEntry»
+«IF this.comment != null -»
+	/* «this.comment» */
+«ENDIF»
+if («statemachineHandleName()»->base.base.history[«region.historyVector.offset»] != last_state) {
+	«EXPAND ActionCode FOR historyStep-»
 } else {
 } else {
-	«EXPAND ActionCode FOR initialStep-»
+	«EXPAND ActionCode FOR initialStep-»
 }
 }
 
 
-«ENDDEFINE»
-
-«DEFINE ActionCode FOR StateSwitch»
-«IF this.comment != null -»
-	/* «this.comment» */
-«ENDIF -»
-«IF this.historyRegion != null»
-	switch(((StatemachineBase*)«statemachineHandleName()»)->history[ «historyRegion.historyVector.offset» ]) {
-«ELSE»
-	switch(((StatemachineBase*)«statemachineHandleName()»)->state[ «this.stateConfigurationIdx» ]) {
-«ENDIF»
-«FOREACH this.cases AS caseid -»
-		case _«caseid.state.getStateName()» : {
-«EXPAND ActionCode FOR caseid.step-»
+«ENDDEFINE»
+
+«DEFINE ActionCode FOR StateSwitch»
+«IF this.comment != null -»
+	/* «this.comment» */
+«ENDIF -»
+«IF this.historyRegion != null»
+	switch(((StatemachineBase*)«statemachineHandleName()»)->history[ «historyRegion.historyVector.offset» ]) {
+«ELSE»
+	switch(((StatemachineBase*)«statemachineHandleName()»)->state[ «this.stateConfigurationIdx» ]) {
+«ENDIF»
+«FOREACH this.cases AS caseid -»
+		case _«caseid.state.getStateName()» : {
+«EXPAND ActionCode FOR caseid.step-»
 			break;
 			break;
 		}
 		}
-«ENDFOREACH»
+«ENDFOREACH»
 		default: break;
 		default: break;
 	}
 	}
-«ENDDEFINE »
-
-«DEFINE ActionCode FOR ScheduleTimeEvent»
-«IF this.comment != null»
-/* «this.comment» */
-«ENDIF»
-	(*((StatemachineBase*)«statemachineHandleName()»)->timer->setTimer)(«this.timeEvent.getEventEnumName()», «this.timeValue.toCCode()», «IF this.timeEvent.periodic == true -» «getBoolTrue()» «ELSE -» «getBoolFalse()» «ENDIF -»);
-«ENDDEFINE»
-
-«DEFINE ActionCode FOR UnscheduleTimeEvent»
-«IF this.comment != null»
-/* «this.comment» */
-«ENDIF»
-	(*((StatemachineBase*)«statemachineHandleName()»)->timer->unsetTimer)(«this.timeEvent.getEventEnumName()»);
-«ENDDEFINE»
-
-«DEFINE ActionCode FOR Execution»
-	«this.statement.toCCode()»;
-«ENDDEFINE»
-
-«DEFINE ActionCode FOR Call»
-«this.step.functionName()»(«IF isSingleton() == false»«this.statemachineHandleName()»«ENDIF»);
-«ENDDEFINE»
-
-«DEFINE ActionCode FOR Sequence -»
-  «EXPAND ActionCode FOREACH this.steps -»
-«ENDDEFINE»
-
-«DEFINE ActionCode FOR Check -»
-  «IF this != null -»
-«this.condition.toCCode() -»
-  «ELSE -»
- «getBoolTrue()» «
- ENDIF -»«
-  ENDDEFINE»
-
-«DEFINE ActionCode FOR CheckRef -»
-  «IF this.check != null -»
-  «getComment()-»
-  «this.check.functionName()»(«statemachineHandleName()») «ELSE -»
- «getBoolTrue()» «
-  ENDIF -»«
-ENDDEFINE»
-
-«DEFINE ActionCode FOR Reaction»
-  «EXPAND ActionCode FOR this.effect» 
-«ENDDEFINE»
-
-«DEFINE ActionCode FOR If»
-if («EXPAND ActionCode FOR this.check») { 
-  «EXPAND ActionCode FOR this.thenStep»
+«ENDDEFINE »
+
+«DEFINE ActionCode FOR ScheduleTimeEvent»
+«IF this.comment != null»
+/* «this.comment» */
+«ENDIF»
+	(*((StatemachineBase*)«statemachineHandleName()»)->timer->setTimer)(«this.timeEvent.getEventEnumName()», «this.timeValue.toCCode()», «IF this.timeEvent.periodic == true -» «getBoolTrue()» «ELSE -» «getBoolFalse()» «ENDIF -»);
+«ENDDEFINE»
+
+«DEFINE ActionCode FOR UnscheduleTimeEvent»
+«IF this.comment != null»
+/* «this.comment» */
+«ENDIF»
+	(*((StatemachineBase*)«statemachineHandleName()»)->timer->unsetTimer)(«this.timeEvent.getEventEnumName()»);
+«ENDDEFINE»
+
+«DEFINE ActionCode FOR Execution»
+	«this.statement.toCCode()»;
+«ENDDEFINE»
+
+«DEFINE ActionCode FOR Call»
+«this.step.functionName()»(«IF isSingleton() == false»«this.statemachineHandleName()»«ENDIF»);
+«ENDDEFINE»
+
+«DEFINE ActionCode FOR Sequence -»
+  «EXPAND ActionCode FOREACH this.steps -»
+«ENDDEFINE»
+
+«DEFINE ActionCode FOR Check -»
+  «IF this != null -»
+«this.condition.toCCode() -»
+  «ELSE -»
+ «getBoolTrue()» «
+ ENDIF -»«
+  ENDDEFINE»
+
+«DEFINE ActionCode FOR CheckRef -»
+  «IF this.check != null -»
+  «getComment()-»
+  «this.check.functionName()»(«statemachineHandleName()») «ELSE -»
+ «getBoolTrue()» «
+  ENDIF -»«
+ENDDEFINE»
+
+«DEFINE ActionCode FOR Reaction»
+  «EXPAND ActionCode FOR this.effect» 
+«ENDDEFINE»
+
+«DEFINE ActionCode FOR If»
+if («EXPAND ActionCode FOR this.check») { 
+  «EXPAND ActionCode FOR this.thenStep»
 }
 }
-«IF (this.elseStep != null)»
+«IF (this.elseStep != null)»
 else {
 else {
-  «EXPAND ActionCode FOR this.elseStep»
+  «EXPAND ActionCode FOR this.elseStep»
 }
 }
-«ENDIF»
-«ENDDEFINE»
-
-
-«DEFINE ActionCode FOR EnterState»
-((StatemachineBase*)«statemachineHandleName()»)->state[«this.state.stateVector.offset»] = _«this.state.getStateName()»;
-((Statemachine_cy*)«statemachineHandleName()»)->parallelPosition = «this.state.stateVector.offset»;
-«ENDDEFINE»
-
-«DEFINE ActionCode FOR ExitState»
-((StatemachineBase*)«statemachineHandleName()»)->state[«this.state.stateVector.offset»] = last_state;
-((Statemachine_cy*)«statemachineHandleName()»)->parallelPosition = «this.state.stateVector.offset»;
-«ENDDEFINE»
-
-«DEFINE ConditionMethodsProto FOR ExecutionNode -»
-  «FOREACH reactions.select(e|e.check.refs.size > 0) AS r -»
-  «IF r.check != null -»
-static sc_boolean «r.check.checkFunction()»; 
-  «ENDIF -»«ENDFOREACH -»
-«ENDDEFINE»
-
-«DEFINE ConditionMethodsImplement FOR ExecutionNode -»
-  «FOREACH reactions.select(e|e.check.refs.size > 0) AS r -»
-  «IF r.check != null -»
-sc_boolean «r.check.checkFunction()» {
-  sc_boolean retValue = «getBoolFalse()»;
-  if («r.check.condition.toCCode()»)
-    retValue = «getBoolTrue()»;
+«ENDIF»
+«ENDDEFINE»
+
+
+«DEFINE ActionCode FOR EnterState»
+((StatemachineBase*)«statemachineHandleName()»)->state[«this.state.stateVector.offset»] = _«this.state.getStateName()»;
+((Statemachine_cy*)«statemachineHandleName()»)->parallelPosition = «this.state.stateVector.offset»;
+«ENDDEFINE»
+
+«DEFINE ActionCode FOR ExitState»
+((StatemachineBase*)«statemachineHandleName()»)->state[«this.state.stateVector.offset»] = last_state;
+((Statemachine_cy*)«statemachineHandleName()»)->parallelPosition = «this.state.stateVector.offset»;
+«ENDDEFINE»
+
+«DEFINE ConditionMethodsProto FOR ExecutionNode -»
+  «FOREACH reactions.select(e|e.check.refs.size > 0) AS r -»
+  «IF r.check != null -»
+static sc_boolean «r.check.checkFunction()»; 
+  «ENDIF -»«ENDFOREACH -»
+«ENDDEFINE»
+
+«DEFINE ConditionMethodsImplement FOR ExecutionNode -»
+  «FOREACH reactions.select(e|e.check.refs.size > 0) AS r -»
+  «IF r.check != null -»
+sc_boolean «r.check.checkFunction()» {
+  sc_boolean retValue = «getBoolFalse()»;
+  if («r.check.condition.toCCode()»)
+    retValue = «getBoolTrue()»;
   
   
   return retValue;
   return retValue;
 }
 }
-  «ENDIF -»
-  «ENDFOREACH -»
-«ENDDEFINE»
-
-«DEFINE StatementMethodsProto FOR ExecutionNode -»
-  «FOREACH reactions.select(e|e.effect.caller.size > 0) AS r -»
-static void «r.effect.functionName()»(«handleAddition()»);
- «ENDFOREACH -»
-«ENDDEFINE»
-
-«DEFINE StatementMethodsImplement FOR ExecutionNode -»
-  «FOREACH reactions.select(e|e.effect.caller.size > 0) AS r -»
-void «r.effect.functionName()»(«handleAddition()»)
+  «ENDIF -»
+  «ENDFOREACH -»
+«ENDDEFINE»
+
+«DEFINE StatementMethodsProto FOR ExecutionNode -»
+  «FOREACH reactions.select(e|e.effect.caller.size > 0) AS r -»
+static void «r.effect.functionName()»(«handleAddition()»);
+ «ENDFOREACH -»
+«ENDDEFINE»
+
+«DEFINE StatementMethodsImplement FOR ExecutionNode -»
+  «FOREACH reactions.select(e|e.effect.caller.size > 0) AS r -»
+void «r.effect.functionName()»(«handleAddition()»)
 {   
 {   
-  «EXPAND ActionCode FOR r.effect -»
+  «EXPAND ActionCode FOR r.effect -»
 }
 }
-  «ENDFOREACH -»
-«ENDDEFINE»
-
-«DEFINE ReactCode FOR Sequence» 
-«EXPAND ActionCode FOREACH this.steps»
-«ENDDEFINE»
-
-«DEFINE ReactMethodsProto FOR ExecutionNode -»
-«IF (ExecutionState.isInstance(this) || this.reactSequence.caller.size > 0) -»
-static void «this.reactFunction()»;
-«REM»«stName()»_react_«this.simpleName»(«StName()»* handle);«ENDREM»
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE ReactMethodsImplement FOR ExecutionNode -»
-«IF (ExecutionState.isInstance(this) || this.reactSequence.caller.size > 0) -»
-void «this.reactFunction()-»
-«REM»void «stName()»_react_«this.simpleName»(«StName()»* handle)«ENDREM»
+  «ENDFOREACH -»
+«ENDDEFINE»
+
+«DEFINE ReactCode FOR Sequence» 
+«EXPAND ActionCode FOREACH this.steps»
+«ENDDEFINE»
+
+«DEFINE ReactMethodsProto FOR ExecutionNode -»
+«IF (ExecutionState.isInstance(this) || this.reactSequence.caller.size > 0) -»
+static void «this.reactFunction()»;
+«REM»«stName()»_react_«this.simpleName»(«StName()»* handle);«ENDREM»
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE ReactMethodsImplement FOR ExecutionNode -»
+«IF (ExecutionState.isInstance(this) || this.reactSequence.caller.size > 0) -»
+void «this.reactFunction()-»
+«REM»void «stName()»_react_«this.simpleName»(«StName()»* handle)«ENDREM»
 {
 {
-	«EXPAND ReactCode FOR reactSequence»
+	«EXPAND ReactCode FOR reactSequence»
 }
 }
-«ENDIF -»
-«ENDDEFINE»
+«ENDIF -»
+«ENDDEFINE»
 
 
 
 
-«DEFINE EnterMethodProto FOR ExecutionFlow -»
-«IF this.entryAction != null && entryAction.caller.size > 0 -»
-static void «entryAction.statemachineEntryActionFunction() -»;
-«ENDIF -»
-«ENDDEFINE»
+«DEFINE EnterMethodProto FOR ExecutionFlow -»
+«IF this.entryAction != null && entryAction.caller.size > 0 -»
+static void «entryAction.statemachineEntryActionFunction() -»;
+«ENDIF -»
+«ENDDEFINE»
 
 
-«DEFINE EnterMethodImplement FOR ExecutionFlow -»
-«IF this.entryAction != null && entryAction.caller.size > 0»
-void «entryAction.statemachineEntryActionFunction()»
+«DEFINE EnterMethodImplement FOR ExecutionFlow -»
+«IF this.entryAction != null && entryAction.caller.size > 0»
+void «entryAction.statemachineEntryActionFunction()»
 {
 {
-«EXPAND ActionCode FOR this.entryAction -»
+«EXPAND ActionCode FOR this.entryAction -»
 }
 }
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE ExitMethodProto FOR ExecutionFlow -»
-«IF this.exitAction != null && exitAction.caller.size > 0 -»
-static void «this.exitAction.statemachineExitActionFunction() -»;
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE ExitMethodImplement FOR ExecutionFlow -»
-«IF this.exitAction != null && exitAction.caller.size > 0 -»
-void «this.exitAction.statemachineExitActionFunction()»
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE ExitMethodProto FOR ExecutionFlow -»
+«IF this.exitAction != null && exitAction.caller.size > 0 -»
+static void «this.exitAction.statemachineExitActionFunction() -»;
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE ExitMethodImplement FOR ExecutionFlow -»
+«IF this.exitAction != null && exitAction.caller.size > 0 -»
+void «this.exitAction.statemachineExitActionFunction()»
 {
 {
-«EXPAND ActionCode FOR this.exitAction -»
+«EXPAND ActionCode FOR this.exitAction -»
 }
 }
-«ENDIF -»
-«ENDDEFINE»
+«ENDIF -»
+«ENDDEFINE»
 
 
 
 
 
 
-«DEFINE EnterMethodProto FOR ExecutionState -»
-«IF this.entryAction != null && entryAction.caller.size > 0 -»
-static void «entryAction.entryActionFunction()»;
-«ENDIF -»
-«ENDDEFINE»
+«DEFINE EnterMethodProto FOR ExecutionState -»
+«IF this.entryAction != null && entryAction.caller.size > 0 -»
+static void «entryAction.entryActionFunction()»;
+«ENDIF -»
+«ENDDEFINE»
 
 
-«DEFINE EnterMethodImplement FOR ExecutionState -»
-«IF this.entryAction != null && entryAction.caller.size > 0»
-void «entryAction.entryActionFunction()»
+«DEFINE EnterMethodImplement FOR ExecutionState -»
+«IF this.entryAction != null && entryAction.caller.size > 0»
+void «entryAction.entryActionFunction()»
 {
 {
-«EXPAND ActionCode FOR this.entryAction»
+«EXPAND ActionCode FOR this.entryAction»
 }
 }
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE ExitMethodProto FOR ExecutionState -»
-«IF this.exitAction != null && exitAction.caller.size > 0 -»
-static void «this.exitAction.exitActionFunction()»;
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE ExitMethodImplement FOR ExecutionState -»
-«IF this.exitAction != null && exitAction.caller.size > 0 »
-void «this.exitAction.exitActionFunction()»
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE ExitMethodProto FOR ExecutionState -»
+«IF this.exitAction != null && exitAction.caller.size > 0 -»
+static void «this.exitAction.exitActionFunction()»;
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE ExitMethodImplement FOR ExecutionState -»
+«IF this.exitAction != null && exitAction.caller.size > 0 »
+void «this.exitAction.exitActionFunction()»
 {
 {
-«EXPAND ActionCode FOR this.exitAction»
+«EXPAND ActionCode FOR this.exitAction»
 }
 }
-«ENDIF -»
-«ENDDEFINE»
+«ENDIF -»
+«ENDDEFINE»
 
 
 
 
 
 
-«DEFINE EnterSequenceProto FOR ExecutionScope -»
-«IF this.enterSequence != null && enterSequence.caller.size > 0 -»
-static void «this.enterSequence.enterSequenceFunction()»;
-«ENDIF -»
-«ENDDEFINE»
+«DEFINE EnterSequenceProto FOR ExecutionScope -»
+«IF this.enterSequence != null && enterSequence.caller.size > 0 -»
+static void «this.enterSequence.enterSequenceFunction()»;
+«ENDIF -»
+«ENDDEFINE»
 
 
-«DEFINE EnterSequenceImplement FOR ExecutionScope -»
-«IF this.enterSequence != null && enterSequence .caller.size > 0 »
-void «this.enterSequence.enterSequenceFunction()»
+«DEFINE EnterSequenceImplement FOR ExecutionScope -»
+«IF this.enterSequence != null && enterSequence .caller.size > 0 »
+void «this.enterSequence.enterSequenceFunction()»
 {
 {
-«EXPAND ActionCode FOR this.enterSequence»
+«EXPAND ActionCode FOR this.enterSequence»
 }
 }
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE ExitSequenceProto FOR ExecutionScope -»
-«IF this.exitSequence != null && exitSequence.caller.size > 0 -»
-static void «this.exitSequence.exitSequenceFunction()»;
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE ExitSequenceImplement FOR ExecutionScope -»
-«IF this.exitSequence != null && exitSequence.caller.size > 0 -»
-void «this.exitSequence.exitSequenceFunction()»
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE ExitSequenceProto FOR ExecutionScope -»
+«IF this.exitSequence != null && exitSequence.caller.size > 0 -»
+static void «this.exitSequence.exitSequenceFunction()»;
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE ExitSequenceImplement FOR ExecutionScope -»
+«IF this.exitSequence != null && exitSequence.caller.size > 0 -»
+void «this.exitSequence.exitSequenceFunction()»
 {
 {
-«EXPAND ActionCode FOR exitSequence»
+«EXPAND ActionCode FOR exitSequence»
 }
 }
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE ShallowEnterSequenceProto FOR ExecutionRegion -»
-«IF shallowEnterSequence != null && shallowEnterSequence.caller.size > 0 -»
-static void «shallowEnterSequence.shallowEnterFunction()»;
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE ShallowEnterSequenceImplement FOR ExecutionRegion -»
-«IF shallowEnterSequence != null && shallowEnterSequence.caller.size > 0 -»
-void «shallowEnterSequence.shallowEnterFunction()»
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE ShallowEnterSequenceProto FOR ExecutionRegion -»
+«IF shallowEnterSequence != null && shallowEnterSequence.caller.size > 0 -»
+static void «shallowEnterSequence.shallowEnterFunction()»;
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE ShallowEnterSequenceImplement FOR ExecutionRegion -»
+«IF shallowEnterSequence != null && shallowEnterSequence.caller.size > 0 -»
+void «shallowEnterSequence.shallowEnterFunction()»
 {
 {
-«EXPAND ActionCode FOR shallowEnterSequence»
+«EXPAND ActionCode FOR shallowEnterSequence»
 }
 }
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE DeepEnterSequenceProto FOR ExecutionRegion -»
-«IF deepEnterSequence != null && deepEnterSequence.caller.size > 0 -»
-static void «deepEnterSequence.deepEnterFunction()»;
-«ENDIF -»
-«ENDDEFINE»
-
-«DEFINE DeepEnterSequenceImplement FOR ExecutionRegion -»
-«IF deepEnterSequence != null && deepEnterSequence.caller.size > 0 -»
-void «deepEnterSequence.deepEnterFunction()»
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE DeepEnterSequenceProto FOR ExecutionRegion -»
+«IF deepEnterSequence != null && deepEnterSequence.caller.size > 0 -»
+static void «deepEnterSequence.deepEnterFunction()»;
+«ENDIF -»
+«ENDDEFINE»
+
+«DEFINE DeepEnterSequenceImplement FOR ExecutionRegion -»
+«IF deepEnterSequence != null && deepEnterSequence.caller.size > 0 -»
+void «deepEnterSequence.deepEnterFunction()»
 {
 {
-«EXPAND ActionCode FOR deepEnterSequence»
+«EXPAND ActionCode FOR deepEnterSequence»
 }
 }
-«ENDIF -»
-«ENDDEFINE»
+«ENDIF -»
+«ENDDEFINE»
 
 
 
 
-«DEFINE file FOR ExecutionFlow»
-«FILE StName()+'.c'»
-«this.getLicenseHeader()»
+«DEFINE file FOR ExecutionFlow»
+«FILE StName()+'.c'»
+«this.getLicenseHeader()»
 
 
-#define «STNAME()»_FRIENDS
+#define «STNAME()»_FRIENDS
 
 
-#include "«StName()».h"
+#include "«StName()».h"
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
 
 
-«IF this.isSingleton() == true»
+«IF this.isSingleton() == true»
 /* singleton handle and singleton handle pointer declaration */
 /* singleton handle and singleton handle pointer declaration */
-static «StName()» static_«statemachineHandleName()»;
-static «StName()»* «statemachineHandleName()»;
-«ENDIF»
+static «StName()» static_«statemachineHandleName()»;
+static «StName()»* «statemachineHandleName()»;
+«ENDIF»
 
 
 // function prototypes
 // function prototypes
 
 
-«EXPAND ConditionMethodsProto FOR this -»
-«EXPAND ConditionMethodsProto FOREACH this.states -»
-«EXPAND ConditionMethodsProto FOREACH this.nodes -»
-«EXPAND StatementMethodsProto FOR this -»
-«EXPAND StatementMethodsProto FOREACH this.states -»
-«EXPAND StatementMethodsProto FOREACH this.nodes -»
-«EXPAND EnterMethodProto FOR this -»
-«EXPAND ExitMethodProto FOR this -»
-«EXPAND EnterMethodProto FOREACH this.states -»
-«EXPAND ExitMethodProto FOREACH this.states -»
-«EXPAND EnterSequenceProto FOREACH this.states -»
-«EXPAND ExitSequenceProto FOREACH this.states -»
-«EXPAND EnterSequenceProto FOREACH this.regions -»
-«EXPAND ExitSequenceProto FOREACH this.regions -»
-«EXPAND ShallowEnterSequenceProto FOREACH this.regions -»
-«EXPAND DeepEnterSequenceProto FOREACH this.regions -»
-«EXPAND ReactMethodsProto FOREACH this.states -»
-«EXPAND ReactMethodsProto FOREACH this.nodes -»
+«EXPAND ConditionMethodsProto FOR this -»
+«EXPAND ConditionMethodsProto FOREACH this.states -»
+«EXPAND ConditionMethodsProto FOREACH this.nodes -»
+«EXPAND StatementMethodsProto FOR this -»
+«EXPAND StatementMethodsProto FOREACH this.states -»
+«EXPAND StatementMethodsProto FOREACH this.nodes -»
+«EXPAND EnterMethodProto FOR this -»
+«EXPAND ExitMethodProto FOR this -»
+«EXPAND EnterMethodProto FOREACH this.states -»
+«EXPAND ExitMethodProto FOREACH this.states -»
+«EXPAND EnterSequenceProto FOREACH this.states -»
+«EXPAND ExitSequenceProto FOREACH this.states -»
+«EXPAND EnterSequenceProto FOREACH this.regions -»
+«EXPAND ExitSequenceProto FOREACH this.regions -»
+«EXPAND ShallowEnterSequenceProto FOREACH this.regions -»
+«EXPAND DeepEnterSequenceProto FOREACH this.regions -»
+«EXPAND ReactMethodsProto FOREACH this.states -»
+«EXPAND ReactMethodsProto FOREACH this.nodes -»
 
 
 
 
 // function implementations
 // function implementations
 
 
-«EXPAND ConditionMethodsImplement FOR this -»
-«EXPAND ConditionMethodsImplement FOREACH this.states -»
-«EXPAND ConditionMethodsImplement FOREACH this.nodes -»
-«EXPAND StatementMethodsImplement FOR this -»
-«EXPAND StatementMethodsImplement FOREACH this.states -»
-«EXPAND StatementMethodsImplement FOREACH this.nodes -»
-«EXPAND EnterMethodImplement FOR this -»
-«EXPAND ExitMethodImplement FOR this -»
-«EXPAND EnterMethodImplement FOREACH this.states -»
-«EXPAND ExitMethodImplement FOREACH this.states -»
-«EXPAND EnterSequenceImplement FOREACH this.states -»
-«EXPAND ExitSequenceImplement FOREACH this.states -»
-«EXPAND EnterSequenceImplement FOREACH this.regions -»
-«EXPAND ExitSequenceImplement FOREACH this.regions -»
-«EXPAND ShallowEnterSequenceImplement FOREACH this.regions -»
-«EXPAND DeepEnterSequenceImplement FOREACH this.regions -»
-«EXPAND ReactMethodsImplement FOREACH this.states -»
-«EXPAND ReactMethodsImplement FOREACH this.nodes -»
-
-void «stName()»_init(«this.handleAdditionComma()» Timer* timer, EventPool* eventPool)
+«EXPAND ConditionMethodsImplement FOR this -»
+«EXPAND ConditionMethodsImplement FOREACH this.states -»
+«EXPAND ConditionMethodsImplement FOREACH this.nodes -»
+«EXPAND StatementMethodsImplement FOR this -»
+«EXPAND StatementMethodsImplement FOREACH this.states -»
+«EXPAND StatementMethodsImplement FOREACH this.nodes -»
+«EXPAND EnterMethodImplement FOR this -»
+«EXPAND ExitMethodImplement FOR this -»
+«EXPAND EnterMethodImplement FOREACH this.states -»
+«EXPAND ExitMethodImplement FOREACH this.states -»
+«EXPAND EnterSequenceImplement FOREACH this.states -»
+«EXPAND ExitSequenceImplement FOREACH this.states -»
+«EXPAND EnterSequenceImplement FOREACH this.regions -»
+«EXPAND ExitSequenceImplement FOREACH this.regions -»
+«EXPAND ShallowEnterSequenceImplement FOREACH this.regions -»
+«EXPAND DeepEnterSequenceImplement FOREACH this.regions -»
+«EXPAND ReactMethodsImplement FOREACH this.states -»
+«EXPAND ReactMethodsImplement FOREACH this.nodes -»
+
+void «stName()»_init(«this.handleAdditionComma()» Timer* timer, EventPool* eventPool)
 {
 {
 	int i;
 	int i;
 	
 	
-«IF this.isSingleton()»
-	«statemachineHandleName()» = &static_«statemachineHandleName()»;
-«ENDIF»
-	statemachine_cy_init(&«statemachineHandleName()»->base, MAX_PARALLEL_STATES, MAX_HISTORY_STATES,
+«IF this.isSingleton()»
+	«statemachineHandleName()» = &static_«statemachineHandleName()»;
+«ENDIF»
+	statemachine_cy_init(&«statemachineHandleName()»->base, MAX_PARALLEL_STATES, MAX_HISTORY_STATES,
 			event_last, timer, eventPool);
 			event_last, timer, eventPool);
 
 
 	for (i = 0; i<MAX_PARALLEL_STATES; ++i)
 	for (i = 0; i<MAX_PARALLEL_STATES; ++i)
-		«statemachineHandleName()»->base.base.state[i] = last_state;
+		«statemachineHandleName()»->base.base.state[i] = last_state;
 			
 			
 	for (i = 0; i<MAX_HISTORY_STATES; ++i)
 	for (i = 0; i<MAX_HISTORY_STATES; ++i)
-		«statemachineHandleName()»->base.base.history[i] = last_state;
-
-«FOREACH this.scopes.getUsableScopes() AS interface -»
-«IF this.isSingleton() -»
-     «interface.interfaceName()»_set_interface_singleton(&«statemachineHandleName()»->«interface.interfaceObjectName()»);
-     «interface.interfaceName()»_init(&«statemachineHandleName()»->base, &«statemachineHandleName()»->base.eventSet, eventPool);
-«ELSE -»
-	«interface.interfaceName()»_init(&«statemachineHandleName()»->«interface.interfaceObjectName().toFirstLower()», 
-	&«statemachineHandleName()»->base, &«statemachineHandleName()»->base.eventSet, eventPool);
-«ENDIF»
-
-«FOREACH interface.getInEvents() AS event -»
-	eventSet_set_type(&«statemachineHandleName()»->base.eventSet, «event.getEventEnumName()», ev_type_input); 
-«ENDFOREACH -»
-«FOREACH interface.getOutEvents() AS event -»
-	eventSet_set_type(&«statemachineHandleName()»->base.eventSet, «event.getEventEnumName()», ev_type_output); 
-«ENDFOREACH -»
-«FOREACH interface.getLocalEvents() AS event -»
-	eventSet_set_type(&«statemachineHandleName()»->base.eventSet, «event.getEventEnumName()», ev_type_local); 
-«ENDFOREACH -»
-«ENDFOREACH»	
+		«statemachineHandleName()»->base.base.history[i] = last_state;
+
+«FOREACH this.scopes.getUsableScopes() AS interface -»
+«IF this.isSingleton() -»
+     «interface.interfaceName()»_set_interface_singleton(&«statemachineHandleName()»->«interface.interfaceObjectName()»);
+     «interface.interfaceName()»_init(&«statemachineHandleName()»->base, &«statemachineHandleName()»->base.eventSet, eventPool);
+«ELSE -»
+	«interface.interfaceName()»_init(&«statemachineHandleName()»->«interface.interfaceObjectName().toFirstLower()», 
+	&«statemachineHandleName()»->base, &«statemachineHandleName()»->base.eventSet, eventPool);
+«ENDIF»
+
+«FOREACH interface.getInEvents() AS event -»
+	eventSet_set_type(&«statemachineHandleName()»->base.eventSet, «event.getEventEnumName()», ev_type_input); 
+«ENDFOREACH -»
+«FOREACH interface.getOutEvents() AS event -»
+	eventSet_set_type(&«statemachineHandleName()»->base.eventSet, «event.getEventEnumName()», ev_type_output); 
+«ENDFOREACH -»
+«FOREACH interface.getLocalEvents() AS event -»
+	eventSet_set_type(&«statemachineHandleName()»->base.eventSet, «event.getEventEnumName()», ev_type_local); 
+«ENDFOREACH -»
+«ENDFOREACH»	
 }
 }
 
 
-«IF this.isSingleton() == true»
-«StName()»* «scName()»_get_handle()
-{ return «statemachineHandleName()»; } 
-«ENDIF»
-«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface»
-extern «interface.interfaceClassName()»* «stName()»_get_«interface.interfaceObjectName()»(«handleAddition()»)
-{  return &«statemachineHandleName()»->«interface.interfaceObjectName()»; }
-«ENDFOREACH»
+«IF this.isSingleton() == true»
+«StName()»* «scName()»_get_handle()
+{ return «statemachineHandleName()»; } 
+«ENDIF»
+«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface»
+extern «interface.interfaceClassName()»* «stName()»_get_«interface.interfaceObjectName()»(«handleAddition()»)
+{  return &«statemachineHandleName()»->«interface.interfaceObjectName()»; }
+«ENDFOREACH»
 
 
-void «stName()»_enter(«handleAddition()»)
+void «stName()»_enter(«handleAddition()»)
 {
 {
-	«EXPAND ActionCode FOR this.enterSequence»
+	«EXPAND ActionCode FOR this.enterSequence»
 }
 }
 
 
-void «stName()»_exit(«handleAddition()»)
+void «stName()»_exit(«handleAddition()»)
 {
 {
-	«EXPAND ActionCode FOR this.exitSequence»
+	«EXPAND ActionCode FOR this.exitSequence»
 }
 }
 
 
-void «stName()»_destruct(«handleAddition()»)
+void «stName()»_destruct(«handleAddition()»)
 {
 {
-	statemachine_cy_destruct(&«statemachineHandleName()»->base);
+	statemachine_cy_destruct(&«statemachineHandleName()»->base);
 }
 }
 
 
-void «stName()»_runCycle(«handleAddition()»)
+void «stName()»_runCycle(«handleAddition()»)
 {
 {
-	statemachine_cy_runCycle(&«statemachineHandleName()»->base);
+	statemachine_cy_runCycle(&«statemachineHandleName()»->base);
 }
 }
 
 
-void «stName()»_setEvent(«handleAdditionComma()» _Event* ev)
+void «stName()»_setEvent(«handleAdditionComma()» _Event* ev)
 {
 {
-	statemachine_cy_setEvent(&«statemachineHandleName()»->base, ev);
+	statemachine_cy_setEvent(&«statemachineHandleName()»->base, ev);
 }
 }
 
 
-sc_boolean «stName()»_eventWaiting(«handleAddition()»)
+sc_boolean «stName()»_eventWaiting(«handleAddition()»)
 {
 {
-	return statemachine_cy_eventWaiting(&«statemachineHandleName()»->base);
+	return statemachine_cy_eventWaiting(&«statemachineHandleName()»->base);
 }
 }
 
 
 void statemachine_cy__runCycle(Statemachine_cy* handle)
 void statemachine_cy__runCycle(Statemachine_cy* handle)
@@ -452,17 +452,17 @@ void statemachine_cy__runCycle(Statemachine_cy* handle)
 	     handle->parallelPosition<MAX_PARALLEL_STATES; 
 	     handle->parallelPosition<MAX_PARALLEL_STATES; 
 	     ++handle->parallelPosition) {
 	     ++handle->parallelPosition) {
 		switch(((StatemachineBase*)handle)->state[handle->parallelPosition]) {
 		switch(((StatemachineBase*)handle)->state[handle->parallelPosition]) {
-	«FOREACH this.states AS state»
-	    case _«state.getStateName()»:
-			«state.reactFunctionName()»(«IF isSingleton() == false»(«StName()»*) handle«ENDIF»);
+	«FOREACH this.states AS state»
+	    case _«state.getStateName()»:
+			«state.reactFunctionName()»(«IF isSingleton() == false»(«StName()»*) handle«ENDIF»);
 	        break;
 	        break;
-	«ENDFOREACH»
+	«ENDFOREACH»
 		default:
 		default:
 			/* no state found */
 			/* no state found */
 			break;
 			break;
 		}
 		}
 	}
 	}
 }
 }
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 55 - 55
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/CustomStatemachineHOOW.xpt

@@ -1,52 +1,52 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart cpp file.
 Templates for the main statechart cpp file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::Constants»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
-«EXTENSION org::yakindu::sct::generator::c::templates::NamingOO»
+«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
+«EXTENSION org::yakindu::sct::generator::c::templates::Constants»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::NamingOO»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE StName()+'OOW.hpp'»
-«this.getLicenseHeader()»
+«FILE StName()+'OOW.hpp'»
+«this.getLicenseHeader()»
 
 
-#ifndef «STNAME()»OOW_H_
-#define «STNAME()»OOW_H_
+#ifndef «STNAME()»OOW_H_
+#define «STNAME()»OOW_H_
 
 
 #include <vector>
 #include <vector>
 
 
-#include "«StName()».h"
-«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface -»
-#include "«interface.interfaceClassNameOOW()».hpp"
-«ENDFOREACH -»
+#include "«StName()».h"
+«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface -»
+#include "«interface.interfaceClassNameOOW()».hpp"
+«ENDFOREACH -»
 
 
-class «StName()»OOW {
+class «StName()»OOW {
 
 
 private:
 private:
-    «StName()» «stName()»;
+    «StName()» «stName()»;
 	EventPool eventPool;
 	EventPool eventPool;
 
 
-«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface -»
-	«interface.interfaceClassNameOOW()»* «interface.interfaceObjectNameOOW()»;
-«ENDFOREACH -»
+«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface -»
+	«interface.interfaceClassNameOOW()»* «interface.interfaceObjectNameOOW()»;
+«ENDFOREACH -»
 
 
 	static const int MAXEVENTSPERTYPE=4;
 	static const int MAXEVENTSPERTYPE=4;
 
 
 
 
 public:
 public:
 
 
-   «StName()»OOW(Timer* timer);
-   virtual ~«StName()»OOW();
+   «StName()»OOW(Timer* timer);
+   virtual ~«StName()»OOW();
    void enter();
    void enter();
    void exit();
    void exit();
    void runCycle();
    void runCycle();
@@ -54,80 +54,80 @@ public:
 
 
    std::vector<States> getStates(); 
    std::vector<States> getStates(); 
 
 
-«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface -»
-   «interface.interfaceClassNameOOW()»* get_«interface.interfaceObjectNameOOW()»();
-«ENDFOREACH -»
+«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface -»
+   «interface.interfaceClassNameOOW()»* get_«interface.interfaceObjectNameOOW()»();
+«ENDFOREACH -»
 
 
 };
 };
 
 
-inline «StName()»OOW::«StName()»OOW(Timer* timer)
+inline «StName()»OOW::«StName()»OOW(Timer* timer)
 {
 {
 	/* Set up Event Pool */
 	/* Set up Event Pool */
-	«scName()»_eventPool_init_heap(&eventPool, MAXEVENTSPERTYPE);
+	«scName()»_eventPool_init_heap(&eventPool, MAXEVENTSPERTYPE);
 
 
 	/* initialize state machine */
 	/* initialize state machine */
-	«stName()»_init(&«stName()», timer, &eventPool);
+	«stName()»_init(&«stName()», timer, &eventPool);
 
 
 	/* call all necessary enter functions */
 	/* call all necessary enter functions */
-	«stName()»_enter(&«stName()»);
+	«stName()»_enter(&«stName()»);
 	
 	
-«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface -»
-	«interface.interfaceObjectNameOOW()» = new «interface.interfaceClassNameOOW()»(&«stName()»);
-«ENDFOREACH -»
+«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface -»
+	«interface.interfaceObjectNameOOW()» = new «interface.interfaceClassNameOOW()»(&«stName()»);
+«ENDFOREACH -»
 }
 }
 
 
-inline «StName()»OOW::~«StName()»OOW()
+inline «StName()»OOW::~«StName()»OOW()
 {
 {
 	/* call all exit actions for this state machine */
 	/* call all exit actions for this state machine */
-	«stName()»_exit(&«stName()»);
+	«stName()»_exit(&«stName()»);
 
 
 	/* free all internal memory for this state machine */
 	/* free all internal memory for this state machine */
-	«stName()»_destruct(&«stName()»);
+	«stName()»_destruct(&«stName()»);
 
 
 	/* free all events in the event pool */
 	/* free all events in the event pool */
 	eventPool_exit(&eventPool);
 	eventPool_exit(&eventPool);
 
 
 }
 }
 
 
-inline void «StName()»OOW::enter()
+inline void «StName()»OOW::enter()
 {
 {
-	«stName()»_enter(&«stName()»);
+	«stName()»_enter(&«stName()»);
 }
 }
 
 
-inline void «StName()»OOW::exit()
+inline void «StName()»OOW::exit()
 {
 {
-	«stName()»_exit(&«stName()»);
+	«stName()»_exit(&«stName()»);
 }
 }
 
 
-inline void «StName()»OOW::runCycle()
+inline void «StName()»OOW::runCycle()
 {
 {
-	«stName()»_runCycle(&«stName()»);
+	«stName()»_runCycle(&«stName()»);
 }
 }
 
 
-inline sc_boolean «StName()»OOW::eventWaiting()
+inline sc_boolean «StName()»OOW::eventWaiting()
 {
 {
-	return «stName()»_eventWaiting(&«stName()»);
+	return «stName()»_eventWaiting(&«stName()»);
 }
 }
 
 
-«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface -»
-inline «interface.interfaceClassNameOOW()»* «StName()»OOW::get_«interface.interfaceObjectNameOOW()»()
+«FOREACH this.scopes.typeSelect(InterfaceScope) AS interface -»
+inline «interface.interfaceClassNameOOW()»* «StName()»OOW::get_«interface.interfaceObjectNameOOW()»()
 {
 {
-	return «interface.interfaceObjectNameOOW()»;
+	return «interface.interfaceObjectNameOOW()»;
 }
 }
-«ENDFOREACH -»
+«ENDFOREACH -»
 
 
-inline std::vector<States> «StName()»OOW::getStates()
+inline std::vector<States> «StName()»OOW::getStates()
 {
 {
 	std::vector<States> states;
 	std::vector<States> states;
 	for(int i(0); i<MAX_PARALLEL_STATES; ++i) {
 	for(int i(0); i<MAX_PARALLEL_STATES; ++i) {
-	  states.push_back((States)«stName()».base.base.state[i]);
+	  states.push_back((States)«stName()».base.base.state[i]);
 	}
 	}
 	return states;
 	return states;
 }
 }
 
 
-#endif // «STNAME()»OOW_H_
+#endif // «STNAME()»OOW_H_
 
 
 
 
 
 
-«ENDFILE»
-«ENDDEFINE»
+«ENDFILE»
+«ENDDEFINE»

+ 13 - 13
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/DummyTimer.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'DummyTimer.h'»
-«getLicenseHeader()»
+«FILE 'DummyTimer.h'»
+«getLicenseHeader()»
 #ifndef DUMMYTIMER_H_
 #ifndef DUMMYTIMER_H_
 #define DUMMYTIMER_H_
 #define DUMMYTIMER_H_
 
 
@@ -37,9 +37,9 @@ extern void dummyTimer_init(Timer* handle);
 #endif 
 #endif 
  
  
 #endif /* DUMMYTIMER_H_ */
 #endif /* DUMMYTIMER_H_ */
-«ENDFILE»
+«ENDFILE»
 
 
-«FILE 'DummyTimer.c'»
+«FILE 'DummyTimer.c'»
 #include "DummyTimer.h"
 #include "DummyTimer.h"
 #include <stdio.h>
 #include <stdio.h>
 
 
@@ -57,6 +57,6 @@ void dummyTimer_init(Timer* handle)
 {
 {
 	timer_setFPtr(handle, &setTimer, &unsetTimer);
 	timer_setFPtr(handle, &setTimer, &unsetTimer);
 }
 }
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventC.xpt

@@ -1,27 +1,27 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'Event.c'»
-«getLicenseHeader()»
+«FILE 'Event.c'»
+«getLicenseHeader()»
 #include "Event.h"
 #include "Event.h"
 
 
 void _event_init(_Event* handle, uint32_t id)
 void _event_init(_Event* handle, uint32_t id)
 {
 {
 	handle->id = id;
 	handle->id = id;
 }
 }
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventH.xpt

@@ -1,22 +1,22 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'Event.h'»
-«getLicenseHeader()»
+«FILE 'Event.h'»
+«getLicenseHeader()»
 #ifndef EVENT_H_
 #ifndef EVENT_H_
 #define EVENT_H_
 #define EVENT_H_
 
 
@@ -40,6 +40,6 @@ typedef void(*handleEvent)(_Event ev);
 #endif 
 #endif 
  
  
 #endif /* EVENT_H_ */
 #endif /* EVENT_H_ */
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventPoolC.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'EventPool.c'»
-«getLicenseHeader()»
+«FILE 'EventPool.c'»
+«getLicenseHeader()»
 #include "EventPool.h"
 #include "EventPool.h"
 #include <stdlib.h>
 #include <stdlib.h>
 
 
@@ -119,6 +119,6 @@ void eventPool_exit(EventPool* handle)
 	free(handle->typePoolMemPtr);
 	free(handle->typePoolMemPtr);
 	handle->typePoolMemPtr = 0;
 	handle->typePoolMemPtr = 0;
 }
 }
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventPoolH.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'EventPool.h'»
-«getLicenseHeader()»
+«FILE 'EventPool.h'»
+«getLicenseHeader()»
 #ifndef EVENTPOOL_H_
 #ifndef EVENTPOOL_H_
 #define EVENTPOOL_H_
 #define EVENTPOOL_H_
 
 
@@ -60,6 +60,6 @@ extern void eventPool_exit(EventPool* handle);
 #endif 
 #endif 
  
  
 #endif /* EVENTPOOL_H_ */
 #endif /* EVENTPOOL_H_ */
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventSetC.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'EventSet.c'»
-«getLicenseHeader()»
+«FILE 'EventSet.c'»
+«getLicenseHeader()»
 #include "EventSet.h"
 #include "EventSet.h"
 #include <stdlib.h>
 #include <stdlib.h>
 
 
@@ -132,6 +132,6 @@ void eventSet_clean_single(EventSet* handle, const uint32_t evid)
 	}
 	}
 }
 }
 
 
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/EventSetH.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'EventSet.h'»
-«getLicenseHeader()»
+«FILE 'EventSet.h'»
+«getLicenseHeader()»
 #ifndef EVENTSET_H_
 #ifndef EVENTSET_H_
 #define EVENTSET_H_
 #define EVENTSET_H_
 
 
@@ -60,6 +60,6 @@ extern void eventSet_clean_output(EventSet* handle);
 #endif 
 #endif 
  
  
 #endif /* EVENTSET_H_ */
 #endif /* EVENTSET_H_ */
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 66 - 66
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/InterfaceOOW.xpt

@@ -1,108 +1,108 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart cpp file.
 Templates for the main statechart cpp file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::TypeModelExtensions»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
-«EXTENSION org::yakindu::sct::generator::c::templates::NamingOO»
+«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
+«EXTENSION org::yakindu::sct::generator::c::templates::TypeModelExtensions»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::NamingOO»
 
 
-«DEFINE file FOR ExecutionFlow»
-«FOREACH this.scopes.getUsableScopes() AS interface»
-«FILE interface.interfaceClassNameOOW()+".hpp"»
-«this.getLicenseHeader()»
+«DEFINE file FOR ExecutionFlow»
+«FOREACH this.scopes.getUsableScopes() AS interface»
+«FILE interface.interfaceClassNameOOW()+".hpp"»
+«this.getLicenseHeader()»
  
  
-#ifndef «interface.interfaceClassNameOOW().toUpperCase()»_H_
-#define «interface.interfaceClassNameOOW().toUpperCase()»_H_
+#ifndef «interface.interfaceClassNameOOW().toUpperCase()»_H_
+#define «interface.interfaceClassNameOOW().toUpperCase()»_H_
 
 
 #include "definition.h"
 #include "definition.h"
-#include "«interface.interfaceClassName()».h"
-#include "«StName()».h"
+#include "«interface.interfaceClassName()».h"
+#include "«StName()».h"
 
 
-class «interface.interfaceClassNameOOW()» {
+class «interface.interfaceClassNameOOW()» {
 private:
 private:
-	«interface.interfaceClassName()»* «interface.interfaceObjectName()»;
+	«interface.interfaceClassName()»* «interface.interfaceObjectName()»;
 public:
 public:
-	«interface.interfaceClassNameOOW()»(«this.StName()»* iface);
-	virtual ~«interface.interfaceClassNameOOW()»();
+	«interface.interfaceClassNameOOW()»(«this.StName()»* iface);
+	virtual ~«interface.interfaceClassNameOOW()»();
 
 
-«FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
-    «asCType(variable.type)» get_«variable.name»();
-«IF variable.readonly == false -»
-    void set_«variable.name»(«asCType(variable.type)» value);
-«ENDIF»
-«ENDFOREACH» 
+«FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
+    «asCType(variable.type)» get_«variable.name»();
+«IF variable.readonly == false -»
+    void set_«variable.name»(«asCType(variable.type)» value);
+«ENDIF»
+«ENDFOREACH» 
 
 
-«FOREACH interface.declarations.typeSelect(OperationDefinition) AS operation -»
-    «asCType(operation.type)» «operation.name»(«
-	FOREACH operation.parameters AS param ITERATOR iter»«IF iter.counter0>0», «ENDIF»«asCType(param.type)» «param.name»«ENDFOREACH»);
-«ENDFOREACH» 
+«FOREACH interface.declarations.typeSelect(OperationDefinition) AS operation -»
+    «asCType(operation.type)» «operation.name»(«
+	FOREACH operation.parameters AS param ITERATOR iter»«IF iter.counter0>0», «ENDIF»«asCType(param.type)» «param.name»«ENDFOREACH»);
+«ENDFOREACH» 
 
 
-«FOREACH interface.getOutEvents() AS event -»
-    sc_boolean is_«event.name»_raised(«IF !event.type.isVoid() -»«event.type.asCType()»* value«ENDIF» );
-«ENDFOREACH»
+«FOREACH interface.getOutEvents() AS event -»
+    sc_boolean is_«event.name»_raised(«IF !event.type.isVoid() -»«event.type.asCType()»* value«ENDIF» );
+«ENDFOREACH»
 
 
-«FOREACH interface.getInEvents() AS event -»
-    void raise_«event.name»(«IF !event.type.isVoid() -»«event.type.asCType()» value «ENDIF»);
-«ENDFOREACH» 
+«FOREACH interface.getInEvents() AS event -»
+    void raise_«event.name»(«IF !event.type.isVoid() -»«event.type.asCType()» value «ENDIF»);
+«ENDFOREACH» 
 
 
 };
 };
 
 
-inline «interface.interfaceClassNameOOW()»::«interface.interfaceClassNameOOW()»(«this.StName()»* statemachine)
+inline «interface.interfaceClassNameOOW()»::«interface.interfaceClassNameOOW()»(«this.StName()»* statemachine)
 {
 {
-	«interface.interfaceObjectName()» = «stName()»_get_«interface.interfaceObjectName()»(statemachine);
+	«interface.interfaceObjectName()» = «stName()»_get_«interface.interfaceObjectName()»(statemachine);
 }
 }
 
 
-inline «interface.interfaceClassNameOOW()»::~«interface.interfaceClassNameOOW()»()
+inline «interface.interfaceClassNameOOW()»::~«interface.interfaceClassNameOOW()»()
 {
 {
 }
 }
 
 
-«FOREACH interface.getOutEvents() AS event -»
-inline sc_boolean «interface.interfaceClassNameOOW()»::is_«event.name»_raised(«IF !event.type.isVoid() -»«event.type.asCType()»* value«ENDIF» )
+«FOREACH interface.getOutEvents() AS event -»
+inline sc_boolean «interface.interfaceClassNameOOW()»::is_«event.name»_raised(«IF !event.type.isVoid() -»«event.type.asCType()»* value«ENDIF» )
 {
 {
-  return «interface.interfaceName()»_is_«event.name»_raised(«interface.interfaceObjectName()»«IF !event.type.isVoid() -», value«ENDIF» );
+  return «interface.interfaceName()»_is_«event.name»_raised(«interface.interfaceObjectName()»«IF !event.type.isVoid() -», value«ENDIF» );
 
 
 }
 }
-«ENDFOREACH»
+«ENDFOREACH»
 
 
-«FOREACH interface.getInEvents() AS event -»
-inline void «interface.interfaceClassNameOOW()»::raise_«event.name»(«IF !event.type.isVoid() -»«event.type.asCType()» value «ENDIF»)
+«FOREACH interface.getInEvents() AS event -»
+inline void «interface.interfaceClassNameOOW()»::raise_«event.name»(«IF !event.type.isVoid() -»«event.type.asCType()» value «ENDIF»)
 {
 {
-	«interface.interfaceName()»_raise_«event.name»(«interface.interfaceObjectName()»«IF !event.type.isVoid() -», value«ENDIF»);
+	«interface.interfaceName()»_raise_«event.name»(«interface.interfaceObjectName()»«IF !event.type.isVoid() -», value«ENDIF»);
 }
 }
-«ENDFOREACH» 
+«ENDFOREACH» 
 
 
-«FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
-inline «asCType(variable.type)» «interface.interfaceClassNameOOW()»::get_«variable.name»()
+«FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
+inline «asCType(variable.type)» «interface.interfaceClassNameOOW()»::get_«variable.name»()
 {
 {
-	return «interface.interfaceName()»_get_«variable.name.toFirstLower()»(«interface.interfaceObjectName()»); 
+	return «interface.interfaceName()»_get_«variable.name.toFirstLower()»(«interface.interfaceObjectName()»); 
 }
 }
-«IF variable.readonly == false -»
-inline void «interface.interfaceClassNameOOW()»::set_«variable.name»(«asCType(variable.type)» value)
+«IF variable.readonly == false -»
+inline void «interface.interfaceClassNameOOW()»::set_«variable.name»(«asCType(variable.type)» value)
 {
 {
-	«interface.interfaceName()»_set_«variable.name.toFirstLower()»(«interface.interfaceObjectName()», value);
+	«interface.interfaceName()»_set_«variable.name.toFirstLower()»(«interface.interfaceObjectName()», value);
 }
 }
-«ENDIF»
-«ENDFOREACH» 
-
-«FOREACH interface.declarations.typeSelect(OperationDefinition) AS operation»
-inline «asCType(operation.type)» «interface.interfaceClassNameOOW()»::«operation.name»(«
-	FOREACH operation.parameters AS param ITERATOR iter»«IF iter.counter0>0», «ENDIF»«asCType(param.type)» «param.name»«ENDFOREACH») {
-	«IF !operation.type.isVoid()»return «ENDIF»«operation.getMethodName()»(«interface.interfaceObjectName()»«IF !isSingleton()», «ENDIF»«
-	FOREACH operation.parameters AS param ITERATOR iter»«IF iter.counter0>0», «ENDIF»«param.name»«ENDFOREACH»);
+«ENDIF»
+«ENDFOREACH» 
+
+«FOREACH interface.declarations.typeSelect(OperationDefinition) AS operation»
+inline «asCType(operation.type)» «interface.interfaceClassNameOOW()»::«operation.name»(«
+	FOREACH operation.parameters AS param ITERATOR iter»«IF iter.counter0>0», «ENDIF»«asCType(param.type)» «param.name»«ENDFOREACH») {
+	«IF !operation.type.isVoid()»return «ENDIF»«operation.getMethodName()»(«interface.interfaceObjectName()»«IF !isSingleton()», «ENDIF»«
+	FOREACH operation.parameters AS param ITERATOR iter»«IF iter.counter0>0», «ENDIF»«param.name»«ENDFOREACH»);
 }
 }
-«ENDFOREACH» 
+«ENDFOREACH» 
 
 
 #endif
 #endif
 
 
-«ENDFILE»
-«ENDFOREACH»
-«ENDDEFINE»
+«ENDFILE»
+«ENDFOREACH»
+«ENDDEFINE»

+ 132 - 132
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Interfaces.xpt

@@ -1,34 +1,34 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart cpp file.
 Templates for the main statechart cpp file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::TypeModelExtensions»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
+«EXTENSION org::yakindu::sct::generator::c::templates::TypeModelExtensions»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
 
 
-«DEFINE file FOR ExecutionFlow»
-«FOREACH this.scopes.getUsableScopes() AS interface»
-«FILE interface.interfaceClassName()+".h"»
-«this.getLicenseHeader()»
+«DEFINE file FOR ExecutionFlow»
+«FOREACH this.scopes.getUsableScopes() AS interface»
+«FILE interface.interfaceClassName()+".h"»
+«this.getLicenseHeader()»
 
 
-#ifndef «interface.interfaceClassName().toUpperCase()»_H_
-#define «interface.interfaceClassName().toUpperCase()»_H_
+#ifndef «interface.interfaceClassName().toUpperCase()»_H_
+#define «interface.interfaceClassName().toUpperCase()»_H_
 
 
 #include "definition.h"
 #include "definition.h"
 #include "Event.h"
 #include "Event.h"
 #include "EventSet.h"
 #include "EventSet.h"
 #include "EventPool.h"
 #include "EventPool.h"
 #include "Statemachine_cy.h"
 #include "Statemachine_cy.h"
-#include "«EvName()».h"
+#include "«EvName()».h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {
@@ -41,62 +41,62 @@ typedef struct {
 	handleEvent handleEventCallback;
 	handleEvent handleEventCallback;
 #else
 #else
 	EventPool* eventPool;
 	EventPool* eventPool;
-«IF InternalScope.isInstance(interface) -»
-«FOREACH interface.declarations.typeSelect(EventDefinition) AS event -»
-    _Event* «event.getEventName()»;
-«ENDFOREACH -»
-«ELSE -»
-«FOREACH interface.getOutEvents() AS event -»
-    _Event* «event.getEventName()»;
-«ENDFOREACH -»
-«ENDIF -»
+«IF InternalScope.isInstance(interface) -»
+«FOREACH interface.declarations.typeSelect(EventDefinition) AS event -»
+    _Event* «event.getEventName()»;
+«ENDFOREACH -»
+«ELSE -»
+«FOREACH interface.getOutEvents() AS event -»
+    _Event* «event.getEventName()»;
+«ENDFOREACH -»
+«ENDIF -»
 #endif // INTERFACE_LISTENER
 #endif // INTERFACE_LISTENER
 
 
-«FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
-	«variable.type.asCType()» «variable.getName()»;
-«ENDFOREACH» 
+«FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
+	«variable.type.asCType()» «variable.getName()»;
+«ENDFOREACH» 
 	
 	
-} «interfaceClassName(interface)»;
+} «interfaceClassName(interface)»;
 
 
-«IF this.isSingleton()»
-void «interface.interfaceName()»_set_interface_singleton(«interfaceClassName(interface)»* _handle);
-«ENDIF»
+«IF this.isSingleton()»
+void «interface.interfaceName()»_set_interface_singleton(«interfaceClassName(interface)»* _handle);
+«ENDIF»
 
 
-«FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
-extern «asCType(variable.type)» «interface.interfaceName()»_get_«variable.getName()»(«handleInterfaceAddition(interface)»);
-«IF variable.readonly == false -»
-extern void «interface.interfaceName()»_set_«variable.getName()»(«handleInterfaceAdditionComma(interface)»«asCType(variable.type)» value);
-«ENDIF»
-«ENDFOREACH» 
+«FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
+extern «asCType(variable.type)» «interface.interfaceName()»_get_«variable.getName()»(«handleInterfaceAddition(interface)»);
+«IF variable.readonly == false -»
+extern void «interface.interfaceName()»_set_«variable.getName()»(«handleInterfaceAdditionComma(interface)»«asCType(variable.type)» value);
+«ENDIF»
+«ENDFOREACH» 
 
 
-«FOREACH interface.declarations.typeSelect(OperationDefinition) AS operation -»
-extern «asCType(operation.type)» «operation.getMethodName()»(«handleInterfaceAddition(interface)»«IF !isSingleton()», «ENDIF»«
-	FOREACH operation.parameters AS param ITERATOR iter»«IF iter.counter0>0», «ENDIF»«asCType(param.type)» «param.name»«ENDFOREACH»);
-«ENDFOREACH» 
+«FOREACH interface.declarations.typeSelect(OperationDefinition) AS operation -»
+extern «asCType(operation.type)» «operation.getMethodName()»(«handleInterfaceAddition(interface)»«IF !isSingleton()», «ENDIF»«
+	FOREACH operation.parameters AS param ITERATOR iter»«IF iter.counter0>0», «ENDIF»«asCType(param.type)» «param.name»«ENDFOREACH»);
+«ENDFOREACH» 
 
 
-extern void «interface.interfaceName()»_reset_event(«handleInterfaceAddition(interface)»);
+extern void «interface.interfaceName()»_reset_event(«handleInterfaceAddition(interface)»);
 
 
 #ifdef INTERFACE_LISTENER
 #ifdef INTERFACE_LISTENER
 
 
-extern void «interface.interfaceName()»_init(«handleInterfaceAddition(interface)»Statemachine_cy* statemachine,
+extern void «interface.interfaceName()»_init(«handleInterfaceAddition(interface)»Statemachine_cy* statemachine,
 		EventSet* eventSet);
 		EventSet* eventSet);
-extern void «interface.interfaceName()»_set_listener(«handleInterfaceAdditionComma(interface)»handleEvent handleEventPtr);
-extern void «interface.interfaceName()»_raiseEvent«handleInterfaceAdditionComma(interface)»_Event* event);
+extern void «interface.interfaceName()»_set_listener(«handleInterfaceAdditionComma(interface)»handleEvent handleEventPtr);
+extern void «interface.interfaceName()»_raiseEvent«handleInterfaceAdditionComma(interface)»_Event* event);
 
 
 #else
 #else
 
 
-extern void «interface.interfaceName()»_init(«handleInterfaceAdditionComma(interface)»Statemachine_cy* statemachine,
+extern void «interface.interfaceName()»_init(«handleInterfaceAdditionComma(interface)»Statemachine_cy* statemachine,
 		EventSet* eventSet, EventPool* eventPool);
 		EventSet* eventSet, EventPool* eventPool);
 		
 		
-«FOREACH interface.getOutEvents() AS event -»
-extern sc_boolean «interface.interfaceName()»_is_«event.name»_raised(«handleInterfaceAddition(interface)»«
-IF !event.type.isVoid() -»«IF this.isSingleton() == false -», «ENDIF»«event.type.asCType()»* value«ENDIF» );
-«ENDFOREACH»
+«FOREACH interface.getOutEvents() AS event -»
+extern sc_boolean «interface.interfaceName()»_is_«event.name»_raised(«handleInterfaceAddition(interface)»«
+IF !event.type.isVoid() -»«IF this.isSingleton() == false -», «ENDIF»«event.type.asCType()»* value«ENDIF» );
+«ENDFOREACH»
 
 
-«FOREACH interface.getInEvents() AS event -»
-extern void «interface.interfaceName()»_raise_«event.name»(«handleInterfaceAddition(interface)»«
-IF !event.type.isVoid() -»«IF this.isSingleton() == false -», «ENDIF»«event.type.asCType()» value «ENDIF»);
-«ENDFOREACH» 
+«FOREACH interface.getInEvents() AS event -»
+extern void «interface.interfaceName()»_raise_«event.name»(«handleInterfaceAddition(interface)»«
+IF !event.type.isVoid() -»«IF this.isSingleton() == false -», «ENDIF»«event.type.asCType()» value «ENDIF»);
+«ENDFOREACH» 
 
 
 #endif // INTERFACE_LISTENER
 #endif // INTERFACE_LISTENER
 
 
@@ -107,164 +107,164 @@ IF !event.type.isVoid() -
 #endif /* INTERFACEBASE_H_ */
 #endif /* INTERFACEBASE_H_ */
 
 
 
 
-«ENDFILE»
+«ENDFILE»
 
 
-«FILE interface.interfaceClassName()+".c"»
-«this.getLicenseHeader()»
-#include "«interface.interfaceClassName()».h"
+«FILE interface.interfaceClassName()+".c"»
+«this.getLicenseHeader()»
+#include "«interface.interfaceClassName()».h"
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
 
 
-«IF this.isSingleton()»
-static «interfaceClassName(interface)»* handle;
-void «interface.interfaceName()»_set_interface_singleton(«interfaceClassName(interface)»* _handle);
-«ENDIF»
+«IF this.isSingleton()»
+static «interfaceClassName(interface)»* handle;
+void «interface.interfaceName()»_set_interface_singleton(«interfaceClassName(interface)»* _handle);
+«ENDIF»
 
 
-static sc_boolean «interface.interfaceName()»_is_my_event(«handleInterfaceAdditionComma(interface)»uint32_t evid);
+static sc_boolean «interface.interfaceName()»_is_my_event(«handleInterfaceAdditionComma(interface)»uint32_t evid);
 
 
 #ifdef INTERFACE_LISTENER
 #ifdef INTERFACE_LISTENER
-void «interface.interfaceName()»_init(«handleInterfaceAdditionComma(interface)»Statemachine_cy* statemachine,
+void «interface.interfaceName()»_init(«handleInterfaceAdditionComma(interface)»Statemachine_cy* statemachine,
 		EventSet* eventSet)
 		EventSet* eventSet)
 #else
 #else
-void «interface.interfaceName()»_init(«handleInterfaceAdditionComma(interface)»Statemachine_cy* statemachine,
+void «interface.interfaceName()»_init(«handleInterfaceAdditionComma(interface)»Statemachine_cy* statemachine,
 		EventSet* eventSet, EventPool* eventPool)
 		EventSet* eventSet, EventPool* eventPool)
 #endif
 #endif
 {
 {
 	handle->eventSet = eventSet;
 	handle->eventSet = eventSet;
 	/* initial values */
 	/* initial values */
 	
 	
-«LET interface.declarations.typeSelect(VariableDefinition) AS variables-»
-«IF !variables.isEmpty-»
+«LET interface.declarations.typeSelect(VariableDefinition) AS variables-»
+«IF !variables.isEmpty-»
 	/* TODO: This should be done by sexec */
 	/* TODO: This should be done by sexec */
 
 
-«FOREACH variables AS variable -»
-«IF variable.initialValue != null-»
-«REM»change to correctLValue«ENDREM»
-	handle->«variable.getName()» = «variable.initialValue.toCCode()»;
-«ENDIF-»
-«ENDFOREACH-»
-«ENDIF-»
-«ENDLET-»
+«FOREACH variables AS variable -»
+«IF variable.initialValue != null-»
+«REM»change to correctLValue«ENDREM»
+	handle->«variable.getName()» = «variable.initialValue.toCCode()»;
+«ENDIF-»
+«ENDFOREACH-»
+«ENDIF-»
+«ENDLET-»
 
 
 	/* */ 
 	/* */ 
-	«interface.interfaceName()»_reset_event(handle);
+	«interface.interfaceName()»_reset_event(handle);
 
 
 	handle->statemachine = statemachine;
 	handle->statemachine = statemachine;
 
 
 #ifndef INTERFACE_LISTENER
 #ifndef INTERFACE_LISTENER
 	handle->eventPool = eventPool;
 	handle->eventPool = eventPool;
-«FOREACH interface.getOutEvents() AS event -»
-	handle->«event.getEventName()» = eventPool_createEvent(handle->eventPool, «event.getEventEnumName()»);
-«REM»	// ((«event.getEventName()»*)handle->«event.getEventName()»)->value = initial value for events is missing in model; «ENDREM»
-«ENDFOREACH»
+«FOREACH interface.getOutEvents() AS event -»
+	handle->«event.getEventName()» = eventPool_createEvent(handle->eventPool, «event.getEventEnumName()»);
+«REM»	// ((«event.getEventName()»*)handle->«event.getEventName()»)->value = initial value for events is missing in model; «ENDREM»
+«ENDFOREACH»
 #endif
 #endif
 
 
 }
 }
 
 
-«IF !interface.declarations.typeSelect(OperationDefinition).isEmpty-»
+«IF !interface.declarations.typeSelect(OperationDefinition).isEmpty-»
 #ifndef USE_MANUAL_OPERATION_IMPLEMENTATION
 #ifndef USE_MANUAL_OPERATION_IMPLEMENTATION
-«FOREACH interface.declarations.typeSelect(OperationDefinition) AS operation -»
-«asCType(operation.type)» «operation.getMethodName()»(«handleInterfaceAddition(interface)»«IF !isSingleton()», «ENDIF»«
-	FOREACH operation.parameters AS param ITERATOR iter»«IF iter.counter0>0», «ENDIF»«asCType(param.type)» «param.name»«ENDFOREACH»)
+«FOREACH interface.declarations.typeSelect(OperationDefinition) AS operation -»
+«asCType(operation.type)» «operation.getMethodName()»(«handleInterfaceAddition(interface)»«IF !isSingleton()», «ENDIF»«
+	FOREACH operation.parameters AS param ITERATOR iter»«IF iter.counter0>0», «ENDIF»«asCType(param.type)» «param.name»«ENDFOREACH»)
 {
 {
-	/** Default implementation of operation «operation.getMethodName()» */
-	return«IF !operation.type.isVoid()» «operation.type.defaultType()»«ENDIF-»;
+	/** Default implementation of operation «operation.getMethodName()» */
+	return«IF !operation.type.isVoid()» «operation.type.defaultType()»«ENDIF-»;
 }
 }
-«ENDFOREACH-» 
+«ENDFOREACH-» 
 #endif //USE_MANUAL_OPERATION_IMPLEMENTATION
 #endif //USE_MANUAL_OPERATION_IMPLEMENTATION
-«ENDIF»
+«ENDIF»
 
 
-«IF this.isSingleton()»
-void «interface.interfaceName()»_set_interface_singleton(«interfaceClassName(interface)»* _handle)
+«IF this.isSingleton()»
+void «interface.interfaceName()»_set_interface_singleton(«interfaceClassName(interface)»* _handle)
 { handle = _handle; }
 { handle = _handle; }
-«ENDIF»
+«ENDIF»
 
 
-«FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
-«variable.type.asCType()» «interface.interfaceName()»_get_«variable.getName()»(«handleInterfaceAddition(interface)»)
+«FOREACH interface.declarations.typeSelect(VariableDefinition) AS variable -»
+«variable.type.asCType()» «interface.interfaceName()»_get_«variable.getName()»(«handleInterfaceAddition(interface)»)
 {
 {
-	return handle->«variable.getName()»;
+	return handle->«variable.getName()»;
 }
 }
-«IF variable.readonly == false -»
-void «interface.interfaceName()»_set_«variable.getName()»(«handleInterfaceAdditionComma(interface)»«variable.type.asCType()» value)
+«IF variable.readonly == false -»
+void «interface.interfaceName()»_set_«variable.getName()»(«handleInterfaceAdditionComma(interface)»«variable.type.asCType()» value)
 {
 {
-	handle->«variable.getName()» = value;
+	handle->«variable.getName()» = value;
 }
 }
-«ENDIF»
-«ENDFOREACH»
+«ENDIF»
+«ENDFOREACH»
 
 
 
 
-sc_boolean «interface.interfaceName()»_is_set(«handleInterfaceAdditionComma(interface)»uint32_t evid)
+sc_boolean «interface.interfaceName()»_is_set(«handleInterfaceAdditionComma(interface)»uint32_t evid)
 {
 {
-	if («interface.interfaceName()»_is_my_event(«IF this.isSingleton() == false -»handle, «ENDIF»evid))
+	if («interface.interfaceName()»_is_my_event(«IF this.isSingleton() == false -»handle, «ENDIF»evid))
 		return eventSet_check(handle->eventSet, evid);
 		return eventSet_check(handle->eventSet, evid);
 	return bool_false;
 	return bool_false;
 }
 }
 
 
-void «interface.interfaceName()»_reset_event(«handleInterfaceAddition(interface)»)
+void «interface.interfaceName()»_reset_event(«handleInterfaceAddition(interface)»)
 {
 {
 	// clean all out events
 	// clean all out events
-	«FOREACH interface.getOutEvents() AS outEvent»
-	eventSet_clean_single(handle->eventSet, «outEvent.getEventEnumName()»);
-	«ENDFOREACH»
+	«FOREACH interface.getOutEvents() AS outEvent»
+	eventSet_clean_single(handle->eventSet, «outEvent.getEventEnumName()»);
+	«ENDFOREACH»
 
 
 }
 }
 
 
 #ifdef INTERFACE_LISTENER
 #ifdef INTERFACE_LISTENER
 
 
-void «interface.interfaceName()»_set_listener(«handleInterfaceAdditionComma(interface)»handleEvent handleEventPtr)
+void «interface.interfaceName()»_set_listener(«handleInterfaceAdditionComma(interface)»handleEvent handleEventPtr)
 {
 {
 	handle->handleEventCallback = handleEventPtr;
 	handle->handleEventCallback = handleEventPtr;
 }
 }
 
 
-void «interface.interfaceName()»_raiseEvent(«handleInterfaceAdditionComma(interface)»_Event event) {
-	if («interface.interfaceName()»_is_my_event(«IF this.isSingleton() == false -»handle, «ENDIF»event->id))
+void «interface.interfaceName()»_raiseEvent(«handleInterfaceAdditionComma(interface)»_Event event) {
+	if («interface.interfaceName()»_is_my_event(«IF this.isSingleton() == false -»handle, «ENDIF»event->id))
 		statemachine_cy_setEvent(handle->statemachine, event);
 		statemachine_cy_setEvent(handle->statemachine, event);
 }
 }
 
 
 #else
 #else
 
 
-«FOREACH interface.getOutEvents() AS event -»
-extern sc_boolean «interface.interfaceName()»_is_«event.name»_raised(«handleInterfaceAddition(interface)»«
-IF !event.type.isVoid() -»«IF this.isSingleton() == false -», «ENDIF»«event.type.asCType()»* value«ENDIF») 
+«FOREACH interface.getOutEvents() AS event -»
+extern sc_boolean «interface.interfaceName()»_is_«event.name»_raised(«handleInterfaceAddition(interface)»«
+IF !event.type.isVoid() -»«IF this.isSingleton() == false -», «ENDIF»«event.type.asCType()»* value«ENDIF») 
 {
 {
 	sc_boolean ret = bool_false;
 	sc_boolean ret = bool_false;
-	if (eventSet_check(handle->eventSet,«event.getEventEnumName()»)) {
-«IF !event.type.isVoid() -»	
-		*value = ((«event.getEventName()»*)handle->«event.getEventName()»)->value;
-«ENDIF»
+	if (eventSet_check(handle->eventSet,«event.getEventEnumName()»)) {
+«IF !event.type.isVoid() -»	
+		*value = ((«event.getEventName()»*)handle->«event.getEventName()»)->value;
+«ENDIF»
 		ret = bool_true;
 		ret = bool_true;
 	}
 	}
 	return ret;
 	return ret;
 }
 }
 
 
-«ENDFOREACH»
+«ENDFOREACH»
 
 
-«FOREACH interface.getInEvents() AS event -»
-extern void «interface.interfaceName()»_raise_«event.name»(«handleInterfaceAddition(interface)»«
-IF !event.type.isVoid() -»«IF this.isSingleton() == false -», «ENDIF»«event.type.asCType()» value«
-ENDIF»)
+«FOREACH interface.getInEvents() AS event -»
+extern void «interface.interfaceName()»_raise_«event.name»(«handleInterfaceAddition(interface)»«
+IF !event.type.isVoid() -»«IF this.isSingleton() == false -», «ENDIF»«event.type.asCType()» value«
+ENDIF»)
 {
 {
-	_Event* ev = eventPool_createEvent(handle->eventPool, «event.getEventEnumName()»);
+	_Event* ev = eventPool_createEvent(handle->eventPool, «event.getEventEnumName()»);
 
 
-«IF !event.type.isVoid() -»
-	((«event.getEventName()»*)ev)->value = value;
-«ENDIF»
+«IF !event.type.isVoid() -»
+	((«event.getEventName()»*)ev)->value = value;
+«ENDIF»
 
 
 	if (ev != NULL)
 	if (ev != NULL)
 		statemachine_cy_setEvent(handle->statemachine, ev);
 		statemachine_cy_setEvent(handle->statemachine, ev);
 }
 }
-«ENDFOREACH» 
+«ENDFOREACH» 
 
 
 #endif // INTERFACE_LISTENER
 #endif // INTERFACE_LISTENER
 
 
 
 
-sc_boolean «interface.interfaceName()»_is_my_event(«handleInterfaceAdditionComma(interface)»uint32_t evid)
+sc_boolean «interface.interfaceName()»_is_my_event(«handleInterfaceAdditionComma(interface)»uint32_t evid)
 {
 {
 	sc_boolean ret = bool_false;
 	sc_boolean ret = bool_false;
 	switch (evid) {
 	switch (evid) {
-«FOREACH interface.getInEvents() AS event -»
-	case «event.getEventEnumName()»:
-«ENDFOREACH»
+«FOREACH interface.getInEvents() AS event -»
+	case «event.getEventEnumName()»:
+«ENDFOREACH»
 		ret = bool_true;
 		ret = bool_true;
 		break;
 		break;
 	default:
 	default:
@@ -273,6 +273,6 @@ sc_boolean 
 	return ret;
 	return ret;
 }
 }
 
 
-«ENDFILE»
-«ENDFOREACH»
-«ENDDEFINE»
+«ENDFILE»
+«ENDFOREACH»
+«ENDDEFINE»

+ 35 - 35
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Main.xpt

@@ -1,63 +1,63 @@
-«REM»
+«REM»
 
 
 Contais the root templates that call the different file templates.
 Contais the root templates that call the different file templates.
 
 
 @auther axel terfloth
 @auther axel terfloth
 @author joern seger
 @author joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
 
 
-«IMPORT org::yakindu::sct::generator::c::templates»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«IMPORT org::yakindu::sct::generator::c::templates»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
 
 
-«DEFINE main(sgen::GeneratorEntry genEntry) FOR ExecutionFlow»
+«DEFINE main(sgen::GeneratorEntry genEntry) FOR ExecutionFlow»
   
   
- 	«this.setGenEntry(genEntry)»
+ 	«this.setGenEntry(genEntry)»
  	
  	
-	«REM» basis files «ENDREM»
-	«EXPAND EventH::file FOR this» 
-	«EXPAND EventC::file FOR this»
+	«REM» basis files «ENDREM»
+	«EXPAND EventH::file FOR this» 
+	«EXPAND EventC::file FOR this»
 
 
-	«EXPAND TimerH::file FOR this»
-	«EXPAND TimerC::file FOR this»
+	«EXPAND TimerH::file FOR this»
+	«EXPAND TimerC::file FOR this»
 
 
-	«EXPAND EventSetH::file FOR this»
-	«EXPAND EventSetC::file FOR this»
+	«EXPAND EventSetH::file FOR this»
+	«EXPAND EventSetC::file FOR this»
 
 
-	«EXPAND StatemachineBaseH::file FOR this» 
-	«EXPAND StatemachineBaseC::file FOR this»
+	«EXPAND StatemachineBaseH::file FOR this» 
+	«EXPAND StatemachineBaseC::file FOR this»
 
 
-	«EXPAND Statemachine_cyH::file FOR this»
-	«EXPAND Statemachine_cyC::file FOR this»
+	«EXPAND Statemachine_cyH::file FOR this»
+	«EXPAND Statemachine_cyC::file FOR this»
 
 
-	«EXPAND Interfaces::file FOR this»
-	«EXPAND InterfaceOOW::file FOR this»
+	«EXPAND Interfaces::file FOR this»
+	«EXPAND InterfaceOOW::file FOR this»
 
 
-    «REM» code that is created by the model «ENDREM»
-	«EXPAND definitionH::file FOR this»
+    «REM» code that is created by the model «ENDREM»
+	«EXPAND definitionH::file FOR this»
 
 
-	«EXPAND EventPoolH::file FOR this»
-	«EXPAND EventPoolC::file FOR this»
+	«EXPAND EventPoolH::file FOR this»
+	«EXPAND EventPoolC::file FOR this»
 
 
-	«EXPAND CustomStatemachineH::file FOR this»
-	«EXPAND CustomStatemachineC::file FOR this»
-	«EXPAND CustomStatemachineHOOW::file FOR this»
+	«EXPAND CustomStatemachineH::file FOR this»
+	«EXPAND CustomStatemachineC::file FOR this»
+	«EXPAND CustomStatemachineHOOW::file FOR this»
 	
 	
-	«EXPAND CustomEventH::file FOR this»
-	«EXPAND CustomEventC::file FOR this»
+	«EXPAND CustomEventH::file FOR this»
+	«EXPAND CustomEventC::file FOR this»
 
 
-	«EXPAND CMakeLists::file FOR this»
+	«EXPAND CMakeLists::file FOR this»
 	
 	
-	«EXPAND DummyTimer::file FOR this»
-	«EXPAND States::file FOR this»
+	«EXPAND DummyTimer::file FOR this»
+	«EXPAND States::file FOR this»
 
 
-«ENDDEFINE»
+«ENDDEFINE»
 
 
 
 
 
 

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/StatemachineBaseC.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'StatemachineBase.c'»
-«getLicenseHeader()»
+«FILE 'StatemachineBase.c'»
+«getLicenseHeader()»
 #include "StatemachineBase.h"
 #include "StatemachineBase.h"
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
@@ -48,6 +48,6 @@ uint32_t statemachineBase_getState(StatemachineBase* handle, uint16_t pos)
 {
 {
     return (handle->state[pos]);
     return (handle->state[pos]);
 }
 }
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/StatemachineBaseH.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'StatemachineBase.h'»
-«getLicenseHeader()»
+«FILE 'StatemachineBase.h'»
+«getLicenseHeader()»
 #ifndef STATEMACHINEBASE_H_
 #ifndef STATEMACHINEBASE_H_
 #define STATEMACHINEBASE_H_
 #define STATEMACHINEBASE_H_
  
  
@@ -51,6 +51,6 @@ extern uint32_t statemachineBase_getState(StatemachineBase* handle, uint16_t pos
 #endif 
 #endif 
  
  
 #endif /* STATEMACHINEBASE_H_ */
 #endif /* STATEMACHINEBASE_H_ */
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Statemachine_cyC.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'Statemachine_cy.c'»
-«getLicenseHeader()»
+«FILE 'Statemachine_cy.c'»
+«getLicenseHeader()»
 #include <stdlib.h>
 #include <stdlib.h>
 #include <string.h>
 #include <string.h>
 #include "definition.h"
 #include "definition.h"
@@ -100,6 +100,6 @@ sc_boolean statemachine_cy_eventWaiting(Statemachine_cy* handle) {
 	return (eventSet_isAny_input(&handle->eventSet) || eventSet_isAny_output(&handle->eventSet)) ;
 	return (eventSet_isAny_input(&handle->eventSet) || eventSet_isAny_output(&handle->eventSet)) ;
 }
 }
 
 
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/Statemachine_cyH.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'Statemachine_cy.h'»
-«getLicenseHeader()»
+«FILE 'Statemachine_cy.h'»
+«getLicenseHeader()»
 #ifndef STATEMACHINE_CY_H_
 #ifndef STATEMACHINE_CY_H_
 #define STATEMACHINE_CY_H_
 #define STATEMACHINE_CY_H_
 
 
@@ -58,6 +58,6 @@ extern void statemachine_cy__runCycle(Statemachine_cy* handle);
 #endif 
 #endif 
  
  
 #endif /* STATEMACHINE_CY_H_ */
 #endif /* STATEMACHINE_CY_H_ */
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 18 - 18
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/States.xpt

@@ -1,37 +1,37 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart cpp file.
 Templates for the main statechart cpp file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Constants»
-«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
-«EXTENSION org::yakindu::sct::generator::c::templates::TypeModelExtensions»
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
-«EXTENSION org::yakindu::sct::generator::c::templates::NamingOO»
+«EXTENSION org::yakindu::sct::generator::c::templates::Constants»
+«EXTENSION org::yakindu::sct::generator::c::templates::Expression»
+«EXTENSION org::yakindu::sct::generator::c::templates::TypeModelExtensions»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::NamingOO»
 
 
-«DEFINE file FOR ExecutionFlow»
-«FILE 'States.h'»
-«this.getLicenseHeader()»
+«DEFINE file FOR ExecutionFlow»
+«FILE 'States.h'»
+«this.getLicenseHeader()»
  
  
 #ifndef STATES_H_
 #ifndef STATES_H_
 #define STATES_H_
 #define STATES_H_
 
 
 typedef enum {
 typedef enum {
 
 
-    «FOREACH this.states AS exState-»
-      _«exState.getStateName()», 
-    «ENDFOREACH -»
+    «FOREACH this.states AS exState-»
+      _«exState.getStateName()», 
+    «ENDFOREACH -»
 	last_state
 	last_state
 
 
 } States;
 } States;
 
 
 #endif STATES_H_
 #endif STATES_H_
-«ENDFILE»
-«ENDDEFINE»
+«ENDFILE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/TimerC.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'Timer.c'»
-«getLicenseHeader()»
+«FILE 'Timer.c'»
+«getLicenseHeader()»
 #include "Timer.h"
 #include "Timer.h"
 
 
 void timer_setFPtr(Timer* handle, setTimerFPtr stfptr, unsetTimerFPtr utfptr)
 void timer_setFPtr(Timer* handle, setTimerFPtr stfptr, unsetTimerFPtr utfptr)
@@ -30,6 +30,6 @@ void timer_exit(Timer* handle)
 {
 {
 
 
 }
 }
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/TimerH.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart c file.
 Templates for the main statechart c file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'Timer.h'»
-«getLicenseHeader()»
+«FILE 'Timer.h'»
+«getLicenseHeader()»
 #ifndef TIMER_H_
 #ifndef TIMER_H_
 #define TIMER_H_
 #define TIMER_H_
 
 
@@ -44,6 +44,6 @@ extern void timer_exit(Timer* handle);
 #endif 
 #endif 
  
  
 #endif /* TIMER_H_ */
 #endif /* TIMER_H_ */
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»

+ 11 - 11
plugins/org.yakindu.sct.generator.c/src/org/yakindu/sct/generator/c/templates/definitionH.xpt

@@ -1,21 +1,21 @@
-«REM»
+«REM»
 
 
 Templates for the main statechart cpp file.
 Templates for the main statechart cpp file.
 
 
 @auther joern seger
 @auther joern seger
 
 
-«ENDREM»
+«ENDREM»
 
 
-«IMPORT sexec»
-«IMPORT stext»
-«IMPORT sgraph»
+«IMPORT sexec»
+«IMPORT stext»
+«IMPORT sgraph»
 
 
-«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
+«EXTENSION org::yakindu::sct::generator::c::templates::Naming»
 
 
-«DEFINE file FOR ExecutionFlow»
+«DEFINE file FOR ExecutionFlow»
 
 
-«FILE 'definition.h'»
-«getLicenseHeader()»
+«FILE 'definition.h'»
+«getLicenseHeader()»
 #ifndef DEFINITION_H_
 #ifndef DEFINITION_H_
 #define DEFINITION_H_
 #define DEFINITION_H_
 
 
@@ -42,6 +42,6 @@ typedef char* sc_string;
 #endif 
 #endif 
  
  
 #endif /* DEFINITION_H_ */
 #endif /* DEFINITION_H_ */
-«ENDFILE»
+«ENDFILE»
 
 
-«ENDDEFINE»
+«ENDDEFINE»