Procházet zdrojové kódy

Add StateMachine Header when tracing is active (#1094)

Due to a request from GitHub-user Lostwald, the main Statemachine header is now
included when tracingEntryState or tracingExitState are set to true in the
*.sgen-file.
Fixes #1082
Rene Beckmann před 8 roky
rodič
revize
f5de3ad2e3

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

@@ -34,7 +34,9 @@ class StatemachineRequiredHeader implements IContentTemplate {
 		#define «module.client.define»_H_
 
 		#include "«(typesModule.h).relativeTo(module.client.h)»"
-		«IF timed || operations.size > 0»#include "«(module.h).relativeTo(module.client.h)»"«ENDIF»
+		«IF timed || operations.size > 0 || entry.tracingEnterState || entry.tracingExitState»
+		#include "«(module.h).relativeTo(module.client.h)»"
+		«ENDIF»
 
 		#ifdef __cplusplus
 		extern "C"