Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen')
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java19
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java15
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java15
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/Initialization.java33
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java11
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeGen.java20
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.java17
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.java17
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java12
9 files changed, 143 insertions, 16 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 f0d78acb6..e2a23e88a 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
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ * Thomas Schuetz (changed for C code generator)
+ */
package org.eclipse.etrice.generator.c.gen;
import com.google.common.base.Objects;
@@ -32,6 +43,7 @@ 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.Extension;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
@@ -42,18 +54,23 @@ public class ActorClassGen extends GenericActorClassGenerator {
private JavaIoFileSystemAccess fileAccess;
@Inject
+ @Extension
private ILanguageExtension langExt;
@Inject
+ @Extension
private CExtensions _cExtensions;
@Inject
+ @Extension
private RoomExtensions _roomExtensions;
@Inject
+ @Extension
private ProcedureHelpers _procedureHelpers;
@Inject
+ @Extension
private StateMachineGen _stateMachineGen;
@Inject
@@ -601,7 +618,7 @@ public class ActorClassGen extends GenericActorClassGenerator {
_builder.newLine();
_builder.append("#include \"etUnit/etUnit.h\"");
_builder.newLine();
- _builder.append("#include \"platform/etMemory.h\"");
+ _builder.append("#include \"osal/etMemory.h\"");
_builder.newLine();
_builder.newLine();
{
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java
index c9cca287c..1d481bfc1 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/CExtensions.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
+ * Thomas Schuetz (changed for C code generator)
+ */
package org.eclipse.etrice.generator.c.gen;
import com.google.common.base.Objects;
@@ -25,6 +36,7 @@ import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.util.Pair;
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.Conversions;
+import org.eclipse.xtext.xbase.lib.Extension;
@Singleton
@SuppressWarnings("all")
@@ -33,12 +45,13 @@ public class CExtensions implements ILanguageExtension {
private IDiagnostician diagnostician;
@Inject
+ @Extension
private RoomExtensions _roomExtensions;
public String getTypedDataDefinition(final Message m) {
VarDecl _data = m.getData();
String[] _generateArglistAndTypedData = this.generateArglistAndTypedData(_data);
- String _get = ((List<String>)Conversions.doWrapArray(_generateArglistAndTypedData)).get(1);
+ String _get = _generateArglistAndTypedData[1];
return _get;
}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java
index 61236fc9c..bf4b725ab 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/DataClassGen.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ * Thomas Schuetz (changed for C code generator)
+ */
package org.eclipse.etrice.generator.c.gen;
import com.google.common.base.Objects;
@@ -16,6 +27,7 @@ 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.Extension;
@Singleton
@SuppressWarnings("all")
@@ -24,12 +36,15 @@ public class DataClassGen {
private JavaIoFileSystemAccess fileAccess;
@Inject
+ @Extension
private CExtensions _cExtensions;
@Inject
+ @Extension
private RoomExtensions _roomExtensions;
@Inject
+ @Extension
private ProcedureHelpers _procedureHelpers;
@Inject
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/Initialization.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/Initialization.java
index 6f42a1067..f5871bdac 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/Initialization.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/Initialization.java
@@ -1,3 +1,13 @@
+/**
+ * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Juergen Haug (initial contribution)
+ */
package org.eclipse.etrice.generator.c.gen;
import com.google.common.base.Objects;
@@ -21,6 +31,7 @@ import org.eclipse.etrice.generator.c.gen.CExtensions;
import org.eclipse.etrice.generator.generic.RoomExtensions;
import org.eclipse.etrice.generator.generic.TypeHelpers;
import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.IntegerRange;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
@@ -30,9 +41,11 @@ public class Initialization {
private CExtensions languageExt;
@Inject
+ @Extension
private RoomExtensions _roomExtensions;
@Inject
+ @Extension
private TypeHelpers _typeHelpers;
public CharSequence generateAttributeInit(final InstanceBase instance, final List<Attribute> attributes) {
@@ -98,7 +111,7 @@ public class Initialization {
_or = (_equals || _and);
}
if (_or) {
- String _initAttribute = this.initAttribute(instance, path);
+ CharSequence _initAttribute = this.initAttribute(instance, path);
String _plus = (_initAttribute + COMMENT);
_xifexpression = _plus;
} else {
@@ -114,7 +127,7 @@ public class Initialization {
} else {
_builder_1.appendImmediate(", ", "");
}
- String _initAttribute_1 = this.initAttribute(instance, path);
+ CharSequence _initAttribute_1 = this.initAttribute(instance, path);
_builder_1.append(_initAttribute_1, "");
}
}
@@ -128,8 +141,8 @@ public class Initialization {
return _xblockexpression;
}
- private String initAttribute(final InstanceBase instance, final List<Attribute> path) {
- String _xblockexpression = null;
+ private CharSequence initAttribute(final InstanceBase instance, final List<Attribute> path) {
+ CharSequence _xblockexpression = null;
{
Attribute a = IterableExtensions.<Attribute>last(path);
RefableType _refType = a.getRefType();
@@ -149,7 +162,7 @@ public class Initialization {
}
return _xifexpression;
}
- String _switchResult = null;
+ CharSequence _switchResult = null;
boolean _matched = false;
if (!_matched) {
if (aType instanceof DataClass) {
@@ -169,13 +182,13 @@ public class Initialization {
}
_builder.append("\t");
List<Attribute> _union = this._roomExtensions.<Attribute>union(path, subA);
- CharSequence _initAttributeArray = this.initAttributeArray(instance, _union);
+ Object _initAttributeArray = this.initAttributeArray(instance, _union);
_builder.append(_initAttributeArray, " ");
_builder.newLineIfNotEmpty();
}
}
_builder.append("}");
- _switchResult = _builder.toString();
+ _switchResult = _builder;
}
}
if (!_matched) {
@@ -199,10 +212,10 @@ public class Initialization {
if (aType instanceof PrimitiveType) {
final PrimitiveType _primitiveType = (PrimitiveType)aType;
_matched=true;
- String _xblockexpression_1 = null;
+ CharSequence _xblockexpression_1 = null;
{
String value = this.getPrimitiveValue(instance, path);
- String _xifexpression_1 = null;
+ CharSequence _xifexpression_1 = null;
boolean _and = false;
boolean _and_1 = false;
int _size = a.getSize();
@@ -239,7 +252,7 @@ public class Initialization {
}
}
_builder.append(" }");
- _xifexpression_1 = _builder.toString();
+ _xifexpression_1 = _builder;
} else {
_xifexpression_1 = value;
}
diff --git a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java
index fcd44dd9a..4119a6b52 100644
--- a/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java
+++ b/plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/MainGen.java
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ * Thomas Schuetz (changed for C code generator)
+ */
package org.eclipse.etrice.generator.c.gen;
import com.google.inject.Inject;
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 7518e9ef4..7dc3cc5b3 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
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ * Thomas Schuetz (changed for C code generator)
+ */
package org.eclipse.etrice.generator.c.gen;
import com.google.common.base.Objects;
@@ -48,6 +59,7 @@ 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.Extension;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.IntegerRange;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
@@ -57,15 +69,19 @@ import org.eclipse.xtext.xbase.lib.ListExtensions;
@SuppressWarnings("all")
public class NodeGen {
@Inject
+ @Extension
private JavaIoFileSystemAccess fileAccess;
@Inject
+ @Extension
private CExtensions _cExtensions;
@Inject
+ @Extension
private RoomExtensions _roomExtensions;
@Inject
+ @Extension
private ProcedureHelpers helpers;
@Inject
@@ -286,7 +302,7 @@ public class NodeGen {
_builder.append("#include \"debugging/etMSCLogger.h\"");
_builder.newLine();
_builder.newLine();
- _builder.append("#include \"platform/etTimer.h\"");
+ _builder.append("#include \"osal/etTimer.h\"");
_builder.newLine();
_builder.append("#include \"etRuntimeConfig.h\"");
_builder.newLine();
@@ -884,8 +900,6 @@ public class NodeGen {
_builder.newLine();
_builder.append("#include \"messaging/etMessageService.h\"");
_builder.newLine();
- _builder.append("#include \"platform/etMemory.h\"");
- _builder.newLine();
_builder.newLine();
_builder.append("/* include all used ActorClasses */");
_builder.newLine();
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 098b60adb..83bb5ac3b 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
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ * Thomas Schuetz (changed for C code generator)
+ */
package org.eclipse.etrice.generator.c.gen;
import com.google.inject.Inject;
@@ -14,17 +25,21 @@ import org.eclipse.etrice.generator.c.gen.CExtensions;
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.Extension;
@Singleton
@SuppressWarnings("all")
public class NodeRunnerGen {
@Inject
+ @Extension
private JavaIoFileSystemAccess fileAccess;
@Inject
+ @Extension
private CExtensions _cExtensions;
@Inject
+ @Extension
private RoomExtensions _roomExtensions;
public void doGenerate(final Root root) {
@@ -104,8 +119,8 @@ public class NodeRunnerGen {
_builder.newLine();
_builder.append("#include \"debugging/etMSCLogger.h\"");
_builder.newLine();
- _builder.append("#include \"platform/etPlatform.h\"");
_builder.newLine();
+ _builder.append("#include \"osal/etPlatformLifecycle.h\"");
_builder.newLine();
_builder.newLine();
_builder.append("/**");
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 91dcd5e39..55c508ed0 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
@@ -1,3 +1,14 @@
+/**
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ * Thomas Schuetz (changed for C code generator)
+ */
package org.eclipse.etrice.generator.c.gen;
import com.google.common.base.Objects;
@@ -28,6 +39,7 @@ import org.eclipse.etrice.generator.generic.RoomExtensions;
import org.eclipse.etrice.generator.generic.TypeHelpers;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.generator.JavaIoFileSystemAccess;
+import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.Functions.Function1;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
@@ -35,18 +47,23 @@ import org.eclipse.xtext.xbase.lib.IterableExtensions;
@SuppressWarnings("all")
public class ProtocolClassGen extends GenericProtocolClassGenerator {
@Inject
+ @Extension
private JavaIoFileSystemAccess fileAccess;
@Inject
+ @Extension
private CExtensions _cExtensions;
@Inject
+ @Extension
private RoomExtensions _roomExtensions;
@Inject
+ @Extension
private ProcedureHelpers _procedureHelpers;
@Inject
+ @Extension
private TypeHelpers _typeHelpers;
@Inject
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 cc91d9405..fba5cf6cc 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
@@ -1,3 +1,13 @@
+/**
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ */
package org.eclipse.etrice.generator.c.gen;
import com.google.inject.Inject;
@@ -9,11 +19,13 @@ import org.eclipse.etrice.core.room.State;
import org.eclipse.etrice.generator.generic.GenericStateMachineGenerator;
import org.eclipse.etrice.generator.generic.RoomExtensions;
import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtext.xbase.lib.Extension;
@Singleton
@SuppressWarnings("all")
public class StateMachineGen extends GenericStateMachineGenerator {
@Inject
+ @Extension
private RoomExtensions _roomExtensions;
public CharSequence genHeaderConstants(final ExpandedActorClass xpac) {

Back to the top