Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjung2012-09-08 19:37:47 +0000
committertjung2012-09-08 19:37:47 +0000
commit3361f9a848bb97b9a12957db2db7102b78a70e9e (patch)
tree76d0839ef9e1eb776ac6314ef91e137f8ff5c31c /plugins
parent6806015527f139a2d053bfcc0a093b149dd9570c (diff)
parentb91499526c402057ea13bd2d8f2441f1db5802d1 (diff)
downloadorg.eclipse.etrice-3361f9a848bb97b9a12957db2db7102b78a70e9e.tar.gz
org.eclipse.etrice-3361f9a848bb97b9a12957db2db7102b78a70e9e.tar.xz
org.eclipse.etrice-3361f9a848bb97b9a12957db2db7102b78a70e9e.zip
Merge branch 'master' of ssh://git.eclipse.org/gitroot/etrice/org.eclipse.etrice
Conflicts: plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/generator/ConfigGenerator.java plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.java plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.java plugins/org.eclipse.etrice.generator.doc/xtend-gen/org/eclipse/etrice/generator/doc/gen/DocGen.java plugins/org.eclipse.etrice.generator.doc/xtend-gen/org/eclipse/etrice/generator/doc/gen/InstanceDiagramGen.java plugins/org.eclipse.etrice.generator.doc/xtend-gen/org/eclipse/etrice/generator/doc/gen/MainGen.java plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/DataClassGen.java plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/JavaExtensions.java plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/MainGen.java plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/StateMachineGen.java plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.java plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/ConfigExtension.java plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericActorClassGenerator.java plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericProtocolClassGenerator.java plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/PrepareFileSystem.java plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/ProcedureHelpers.java plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/RoomExtensions.java plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/TypeHelpers.java runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_MSP430_F5438_CCS5_HWElevator/etTimer.c runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_MSP430_G2553_CCS5_LaunchPad/etDatatypes.h runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_MSP430_G2553_CCS5_LaunchPad/etLogger.c runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_MSP430_G2553_CCS5_LaunchPad/etPlatform.c runtime/org.eclipse.etrice.runtime.c/src/platforms/ST_MSP430_G2553_CCS5_LaunchPad/info.txt
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/generator/ConfigGenerator.java11
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java781
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java240
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java247
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java60
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java1185
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java117
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.java1679
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/SubSystemRunnerGen.java171
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/xtend-gen/org/eclipse/etrice/generator/doc/gen/DocGen.java1053
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/xtend-gen/org/eclipse/etrice/generator/doc/gen/InstanceDiagramGen.java173
-rw-r--r--plugins/org.eclipse.etrice.generator.doc/xtend-gen/org/eclipse/etrice/generator/doc/gen/MainGen.java41
-rw-r--r--plugins/org.eclipse.etrice.generator.fsmtest/xtend-gen/org/eclipse/etrice/generator/generator/.FSMtestGenerator.java._tracebin880 -> 880 bytes
-rw-r--r--plugins/org.eclipse.etrice.generator.fsmtest/xtend-gen/org/eclipse/etrice/generator/generator/FSMtestGenerator.java22
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ActorClassGen.java592
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/DataClassGen.java460
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/JavaExtensions.java144
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/MainGen.java60
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java790
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/StateMachineGen.java81
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemClassGen.java910
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/SubSystemRunnerGen.java151
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/RoomExtensions.xtend84
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/ConfigExtension.java270
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericActorClassGenerator.java90
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericProtocolClassGenerator.java119
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java1392
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/PrepareFileSystem.java81
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/ProcedureHelpers.java843
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/RoomExtensions.java959
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/TypeHelpers.java57
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.c.zipbin15546 -> 16271 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.modellib.java.zipbin68940 -> 41262 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.c.zipbin214649 -> 126908 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.runtime.java.zipbin35474 -> 30056 bytes
-rw-r--r--plugins/org.eclipse.etrice.ui.runtime/contents/org.eclipse.etrice.tutorials.zipbin101476 -> 101307 bytes
37 files changed, 12811 insertions, 54 deletions
diff --git a/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/generator/ConfigGenerator.java b/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/generator/ConfigGenerator.java
new file mode 100644
index 000000000..fbcb0e7f5
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.config/xtend-gen/org/eclipse/etrice/core/generator/ConfigGenerator.java
@@ -0,0 +1,11 @@
+package org.eclipse.etrice.core.generator;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtext.generator.IFileSystemAccess;
+import org.eclipse.xtext.generator.IGenerator;
+
+@SuppressWarnings("all")
+public class ConfigGenerator implements IGenerator {
+ public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend
index f9038caf3..33e8f8df8 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend
@@ -124,7 +124,7 @@ class SubSystemClassGen {
#include "debugging/etMSCLogger.h"
#include "platform/etTimer.h"
- #include "etGlobalFlags.h"
+ #include "etRuntimeConfig.h"
«helpers.userCode(ssc.userCode3)»
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
new file mode 100644
index 000000000..b798d9355
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java
@@ -0,0 +1,781 @@
+package org.eclipse.etrice.generator.c.gen;
+
+import com.google.common.base.Objects;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import java.util.HashSet;
+import java.util.List;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.etrice.core.genmodel.base.ILogger;
+import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass;
+import org.eclipse.etrice.core.genmodel.etricegen.Root;
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.ActorCommunicationType;
+import org.eclipse.etrice.core.room.Annotation;
+import org.eclipse.etrice.core.room.Attribute;
+import org.eclipse.etrice.core.room.CommunicationType;
+import org.eclipse.etrice.core.room.DataClass;
+import org.eclipse.etrice.core.room.GeneralProtocolClass;
+import org.eclipse.etrice.core.room.Port;
+import org.eclipse.etrice.core.room.ProtocolClass;
+import org.eclipse.etrice.core.room.SAPRef;
+import org.eclipse.etrice.core.room.SPPRef;
+import org.eclipse.etrice.core.room.ServiceImplementation;
+import org.eclipse.etrice.core.room.StandardOperation;
+import org.eclipse.etrice.core.room.StateGraph;
+import org.eclipse.etrice.core.room.util.RoomHelpers;
+import org.eclipse.etrice.generator.c.gen.CExtensions;
+import org.eclipse.etrice.generator.c.gen.StateMachineGen;
+import org.eclipse.etrice.generator.generic.GenericActorClassGenerator;
+import org.eclipse.etrice.generator.generic.ProcedureHelpers;
+import org.eclipse.etrice.generator.generic.RoomExtensions;
+import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
+import org.eclipse.xtext.xbase.lib.Functions.Function1;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
+
+@Singleton
+@SuppressWarnings("all")
+public class ActorClassGen extends GenericActorClassGenerator {
+ @Inject
+ private JavaIoFileSystemAccess fileAccess;
+
+ @Inject
+ private CExtensions _cExtensions;
+
+ @Inject
+ private RoomExtensions _roomExtensions;
+
+ @Inject
+ private ProcedureHelpers _procedureHelpers;
+
+ @Inject
+ private StateMachineGen _stateMachineGen;
+
+ @Inject
+ private ILogger logger;
+
+ public void doGenerate(final Root root) {
+ EList<ExpandedActorClass> _xpActorClasses = root.getXpActorClasses();
+ for (final ExpandedActorClass xpac : _xpActorClasses) {
+ {
+ ActorClass _actorClass = xpac.getActorClass();
+ String _generationTargetPath = this._roomExtensions.getGenerationTargetPath(_actorClass);
+ ActorClass _actorClass_1 = xpac.getActorClass();
+ String _path = this._roomExtensions.getPath(_actorClass_1);
+ String path = (_generationTargetPath + _path);
+ ActorClass _actorClass_2 = xpac.getActorClass();
+ String _cHeaderFileName = this._cExtensions.getCHeaderFileName(_actorClass_2);
+ String _plus = ("generating ActorClass header \'" + _cHeaderFileName);
+ String _plus_1 = (_plus + "\' in \'");
+ String _plus_2 = (_plus_1 + path);
+ String _plus_3 = (_plus_2 + "\'");
+ this.logger.logInfo(_plus_3);
+ this.fileAccess.setOutputPath(path);
+ ActorClass _actorClass_3 = xpac.getActorClass();
+ String _cHeaderFileName_1 = this._cExtensions.getCHeaderFileName(_actorClass_3);
+ ActorClass _actorClass_4 = xpac.getActorClass();
+ CharSequence _generateHeaderFile = this.generateHeaderFile(root, xpac, _actorClass_4);
+ this.fileAccess.generateFile(_cHeaderFileName_1, _generateHeaderFile);
+ boolean _hasBehaviorAnnotation = this.hasBehaviorAnnotation(xpac, "BehaviorManual");
+ if (_hasBehaviorAnnotation) {
+ ActorClass _actorClass_5 = xpac.getActorClass();
+ String _name = _actorClass_5.getName();
+ String _plus_4 = ("omitting ActorClass source for \'" + _name);
+ String _plus_5 = (_plus_4 + "\' since @BehaviorManual is specified");
+ this.logger.logInfo(_plus_5);
+ } else {
+ ActorClass _actorClass_6 = xpac.getActorClass();
+ String _cSourceFileName = this._cExtensions.getCSourceFileName(_actorClass_6);
+ String _plus_6 = ("generating ActorClass source \'" + _cSourceFileName);
+ String _plus_7 = (_plus_6 + "\' in \'");
+ String _plus_8 = (_plus_7 + path);
+ String _plus_9 = (_plus_8 + "\'");
+ this.logger.logInfo(_plus_9);
+ this.fileAccess.setOutputPath(path);
+ ActorClass _actorClass_7 = xpac.getActorClass();
+ String _cSourceFileName_1 = this._cExtensions.getCSourceFileName(_actorClass_7);
+ ActorClass _actorClass_8 = xpac.getActorClass();
+ CharSequence _generateSourceFile = this.generateSourceFile(root, xpac, _actorClass_8);
+ this.fileAccess.generateFile(_cSourceFileName_1, _generateSourceFile);
+ }
+ }
+ }
+ }
+
+ private boolean hasBehaviorAnnotation(final ExpandedActorClass xpac, final String annotation) {
+ ActorClass _actorClass = xpac.getActorClass();
+ EList<Annotation> _behaviorAnnotations = _actorClass.getBehaviorAnnotations();
+ boolean _notEquals = (!Objects.equal(_behaviorAnnotations, null));
+ if (_notEquals) {
+ ActorClass _actorClass_1 = xpac.getActorClass();
+ EList<Annotation> _behaviorAnnotations_1 = _actorClass_1.getBehaviorAnnotations();
+ final Function1<Annotation,Boolean> _function = new Function1<Annotation,Boolean>() {
+ public Boolean apply(final Annotation e) {
+ String _name = e.getName();
+ boolean _equals = Objects.equal(_name, annotation);
+ return Boolean.valueOf(_equals);
+ }
+ };
+ Annotation _findFirst = IterableExtensions.<Annotation>findFirst(_behaviorAnnotations_1, _function);
+ boolean _notEquals_1 = (!Objects.equal(_findFirst, null));
+ if (_notEquals_1) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private CharSequence generateHeaderFile(final Root root, final ExpandedActorClass xpac, final ActorClass ac) {
+ CharSequence _xblockexpression = null;
+ {
+ List<Port> _allEndPorts = this._roomExtensions.getAllEndPorts(ac);
+ final Function1<Port,Boolean> _function = new Function1<Port,Boolean>() {
+ public Boolean apply(final Port p) {
+ GeneralProtocolClass _protocol = p.getProtocol();
+ CommunicationType _commType = ((ProtocolClass) _protocol).getCommType();
+ boolean _equals = Objects.equal(_commType, CommunicationType.EVENT_DRIVEN);
+ return Boolean.valueOf(_equals);
+ }
+ };
+ Iterable<Port> eventPorts = IterableExtensions.<Port>filter(_allEndPorts, _function);
+ List<Port> _allEndPorts_1 = this._roomExtensions.getAllEndPorts(ac);
+ final Function1<Port,Boolean> _function_1 = new Function1<Port,Boolean>() {
+ public Boolean apply(final Port p) {
+ boolean _and = false;
+ GeneralProtocolClass _protocol = p.getProtocol();
+ CommunicationType _commType = ((ProtocolClass) _protocol).getCommType();
+ boolean _equals = Objects.equal(_commType, CommunicationType.DATA_DRIVEN);
+ if (!_equals) {
+ _and = false;
+ } else {
+ boolean _isConjugated = p.isConjugated();
+ _and = (_equals && _isConjugated);
+ }
+ return Boolean.valueOf(_and);
+ }
+ };
+ Iterable<Port> sendPorts = IterableExtensions.<Port>filter(_allEndPorts_1, _function_1);
+ List<Port> _allEndPorts_2 = this._roomExtensions.getAllEndPorts(ac);
+ final Function1<Port,Boolean> _function_2 = new Function1<Port,Boolean>() {
+ public Boolean apply(final Port p) {
+ boolean _and = false;
+ GeneralProtocolClass _protocol = p.getProtocol();
+ CommunicationType _commType = ((ProtocolClass) _protocol).getCommType();
+ boolean _equals = Objects.equal(_commType, CommunicationType.DATA_DRIVEN);
+ if (!_equals) {
+ _and = false;
+ } else {
+ boolean _isConjugated = p.isConjugated();
+ boolean _not = (!_isConjugated);
+ _and = (_equals && _not);
+ }
+ return Boolean.valueOf(_and);
+ }
+ };
+ Iterable<Port> recvPorts = IterableExtensions.<Port>filter(_allEndPorts_2, _function_2);
+ ActorCommunicationType _commType = ac.getCommType();
+ boolean dataDriven = Objects.equal(_commType, ActorCommunicationType.DATA_DRIVEN);
+ ActorCommunicationType _commType_1 = ac.getCommType();
+ boolean async = Objects.equal(_commType_1, ActorCommunicationType.ASYNCHRONOUS);
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("/**");
+ _builder.newLine();
+ _builder.append(" ");
+ _builder.append("* @author generated by eTrice");
+ _builder.newLine();
+ _builder.append(" ");
+ _builder.append("*");
+ _builder.newLine();
+ _builder.append(" ");
+ _builder.append("* Header File of ActorClass ");
+ String _name = ac.getName();
+ _builder.append(_name, " ");
+ _builder.newLineIfNotEmpty();
+ _builder.append(" ");
+ _builder.append("* ");
+ _builder.newLine();
+ _builder.append(" ");
+ _builder.append("*/");
+ _builder.newLine();
+ _builder.newLine();
+ String _name_1 = ac.getName();
+ CharSequence _generateIncludeGuardBegin = this._cExtensions.generateIncludeGuardBegin(_name_1);
+ _builder.append(_generateIncludeGuardBegin, "");
+ _builder.newLineIfNotEmpty();
+ _builder.newLine();
+ _builder.append("#include \"etDatatypes.h\"");
+ _builder.newLine();
+ _builder.append("#include \"messaging/etMessage.h\"");
+ _builder.newLine();
+ _builder.newLine();
+ {
+ HashSet<DataClass> _referencedDataClasses = root.getReferencedDataClasses(ac);
+ for(final DataClass dataClass : _referencedDataClasses) {
+ _builder.append("#include \"");
+ String _name_2 = dataClass.getName();
+ _builder.append(_name_2, "");
+ _builder.append(".h\"");
+ _builder.newLineIfNotEmpty();
+ }
+ }
+ {
+ EList<ProtocolClass> _referencedProtocolClasses = root.getReferencedProtocolClasses(ac);
+ for(final ProtocolClass pc : _referencedProtocolClasses) {
+ _builder.append("#include \"");
+ String _name_3 = pc.getName();
+ _builder.append(_name_3, "");
+ _builder.append(".h\"");
+ _builder.newLineIfNotEmpty();
+ }
+ }
+ _builder.newLine();
+ CharSequence _userCode = this._procedureHelpers.userCode(ac, 1);
+ _builder.append(_userCode, "");
+ _builder.newLineIfNotEmpty();
+ _builder.newLine();
+ _builder.append("typedef struct ");
+ String _name_4 = ac.getName();
+ _builder.append(_name_4, "");
+ _builder.append(" ");
+ String _name_5 = ac.getName();
+ _builder.append(_name_5, "");
+ _builder.append(";");
+ _builder.newLineIfNotEmpty();
+ _builder.newLine();
+ _builder.append("/* const part of ActorClass (ROM) */");
+ _builder.newLine();
+ {
+ boolean _and = false;
+ boolean _and_1 = false;
+ boolean _and_2 = false;
+ boolean _isEmpty = IterableExtensions.isEmpty(eventPorts);
+ if (!_isEmpty) {
+ _and_2 = false;
+ } else {
+ boolean _isEmpty_1 = IterableExtensions.isEmpty(recvPorts);
+ _and_2 = (_isEmpty && _isEmpty_1);
+ }
+ if (!_and_2) {
+ _and_1 = false;
+ } else {
+ List<SAPRef> _allSAPs = this._roomExtensions.getAllSAPs(ac);
+ boolean _isEmpty_2 = _allSAPs.isEmpty();
+ _and_1 = (_and_2 && _isEmpty_2);
+ }
+ if (!_and_1) {
+ _and = false;
+ } else {
+ List<ServiceImplementation> _allServiceImplementations = this._roomExtensions.getAllServiceImplementations(ac);
+ boolean _isEmpty_3 = _allServiceImplementations.isEmpty();
+ _and = (_and_1 && _isEmpty_3);
+ }
+ if (_and) {
+ _builder.append("/* this actor class has no ports and thus no constant data */");
+ _builder.newLine();
+ } else {