Browse Source

Improved logmessage for setFmiValue

Casper Thule 3 years ago
parent
commit
1f3ed5ab91

+ 1 - 1
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/generation/CppGenerator.xtend

@@ -582,7 +582,7 @@ class CppGenerator extends SemanticAdaptationGenerator {
 					'''
 						«functionSignature»
 						{
-							«Utilities.getDebug(functionSignature
+							«Utilities.getDebug2('''printf("«adapClassName»::setFmiValue(%u,?)",id);'''
 							«IF convertedSASVsOrdered.containsKey(type)»
 								switch (id)	
 									{

+ 8 - 0
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/generation/Utilities.xtend

@@ -8,4 +8,12 @@ class Utilities {
 		printf("Invoking «functionName»");
 	#endif SA_DEBUG	''';
 }
+def static String getDebug2(String printf){
+
+	return '''
+	#ifdef SA_DEBUG
+		«printf»
+	#endif SA_DEBUG	''';
+}
+
 }