diff options
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator')
5 files changed, 92 insertions, 57 deletions
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java index 8292eb5c8..8d9e857dc 100644 --- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java +++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java @@ -209,8 +209,8 @@ public class ActorClassGen extends GenericActorClassGenerator { _or = true; } else { GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - _or = _generateMSCInstrumentation; + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + _or = _isGenerateMSCInstrumentation; } final boolean hasConstData = _or; boolean _and_3 = false; @@ -319,8 +319,8 @@ public class ActorClassGen extends GenericActorClassGenerator { _builder.newLineIfNotEmpty(); { GlobalGeneratorSettings _settings_1 = Main.getSettings(); - boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation(); - if (_generateMSCInstrumentation_1) { + boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation_1) { _builder.append("\t"); _builder.append("const char* instName;"); _builder.newLine(); diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java index 9d92297df..0ba79145c 100644 --- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java +++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java @@ -279,8 +279,17 @@ public class NodeGen { } }; final Iterable<PhysicalThread> threads = IterableExtensions.<PhysicalThread>filter(_threads, _function); - EList<Annotation> _annotations = ssc.getAnnotations(); - final boolean logData = this._roomHelpers.isAnnotationPresent(_annotations, "DataLogging"); + boolean _and = false; + GlobalGeneratorSettings _settings = Main.getSettings(); + boolean _isGenerateDataInstrumentation = _settings.isGenerateDataInstrumentation(); + if (!_isGenerateDataInstrumentation) { + _and = false; + } else { + EList<Annotation> _annotations = ssc.getAnnotations(); + boolean _isAnnotationPresent = this._roomHelpers.isAnnotationPresent(_annotations, "DataLogging"); + _and = _isAnnotationPresent; + } + final boolean logData = _and; StringConcatenation _builder = new StringConcatenation(); _builder.append("/**"); _builder.newLine(); @@ -1225,8 +1234,8 @@ public class NodeGen { { boolean _and = false; GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - boolean _not = (!_generateMSCInstrumentation); + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + boolean _not = (!_isGenerateMSCInstrumentation); if (!_not) { _and = false; } else { @@ -1397,15 +1406,15 @@ public class NodeGen { _or = true; } else { GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - _or = _generateMSCInstrumentation; + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + _or = _isGenerateMSCInstrumentation; } final boolean haveConstData = _or; final IntelligentSeparator sep = new IntelligentSeparator(","); String _xifexpression_1 = null; GlobalGeneratorSettings _settings_1 = Main.getSettings(); - boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation(); - if (_generateMSCInstrumentation_1) { + boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation_1) { _xifexpression_1 = "/*const*/"; } else { _xifexpression_1 = "const"; @@ -1414,8 +1423,8 @@ public class NodeGen { StringConcatenation _builder = new StringConcatenation(); { GlobalGeneratorSettings _settings_2 = Main.getSettings(); - boolean _generateMSCInstrumentation_2 = _settings_2.generateMSCInstrumentation(); - if (_generateMSCInstrumentation_2) { + boolean _isGenerateMSCInstrumentation_2 = _settings_2.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation_2) { CharSequence _genPeerPortArrays = this.genPeerPortArrays(root, ai); _builder.append(_genPeerPortArrays, ""); _builder.newLineIfNotEmpty(); @@ -1472,8 +1481,8 @@ public class NodeGen { _builder.newLineIfNotEmpty(); { GlobalGeneratorSettings _settings_3 = Main.getSettings(); - boolean _generateMSCInstrumentation_3 = _settings_3.generateMSCInstrumentation(); - if (_generateMSCInstrumentation_3) { + boolean _isGenerateMSCInstrumentation_3 = _settings_3.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation_3) { _builder.append("\t"); _builder.append(sep, "\t"); _builder.append("\""); @@ -1791,8 +1800,8 @@ public class NodeGen { String myInst = ""; String peerInst = ""; GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (_generateMSCInstrumentation) { + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation) { EObject _eContainer_1 = pi.eContainer(); String _path = ((ActorInstance) _eContainer_1).getPath(); String _plus = ("\n#ifdef ET_ASYNC_MSC_LOGGER_ACTIVATE\n,\"" + _path); @@ -1870,8 +1879,8 @@ public class NodeGen { final Iterable<Message> boolMsgs = IterableExtensions.<Message>filter(messages, _function_2); boolean _and = false; GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (!_generateMSCInstrumentation) { + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + if (!_isGenerateMSCInstrumentation) { _and = false; } else { boolean _and_1 = false; @@ -1997,8 +2006,8 @@ public class NodeGen { final Iterable<Message> boolMsgs = IterableExtensions.<Message>filter(sentMsgs, _function_2); boolean _and = false; GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (!_generateMSCInstrumentation) { + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + if (!_isGenerateMSCInstrumentation) { _and = false; } else { boolean _and_1 = false; @@ -2062,8 +2071,8 @@ public class NodeGen { String result = ""; String _xifexpression = null; GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (_generateMSCInstrumentation) { + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation) { EObject _eContainer = pi.eContainer(); String _path = ((ActorInstance) _eContainer).getPath(); String _plus = ("\n#ifdef ET_ASYNC_MSC_LOGGER_ACTIVATE\n,\"" + _path); @@ -2095,8 +2104,8 @@ public class NodeGen { String iiiD = this.getInterfaceItemInstanceData(pi); String _xifexpression_2 = null; GlobalGeneratorSettings _settings_1 = Main.getSettings(); - boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation(); - if (_generateMSCInstrumentation_1) { + boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation_1) { EObject _eContainer_2 = p.eContainer(); String _path_1 = ((ActorInstance) _eContainer_2).getPath(); String _plus_1 = (",\"" + _path_1); @@ -2144,10 +2153,25 @@ public class NodeGen { CharSequence _xblockexpression = null; { final NodeRef nr = ETMapUtil.getNodeRef(ssi); - final ArrayList<PortInstance> loggedPorts = this.loggedPorts(ssi); - SubSystemClass _subSystemClass = ssi.getSubSystemClass(); - EList<Annotation> _annotations = _subSystemClass.getAnnotations(); - final boolean logData = this._roomHelpers.isAnnotationPresent(_annotations, "DataLogging"); + boolean _and = false; + GlobalGeneratorSettings _settings = Main.getSettings(); + boolean _isGenerateDataInstrumentation = _settings.isGenerateDataInstrumentation(); + if (!_isGenerateDataInstrumentation) { + _and = false; + } else { + SubSystemClass _subSystemClass = ssi.getSubSystemClass(); + EList<Annotation> _annotations = _subSystemClass.getAnnotations(); + boolean _isAnnotationPresent = this._roomHelpers.isAnnotationPresent(_annotations, "DataLogging"); + _and = _isAnnotationPresent; + } + final boolean logData = _and; + ArrayList<PortInstance> _xifexpression = null; + if (logData) { + _xifexpression = this.loggedPorts(ssi); + } else { + _xifexpression = CollectionLiterals.<PortInstance>newArrayList(); + } + final ArrayList<PortInstance> loggedPorts = _xifexpression; StringConcatenation _builder = new StringConcatenation(); _builder.append("/**"); _builder.newLine(); @@ -2542,9 +2566,9 @@ public class NodeGen { _builder.newLine(); } else { { - GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (_generateMSCInstrumentation) { + GlobalGeneratorSettings _settings_1 = Main.getSettings(); + boolean _isGenerateMSCInstrumentation = _settings_1.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation) { _builder.append("\t\t"); _builder.append("\t"); _builder.append("ET_MSC_LOGGER_ASYNC_IN("); @@ -2725,9 +2749,9 @@ public class NodeGen { _builder.newLine(); } else { { - GlobalGeneratorSettings _settings_1 = Main.getSettings(); - boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation(); - if (_generateMSCInstrumentation_1) { + GlobalGeneratorSettings _settings_2 = Main.getSettings(); + boolean _isGenerateMSCInstrumentation_1 = _settings_2.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation_1) { _builder.append("\t\t"); _builder.append("\t"); _builder.append("ET_MSC_LOGGER_ASYNC_IN("); diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java index 6fdd95b78..47fd4d7be 100644 --- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java +++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java @@ -25,6 +25,8 @@ import org.eclipse.etrice.core.genmodel.etricegen.Root; import org.eclipse.etrice.core.genmodel.etricegen.StructureInstance; import org.eclipse.etrice.core.genmodel.etricegen.SubSystemInstance; import org.eclipse.etrice.core.room.SubSystemClass; +import org.eclipse.etrice.generator.base.GlobalGeneratorSettings; +import org.eclipse.etrice.generator.c.Main; import org.eclipse.etrice.generator.c.gen.CExtensions; import org.eclipse.etrice.generator.generic.RoomExtensions; import org.eclipse.xtend2.lib.StringConcatenation; @@ -88,9 +90,18 @@ public class NodeRunnerGen { String _plus = (_name + "_"); String _name_1 = ssi.getName(); final String clsname = (_plus + _name_1); - SubSystemClass _subSystemClass = ssi.getSubSystemClass(); - EList<Annotation> _annotations = _subSystemClass.getAnnotations(); - final boolean logData = this._baseHelpers.isAnnotationPresent(_annotations, "DataLogging"); + boolean _and = false; + GlobalGeneratorSettings _settings = Main.getSettings(); + boolean _isGenerateDataInstrumentation = _settings.isGenerateDataInstrumentation(); + if (!_isGenerateDataInstrumentation) { + _and = false; + } else { + SubSystemClass _subSystemClass = ssi.getSubSystemClass(); + EList<Annotation> _annotations = _subSystemClass.getAnnotations(); + boolean _isAnnotationPresent = this._baseHelpers.isAnnotationPresent(_annotations, "DataLogging"); + _and = _isAnnotationPresent; + } + final boolean logData = _and; StringConcatenation _builder = new StringConcatenation(); _builder.append("/**"); _builder.newLine(); diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java index a4179c5b2..b138e26bb 100644 --- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java +++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java @@ -202,8 +202,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator { _builder.newLine(); { GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (_generateMSCInstrumentation) { + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation) { _builder.append("/*--------------------- debug helpers */"); _builder.newLine(); _builder.newLine(); @@ -440,8 +440,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator { _builder.newLine(); { GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (_generateMSCInstrumentation) { + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation) { _builder.append("/*--------------------- debug helpers */"); _builder.newLine(); CharSequence _generateDebugHelpersImplementation = this.generateDebugHelpersImplementation(root, pc); @@ -687,8 +687,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator { final Iterable<Message> boolMsgs = IterableExtensions.<Message>filter(sentMsgs, _function_2); boolean _and = false; GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (!_generateMSCInstrumentation) { + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + if (!_isGenerateMSCInstrumentation) { _and = false; } else { boolean _and_1 = false; @@ -960,8 +960,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator { final Iterable<Message> boolMsgs = IterableExtensions.<Message>filter(messages, _function_2); boolean _and = false; GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (!_generateMSCInstrumentation) { + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + if (!_isGenerateMSCInstrumentation) { _and = false; } else { boolean _and_1 = false; @@ -1313,8 +1313,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator { _builder.newLineIfNotEmpty(); { GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (_generateMSCInstrumentation) { + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation) { _builder.append("\t"); _builder.append("\t"); _builder.append("ET_MSC_LOGGER_ASYNC_OUT(self->myInstName, \""); @@ -1385,8 +1385,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator { _builder.newLineIfNotEmpty(); { GlobalGeneratorSettings _settings_1 = Main.getSettings(); - boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation(); - if (_generateMSCInstrumentation_1) { + boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation_1) { _builder.append("\t"); _builder.append("\t"); _builder.append("ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[i].port.myInstName, \""); @@ -1447,8 +1447,8 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator { _builder.newLineIfNotEmpty(); { GlobalGeneratorSettings _settings_2 = Main.getSettings(); - boolean _generateMSCInstrumentation_2 = _settings_2.generateMSCInstrumentation(); - if (_generateMSCInstrumentation_2) { + boolean _isGenerateMSCInstrumentation_2 = _settings_2.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation_2) { _builder.append("\t"); _builder.append("\t"); _builder.append("ET_MSC_LOGGER_ASYNC_OUT(((etReplPort*)self)->ports[idx__et].port.myInstName, \""); diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java index b718ffd4e..bb1ee4fef 100644 --- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java +++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java @@ -124,8 +124,8 @@ public class StateMachineGen extends GenericStateMachineGenerator { StringConcatenation _builder = new StringConcatenation(); { GlobalGeneratorSettings _settings = Main.getSettings(); - boolean _generateMSCInstrumentation = _settings.generateMSCInstrumentation(); - if (_generateMSCInstrumentation) { + boolean _isGenerateMSCInstrumentation = _settings.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation) { _builder.append("/* state names */"); _builder.newLine(); _builder.append("static char* stateStrings[] = {\"<no state>\",\"<top>\","); @@ -164,8 +164,8 @@ public class StateMachineGen extends GenericStateMachineGenerator { _builder.newLine(); { GlobalGeneratorSettings _settings_1 = Main.getSettings(); - boolean _generateMSCInstrumentation_1 = _settings_1.generateMSCInstrumentation(); - if (_generateMSCInstrumentation_1) { + boolean _isGenerateMSCInstrumentation_1 = _settings_1.isGenerateMSCInstrumentation(); + if (_isGenerateMSCInstrumentation_1) { _builder.append("\t"); _builder.append("ET_MSC_LOGGER_CHANGE_STATE(self->constData->instName, stateStrings[new_state])"); _builder.newLine(); |