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/gen/ActorClassGen.xtend5
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend8
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CLanguageGenerator.java34
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CTranslationProvider.java8
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend230
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend51
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/SubSystemClassGen.xtend5
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/setup/GeneratorModule.java3
8 files changed, 201 insertions, 143 deletions
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend
index f9a7d0d7a..ccc9013ac 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend
@@ -151,12 +151,13 @@ class ActorClassGen extends GenericActorClassGenerator {
#include "modelbase/etActor.h"
#include "debugging/etLogger.h"
#include "debugging/etMSCLogger.h"
+ #include "platform/etMemory.h"
«FOR pc : root.getReferencedProtocolClasses(ac)»
#include "«pc.getCHeaderFileName»"
«ENDFOR»
- «helpers.userCode(xpac.userCode3)»
+ «helpers.userCode(ac.userCode3)»
/* interface item IDs */
«genInterfaceItemConstants(xpac, ac)»
@@ -178,7 +179,7 @@ class ActorClassGen extends GenericActorClassGenerator {
ET_MSC_LOGGER_SYNC_ENTRY("«xpac.name»", "ReceiveMessage")
«IF xpac.hasNonEmptyStateMachine»
- receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(&msg[1]));
+ receiveEvent(self, (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage))));
«ENDIF»
ET_MSC_LOGGER_SYNC_EXIT
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend
index bea5bdd0a..598ae9024 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CExtensions.xtend
@@ -25,7 +25,7 @@ import org.eclipse.etrice.core.room.RoomClass
import org.eclipse.etrice.generator.etricegen.ExpandedActorClass
import org.eclipse.etrice.generator.etricegen.TransitionChain
import org.eclipse.etrice.generator.generic.ILanguageExtension
-import org.eclipse.etrice.generator.generic.LanguageGenerator
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator
import java.util.List
import org.eclipse.xtext.util.Pair
@@ -34,7 +34,7 @@ import org.eclipse.xtext.util.Pair
@Singleton
class CExtensions implements ILanguageExtension {
- @Inject LanguageGenerator languageGen
+ @Inject AbstractLanguageGenerator languageGen
override String getTypedDataDefinition(Message m) {
@@ -133,4 +133,8 @@ class CExtensions implements ILanguageExtension {
def String getExecuteChainCode(ExpandedActorClass ac, TransitionChain tc) {
return languageGen.getExecuteChain(ac, tc)
}
+
+ override String arrayDeclaration(String type, int size, String name) {
+ type+" "+name+"["+size+"]";
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CLanguageGenerator.java b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CLanguageGenerator.java
new file mode 100644
index 000000000..c25db77be
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CLanguageGenerator.java
@@ -0,0 +1,34 @@
+package org.eclipse.etrice.generator.c.gen;
+
+import org.eclipse.etrice.core.room.PrimitiveType;
+import org.eclipse.etrice.core.room.VarDecl;
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator;
+
+public class CLanguageGenerator extends AbstractLanguageGenerator {
+
+ public String[] getArglistAndTypedData(VarDecl data) {
+ if (data==null)
+ return new String[] {"", "", ""};
+
+ String typeName = data.getRefType().getType().getName();
+ String castTypeName = typeName+"*";
+ boolean byVal = false;
+ if (data.getRefType().getType() instanceof PrimitiveType) {
+ typeName = ((PrimitiveType)data.getRefType().getType()).getTargetName();
+ String ct = ((PrimitiveType)data.getRefType().getType()).getCastName();
+ byVal = true;
+ if (ct!=null && !ct.isEmpty())
+ castTypeName = ct;
+ }
+ else {
+ typeName = typeName+"*";
+ }
+
+ String typedData = typeName+" "+data.getName() + " = "+(byVal? "*":"")+"(("+castTypeName+") generic_data);\n";
+ String dataArg = ", "+data.getName();
+ String typedArgList = ", "+typeName+" "+data.getName();
+
+ return new String[]{dataArg, typedData, typedArgList};
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CTranslationProvider.java b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CTranslationProvider.java
index 64a7a3b86..009f4137f 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CTranslationProvider.java
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/CTranslationProvider.java
@@ -60,10 +60,14 @@ public class CTranslationProvider implements ITranslationProvider {
String result = orig;
if (item instanceof Port) {
Port p = (Port) item;
+ StringBuilder argtext = new StringBuilder();
+ for (String arg : args) {
+ argtext.append(", "+arg);
+ }
if (p.getMultiplicity()==1)
- result = roomExt.getPortClassName(p)+"_"+msg.getName()+"(&self->constData->"+item.getName()+")";
+ result = roomExt.getPortClassName(p)+"_"+msg.getName()+"(&self->constData->"+item.getName()+argtext+")";
else
- result = roomExt.getPortClassName(p)+"_"+msg.getName()+"_broadcast(&self->constData->"+item.getName()+")";
+ result = roomExt.getPortClassName(p)+"_"+msg.getName()+"_broadcast(&self->constData->"+item.getName()+argtext+")";
result += " /* "+orig+" */";
}
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend
index 1b8abe3ac..80f06f6da 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend
@@ -1,116 +1,116 @@
-/*******************************************************************************
- * 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
-import com.google.inject.Singleton
-import org.eclipse.etrice.core.room.DataClass
-import org.eclipse.etrice.generator.base.ILogger
-import org.eclipse.etrice.generator.etricegen.Root
-import org.eclipse.xtext.generator.JavaIoFileSystemAccess
-import org.eclipse.etrice.generator.extensions.RoomExtensions
-import org.eclipse.etrice.generator.generic.ProcedureHelpers
-
-
-@Singleton
-class DataClassGen {
-
- @Inject extension JavaIoFileSystemAccess fileAccess
- @Inject extension CExtensions stdExt
- @Inject extension RoomExtensions roomExt
- @Inject extension ProcedureHelpers helpers
- @Inject ILogger logger
-
- def doGenerate(Root root) {
- for (dc: root.usedDataClasses) {
- var path = dc.generationTargetPath+dc.getPath
-
- // header file
- logger.logInfo("generating DataClass header '"+dc.getCHeaderFileName+"' in '"+path+"'")
- fileAccess.setOutputPath(path)
- fileAccess.generateFile(dc.getCHeaderFileName, root.generateHeaderFile(dc))
-
- // source file
- logger.logInfo("generating DataClass source '"+dc.getCSourceFileName+"' in '"+path+"'")
- fileAccess.setOutputPath(path)
- fileAccess.generateFile(dc.getCSourceFileName, root.generateSourceFile(dc))
-
- }
- }
-
- def generateHeaderFile(Root root, DataClass dc) {'''
- /**
- * @author generated by eTrice
- *
- * Header File of DataClass «dc.name»
- *
- */
-
- «generateIncludeGuardBegin(dc.name)»
-
- #include "etDatatypes.h"
-
-««« TODO: includes only for used DataClasses, also for other models
- «FOR dataClass : root.getReferencedDataClasses(dc)»
- #include "«dataClass.name».h"
- «ENDFOR»
-
- «helpers.userCode(dc.userCode1)»
-
- typedef struct {
- «helpers.attributes(dc.allAttributes)»
- } «dc.name»;
-
-««« TODO: do we need setters and getters for C and C++ ?
-
- «helpers.operationsDeclaration(dc.operations, dc.name)»
-
- /* deep copy */
- void «dc.name»_deepCopy(«dc.name»* source, «dc.name»* target);
-
- «helpers.userCode(dc.userCode2)»
-
- «generateIncludeGuardEnd(dc.name)»
-
- '''
- }
-
- def generateSourceFile(Root root, DataClass dc) {'''
- /**
- * @author generated by eTrice
- *
- * Source File of DataClass «dc.name»
- *
- */
-
- #include "«dc.getCHeaderFileName»"
-
- #include <string.h>
-
- «helpers.userCode(dc.userCode3)»
-
-««« TODO: do we need setters and getters for C and C++ ?
-
- «helpers.operationsImplementation(dc.operations, dc.name)»
-
- // deep copy
- void «dc.name»_deepCopy(«dc.name»* source, «dc.name»* target) {
- memcpy(target, source, sizeof(«dc.name»));
- }
-
-
- '''}
-
-
+/*******************************************************************************
+ * 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
+import com.google.inject.Singleton
+import org.eclipse.etrice.core.room.DataClass
+import org.eclipse.etrice.generator.base.ILogger
+import org.eclipse.etrice.generator.etricegen.Root
+import org.eclipse.xtext.generator.JavaIoFileSystemAccess
+import org.eclipse.etrice.generator.extensions.RoomExtensions
+import org.eclipse.etrice.generator.generic.ProcedureHelpers
+
+
+@Singleton
+class DataClassGen {
+
+ @Inject extension JavaIoFileSystemAccess fileAccess
+ @Inject extension CExtensions stdExt
+ @Inject extension RoomExtensions roomExt
+ @Inject extension ProcedureHelpers helpers
+ @Inject ILogger logger
+
+ def doGenerate(Root root) {
+ for (dc: root.usedDataClasses) {
+ var path = dc.generationTargetPath+dc.getPath
+
+ // header file
+ logger.logInfo("generating DataClass header '"+dc.getCHeaderFileName+"' in '"+path+"'")
+ fileAccess.setOutputPath(path)
+ fileAccess.generateFile(dc.getCHeaderFileName, root.generateHeaderFile(dc))
+
+ // source file
+ logger.logInfo("generating DataClass source '"+dc.getCSourceFileName+"' in '"+path+"'")
+ fileAccess.setOutputPath(path)
+ fileAccess.generateFile(dc.getCSourceFileName, root.generateSourceFile(dc))
+
+ }
+ }
+
+ def generateHeaderFile(Root root, DataClass dc) {'''
+ /**
+ * @author generated by eTrice
+ *
+ * Header File of DataClass «dc.name»
+ *
+ */
+
+ «generateIncludeGuardBegin(dc.name)»
+
+ #include "etDatatypes.h"
+
+««« TODO: includes only for used DataClasses, also for other models
+ «FOR dataClass : root.getReferencedDataClasses(dc)»
+ #include "«dataClass.name».h"
+ «ENDFOR»
+
+ «helpers.userCode(dc.userCode1)»
+
+ typedef struct {
+ «helpers.attributes(dc.allAttributes)»
+ } «dc.name»;
+
+««« TODO: do we need setters and getters for C and C++ ?
+
+ «helpers.operationsDeclaration(dc.operations, dc.name)»
+
+ /* deep copy */
+ void «dc.name»_deepCopy(«dc.name»* source, «dc.name»* target);
+
+ «helpers.userCode(dc.userCode2)»
+
+ «generateIncludeGuardEnd(dc.name)»
+
+ '''
+ }
+
+ def generateSourceFile(Root root, DataClass dc) {'''
+ /**
+ * @author generated by eTrice
+ *
+ * Source File of DataClass «dc.name»
+ *
+ */
+
+ #include "«dc.getCHeaderFileName»"
+
+ #include <string.h>
+
+ «helpers.userCode(dc.userCode3)»
+
+««« TODO: do we need setters and getters for C and C++ ?
+
+ «helpers.operationsImplementation(dc.operations, dc.name)»
+
+ // deep copy
+ void «dc.name»_deepCopy(«dc.name»* source, «dc.name»* target) {
+ memcpy(target, source, sizeof(«dc.name»));
+ }
+
+
+ '''}
+
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend
index fc76fd5f4..9934fcfea 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend
@@ -17,12 +17,14 @@ import com.google.inject.Inject
import com.google.inject.Singleton
import org.eclipse.etrice.core.room.Message
import org.eclipse.etrice.core.room.ProtocolClass
+import org.eclipse.etrice.core.room.PrimitiveType
import org.eclipse.etrice.generator.base.ILogger
import org.eclipse.etrice.generator.etricegen.Root
import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import org.eclipse.etrice.generator.extensions.RoomExtensions
import org.eclipse.etrice.generator.generic.ProcedureHelpers
+import org.eclipse.etrice.generator.generic.TypeHelpers
import org.eclipse.etrice.generator.generic.GenericProtocolClassGenerator
@@ -33,6 +35,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
@Inject extension CExtensions stdExt
@Inject extension RoomExtensions roomExt
@Inject extension ProcedureHelpers helpers
+ @Inject extension TypeHelpers
@Inject ILogger logger
def doGenerate(Root root) {
@@ -233,18 +236,21 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
def portClassHeader(ProtocolClass pc, Boolean conj){
var portClassName = pc.getPortClassName(conj)
var replPortClassName = pc.getPortClassName(conj, true)
- var pClass = pc.getPortClass(conj)
- var ports = if (conj) pc.getAllIncomingMessages() else pc.getAllOutgoingMessages()
+ var messages = if (conj) pc.allIncomingMessages else pc.allOutgoingMessages
'''
typedef etPort «portClassName»;
typedef etReplPort «replPortClassName»;
- «FOR message : ports»
- void «portClassName»_«message.name»(const «portClassName»* self);
- void «replPortClassName»_«message.name»_broadcast(const «replPortClassName»* self);
- void «replPortClassName»_«message.name»(const «replPortClassName»* self, int idx);
+ «FOR message : messages»
+ «var hasData = message.data!=null»
+ «var typeName = if (hasData) message.data.refType.type.typeName else ""»
+ «var refp = if (hasData && !(message.data.refType.type instanceof PrimitiveType)) "*" else ""»
+ «var data = if (hasData) ", "+typeName+refp+" data" else ""»
+ «messageSignature(portClassName, message.name, "", data)»;
+ «messageSignature(replPortClassName, message.name, "_broadcast", data)»;
+ «messageSignature(replPortClassName, message.name, "", ", int idx"+data)»;
«ENDFOR»
'''
}
@@ -252,48 +258,57 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
def portClassSource(ProtocolClass pc, Boolean conj){
var portClassName = pc.getPortClassName(conj)
var replPortClassName = pc.getPortClassName(conj, true)
- var pClass = pc.getPortClass(conj)
var messages = if (conj) pc.allIncomingMessages else pc.allOutgoingMessages
var dir = if (conj) "IN_" else "OUT_"
'''
«FOR message : messages»
+ «var hasData = message.data!=null»
+ «var typeName = if (hasData) message.data.refType.type.typeName else ""»
+ «var refp = if (hasData && !(message.data.refType.type instanceof PrimitiveType)) "*" else ""»
+ «var refa = if (hasData && (message.data.refType.type instanceof PrimitiveType)) "&" else ""»
+ «var data = if (hasData) ", "+typeName+refp+" data" else ""»
- void «portClassName»_«message.name»(const «portClassName»* self) {
+ «messageSignature(portClassName, message.name, "", data)» {
ET_MSC_LOGGER_SYNC_ENTRY("«portClassName»", "«message.name»")
if (self->receiveMessageFunc!=NULL) {
- etPort_sendMessage(self, «memberInUse(pc.name, dir+message.name)»);
+ «sendMessageCall(hasData, "self", memberInUse(pc.name, dir+message.name), typeName, refa+"data")»
}
ET_MSC_LOGGER_SYNC_EXIT
}
- void «replPortClassName»_«message.name»_broadcast(const «replPortClassName»* self) {
+ «messageSignature(replPortClassName, message.name, "_broadcast", data)» {
int i;
ET_MSC_LOGGER_SYNC_ENTRY("«replPortClassName»", "«message.name»")
for (i=0; i<self->size; ++i) {
- etPort_sendMessage((etPort*)(&self->ports[i]), «memberInUse(pc.name, dir+message.name)»);
+ «sendMessageCall(hasData, "(etPort*)(&self->ports[i])", memberInUse(pc.name, dir+message.name), typeName, refa+"data")»
}
ET_MSC_LOGGER_SYNC_EXIT
}
- void «replPortClassName»_«message.name»(const «replPortClassName»* self, int idx) {
+ «messageSignature(replPortClassName, message.name, "", ", int idx"+data)» {
ET_MSC_LOGGER_SYNC_ENTRY("«replPortClassName»", "«message.name»")
if (0<=idx && idx<self->size) {
- etPort_sendMessage((etPort*)(&self->ports[idx]), «memberInUse(pc.name, dir+message.name)»);
+ «sendMessageCall(hasData, "(etPort*)(&self->ports[idx])", memberInUse(pc.name, dir+message.name), typeName, refa+"data")»
}
ET_MSC_LOGGER_SYNC_EXIT
}
«ENDFOR»
'''
}
-
- def messageSignature(ProtocolClass pc, Message m) {'''
- void «pc.name»_«m.name» («IF m.data!=null»«m.data.refType.type.name» «m.data.name»«ENDIF»)
- '''
+ def private sendMessageCall(boolean hasData, String self, String msg, String typeName, String data) {
+ if (hasData)
+ "etPort_sendMessage("+self+", "+msg+", sizeof("+typeName+"), "+data+");"
+ else
+ "etPort_sendMessage("+self+", "+msg+", 0, NULL);"
+ }
+
+ def private messageSignature(String className, String messageName, String methodSuffix, String data) {
+ "void "+className+"_"+messageName+methodSuffix+"(const "+className+"* self"+data+")"
}
- def messageCall(Message m) {'''
+ def private messageCall(Message m) {'''
«m.name»(«IF m.data!=null» «m.data.name»«ENDIF»)
'''}
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 54c270fef..a1fc872c6 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
@@ -188,13 +188,10 @@ class SubSystemClassGen {
*/
#include "messaging/etMessageService.h"
+ #include "platform/etMemory.h"
/* instantiation of message services */
- /* pool and block size */
- #define MESSAGE_POOL_MAX 10
- #define MESSAGE_BLOCK_SIZE 32
-
/* MessageService for Thread1 */
static uint8 msgBuffer_Thread1[MESSAGE_POOL_MAX*MESSAGE_BLOCK_SIZE];
static etMessageService msgService_Thread1;
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/setup/GeneratorModule.java b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/setup/GeneratorModule.java
index ef3849a1b..5adccb9ec 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/setup/GeneratorModule.java
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/setup/GeneratorModule.java
@@ -16,9 +16,11 @@ import org.eclipse.etrice.generator.base.AbstractGenerator;
import org.eclipse.etrice.generator.base.GeneratorBaseModule;
import org.eclipse.etrice.generator.base.ITranslationProvider;
import org.eclipse.etrice.generator.c.Main;
+import org.eclipse.etrice.generator.c.gen.CLanguageGenerator;
import org.eclipse.etrice.generator.c.gen.CTranslationProvider;
import org.eclipse.etrice.generator.c.gen.MainGen;
import org.eclipse.etrice.generator.generic.ILanguageExtension;
+import org.eclipse.etrice.generator.generic.AbstractLanguageGenerator;
import org.eclipse.xtext.generator.IGenerator;
import org.eclipse.etrice.generator.c.gen.CExtensions;
@@ -35,6 +37,7 @@ public class GeneratorModule extends GeneratorBaseModule {
// bind language specific code to generic Interfaces
binder.bind(ILanguageExtension.class).to(CExtensions.class);
+ binder.bind(AbstractLanguageGenerator.class).to(CLanguageGenerator.class);
binder.bind(ITranslationProvider.class).to(CTranslationProvider.class);
}

Back to the top