Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator')
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java7
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend6
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend3
3 files changed, 12 insertions, 4 deletions
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java
index adebaf834..1a023e51c 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/Main.java
@@ -87,6 +87,9 @@ public class Main extends AbstractGenerator {
protected org.eclipse.etrice.generator.doc.gen.MainGen mainDocGenerator;
@Inject
+ protected org.eclipse.etrice.generator.gnuplot.GnuplotScriptGenerator gnuPlotGenerator;
+
+ @Inject
private Validator validator;
@Inject
@@ -175,6 +178,10 @@ public class Main extends AbstractGenerator {
mainDocGenerator.doGenerate(genModel.eResource());
}
+ if(getSettings().isGenerateDataInstrumentation()){
+ gnuPlotGenerator.doGenerate(genModel);
+ }
+
if (diagnostician.isFailed()) {
logger.logInfo("errors during code generation");
logger.logError("-- terminating", null);
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
index cda386cd2..34c27b984 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
@@ -139,7 +139,7 @@ class NodeGen {
val ssc = ssi.subSystemClass
val clsname = nr.name+"_"+ssi.name
val threads = nr.type.threads.filter(t|usedThreads.contains(t))
- val logData = ssc.annotations.isAnnotationPresent("DataLogging")
+ val logData = Main::settings.generateDataInstrumentation && ssc.annotations.isAnnotationPresent("DataLogging")
'''
/**
* @author generated by eTrice
@@ -651,8 +651,8 @@ class NodeGen {
def private generateDispatcherFile(Root root, SubSystemInstance ssi, Collection<PhysicalThread> usedThreads) {
val nr = ETMapUtil::getNodeRef(ssi)
- val loggedPorts = ssi.loggedPorts
- val logData = ssi.subSystemClass.annotations.isAnnotationPresent("DataLogging")
+ val logData = Main::settings.generateDataInstrumentation && ssi.subSystemClass.annotations.isAnnotationPresent("DataLogging")
+ val loggedPorts = if(logData) ssi.loggedPorts else newArrayList
'''
/**
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 136f93166..53ac1a14e 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,7 @@ import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import org.eclipse.etrice.generator.generic.RoomExtensions
import org.eclipse.etrice.core.etmap.util.ETMapUtil
import org.eclipse.etrice.core.common.base.util.BaseHelpers
+import org.eclipse.etrice.generator.c.Main
@Singleton
class NodeRunnerGen {
@@ -48,7 +49,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")
+ val logData = Main.getSettings.isGenerateDataInstrumentation && ssi.subSystemClass.annotations.isAnnotationPresent("DataLogging")
'''
/**
* @author generated by eTrice

Back to the top