Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2013-11-29 15:06:42 +0000
committerHenrik Rentz-Reichert2013-11-29 16:18:16 +0000
commit054dbda337b01fca7d894ec98f1a50780865b9f3 (patch)
tree0089d208a2e6449ad0be394047ad82707d20d331 /plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
parentc273955b8645fc1d4ff249ead1c538f413ec2930 (diff)
downloadorg.eclipse.etrice-054dbda337b01fca7d894ec98f1a50780865b9f3.tar.gz
org.eclipse.etrice-054dbda337b01fca7d894ec98f1a50780865b9f3.tar.xz
org.eclipse.etrice-054dbda337b01fca7d894ec98f1a50780865b9f3.zip
Bug 422859: [generator.c] implement a means to log data driven ports during execution
https://bugs.eclipse.org/422859 Change-Id: Ie635ece6909663873b227ce2a20a07deb85aa6ad
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend')
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
index d162810c5..67b3f9717 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
@@ -21,6 +21,8 @@ import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import org.eclipse.etrice.generator.generic.RoomExtensions
import org.eclipse.etrice.core.etmap.util.ETMapUtil
+import static extension org.eclipse.etrice.core.common.base.util.BaseHelpers.*
+
@Singleton
class NodeRunnerGen {
@@ -46,6 +48,7 @@ class NodeRunnerGen {
def generateSourceFile(Root root, SubSystemInstance ssi, boolean first) {
val nr = ETMapUtil::getNodeRef(ssi)
val clsname = nr.name+"_"+ssi.name
+ val logData = ssi.subSystemClass.annotations.isAnnotationPresent("DataLogging")
'''
/**
* @author generated by eTrice
@@ -60,6 +63,7 @@ class NodeRunnerGen {
#include "debugging/etLogger.h"
#include "debugging/etMSCLogger.h"
+ #include "debugging/etDataLogger.h"
#include "osal/etPlatformLifecycle.h"
@@ -80,6 +84,9 @@ class NodeRunnerGen {
etLogger_logInfo("*** T H E B E G I N ***");
ET_MSC_LOGGER_OPEN("main");
+ «IF logData»
+ ET_DATA_LOGGER_OPEN("main");
+ «ENDIF»
/* startup sequence of lifecycle */
«clsname»_init(); /* lifecycle init */
@@ -96,6 +103,9 @@ class NodeRunnerGen {
«clsname»_stop(); /* lifecycle stop */
«clsname»_destroy(); /* lifecycle destroy */
+ «IF logData»
+ ET_DATA_LOGGER_CLOSE
+ «ENDIF»
ET_MSC_LOGGER_CLOSE
etLogger_logInfo("*** T H E E N D ***");

Back to the top