Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-12-10 11:53:33 +0000
committerHenrik Rentz-Reichert2012-12-10 11:53:33 +0000
commit6c93ba3eaa74a00f0c5a96831db083364ac5df30 (patch)
tree9f7c7318bf7dfaaf24071d38f672eefdd4cea173
parent3a0f5695bb0d675cfe7d2fd32a358dec1d79c227 (diff)
downloadorg.eclipse.etrice-6c93ba3eaa74a00f0c5a96831db083364ac5df30.tar.gz
org.eclipse.etrice-6c93ba3eaa74a00f0c5a96831db083364ac5df30.tar.xz
org.eclipse.etrice-6c93ba3eaa74a00f0c5a96831db083364ac5df30.zip
[generator, generator.c, runtime.c] fixed C-generator after C++-generator changes
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend7
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/StateMachineGen.xtend6
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/ActorClassGen.java20
-rw-r--r--plugins/org.eclipse.etrice.generator.c/xtend-gen/org/eclipse/etrice/generator/c/gen/StateMachineGen.java18
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.xtend80
-rw-r--r--plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java339
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.c2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.h2
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.h2
9 files changed, 240 insertions, 236 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 5e3ab435e..3fe054f81 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
@@ -28,12 +28,13 @@ import org.eclipse.xtext.generator.JavaIoFileSystemAccess
import org.eclipse.etrice.generator.generic.RoomExtensions
import org.eclipse.etrice.generator.generic.ProcedureHelpers
import org.eclipse.etrice.generator.generic.GenericActorClassGenerator
-
+import org.eclipse.etrice.generator.generic.ILanguageExtension
@Singleton
class ActorClassGen extends GenericActorClassGenerator {
@Inject JavaIoFileSystemAccess fileAccess
+ @Inject extension ILanguageExtension langExt
@Inject extension CExtensions
@Inject extension RoomExtensions
@@ -231,7 +232,7 @@ class ActorClassGen extends GenericActorClassGenerator {
ET_MSC_LOGGER_SYNC_ENTRY("«ac.name»", "_receiveMessage")
«IF !xpac.stateMachine.empty»
- receiveEvent(self«IF handleEvents», (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage)))«ENDIF»);
+ «langExt.operationScope(ac.name, false)»receiveEvent(self«IF handleEvents», (etPort*)ifitem, msg->evtID, (void*)(((char*)msg)+MEM_CEIL(sizeof(etMessage)))«ENDIF»);
«ENDIF»
ET_MSC_LOGGER_SYNC_EXIT
@@ -242,7 +243,7 @@ class ActorClassGen extends GenericActorClassGenerator {
ET_MSC_LOGGER_SYNC_ENTRY("«ac.name»", "_execute")
«IF !xpac.stateMachine.empty»
- receiveEvent(self«IF handleEvents», NULL, 0, NULL«ENDIF»);
+ «langExt.operationScope(ac.name, false)»receiveEvent(self«IF handleEvents», NULL, 0, NULL«ENDIF»);
«ENDIF»
ET_MSC_LOGGER_SYNC_EXIT
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/StateMachineGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/StateMachineGen.xtend
index 252bd0214..00384db6e 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/StateMachineGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/StateMachineGen.xtend
@@ -50,7 +50,7 @@ class StateMachineGen extends GenericStateMachineGenerator {
for (i=0; i<«ac.name.toUpperCase»_HISTORY_SIZE; ++i)
self->history[i] = NO_STATE;
}
- executeInitTransition(self);
+ «langExt.operationScope(ac.name, false)»executeInitTransition(self);
'''}
override genExtra(ExpandedActorClass xpac) {
@@ -60,6 +60,10 @@ class StateMachineGen extends GenericStateMachineGenerator {
«langExt.accessLevelPrivate»void setState(«ac.name»* self, int new_state) {
self->state = new_state;
}
+
+ «langExt.accessLevelPrivate»int getState(«ac.name»* self) {
+ return self->state;
+ }
'''
}
}
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 110a5cc24..f0d78acb6 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
@@ -27,6 +27,7 @@ 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.ILanguageExtension;
import org.eclipse.etrice.generator.generic.ProcedureHelpers;
import org.eclipse.etrice.generator.generic.RoomExtensions;
import org.eclipse.xtend2.lib.StringConcatenation;
@@ -41,6 +42,9 @@ public class ActorClassGen extends GenericActorClassGenerator {
private JavaIoFileSystemAccess fileAccess;
@Inject
+ private ILanguageExtension langExt;
+
+ @Inject
private CExtensions _cExtensions;
@Inject
@@ -683,6 +687,9 @@ public class ActorClassGen extends GenericActorClassGenerator {
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
+ String _name_6 = ac.getName();
+ String _operationScope = this.langExt.operationScope(_name_6, false);
+ _builder.append(_operationScope, " ");
_builder.append("receiveEvent(self");
{
if (handleEvents) {
@@ -710,17 +717,17 @@ public class ActorClassGen extends GenericActorClassGenerator {
}
if (_or_1) {
_builder.append("void ");
- String _name_6 = ac.getName();
- _builder.append(_name_6, "");
- _builder.append("_execute(");
String _name_7 = ac.getName();
_builder.append(_name_7, "");
+ _builder.append("_execute(");
+ String _name_8 = ac.getName();
+ _builder.append(_name_8, "");
_builder.append("* self) {");
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("ET_MSC_LOGGER_SYNC_ENTRY(\"");
- String _name_8 = ac.getName();
- _builder.append(_name_8, " ");
+ String _name_9 = ac.getName();
+ _builder.append(_name_9, " ");
_builder.append("\", \"_execute\")");
_builder.newLineIfNotEmpty();
{
@@ -731,6 +738,9 @@ public class ActorClassGen extends GenericActorClassGenerator {
_builder.append("\t");
_builder.newLine();
_builder.append("\t");
+ String _name_10 = ac.getName();
+ String _operationScope_1 = this.langExt.operationScope(_name_10, false);
+ _builder.append(_operationScope_1, " ");
_builder.append("receiveEvent(self");
{
if (handleEvents) {
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 de6d18f93..aeb1f86f4 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
@@ -85,8 +85,11 @@ public class StateMachineGen extends GenericStateMachineGenerator {
_builder.newLine();
_builder.append("}");
_builder.newLine();
+ String _name_1 = ac.getName();
+ String _operationScope = this.langExt.operationScope(_name_1, false);
+ _builder.append(_operationScope, "");
_builder.append("executeInitTransition(self);");
- _builder.newLine();
+ _builder.newLineIfNotEmpty();
_xblockexpression = (_builder);
}
return _xblockexpression;
@@ -110,6 +113,19 @@ public class StateMachineGen extends GenericStateMachineGenerator {
_builder.newLine();
_builder.append("}");
_builder.newLine();
+ _builder.newLine();
+ String _accessLevelPrivate_1 = this.langExt.accessLevelPrivate();
+ _builder.append(_accessLevelPrivate_1, "");
+ _builder.append("int getState(");
+ String _name_1 = ac.getName();
+ _builder.append(_name_1, "");
+ _builder.append("* self) {");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("return self->state;");
+ _builder.newLine();
+ _builder.append("}");
+ _builder.newLine();
_xblockexpression = (_builder);
}
return _xblockexpression;
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.xtend b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.xtend
index 710b3ba7b..d8d7e9007 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.xtend
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.xtend
@@ -94,11 +94,32 @@ class GenericStateMachineGenerator {
def genStateMachine(ExpandedActorClass xpac) {
xpac.genStateMachine(true)
}
+
def genStateMachine(ExpandedActorClass xpac, boolean shallGenerateOneFile) {
val ac = xpac.actorClass
val async = ac.commType==ActorCommunicationType::ASYNCHRONOUS
val eventDriven = ac.commType==ActorCommunicationType::EVENT_DRIVEN
val handleEvents = async || eventDriven
+ val opScope = langExt.operationScope(ac.name, false)
+ val opScopePriv = if (langExt.usesInheritance)
+ opScope
+ else
+ ""
+ val publicIf = if (langExt.usesInheritance)
+ langExt.accessLevelPublic
+ else
+ langExt.accessLevelPrivate
+ val privAccess = langExt.accessLevelPrivate
+ val self = langExt.selfPointer(ac.name, true)
+ val selfOnly = langExt.selfPointer(ac.name, false)
+ val getLocalId = if (langExt.usesInheritance) {
+ if (langExt.usesPointers)
+ "->getLocalId()"
+ else
+ ".getLocalId()"
+ }
+ else
+ "->localId"
'''
«IF shallGenerateOneFile»
@@ -126,7 +147,7 @@ class GenericStateMachineGenerator {
«IF (!langExt.usesInheritance || xpac.isOwnObject(tr)) && tr.hasActionCode()»
«var start = xpac.getChain(tr).transition»
«var hasArgs = start instanceof NonInitialTransition && !(start instanceof GuardedTransition)»
- «langExt.accessLevelProtected»void «IF !shallGenerateOneFile»«ac.name»::«ENDIF»«tr.getActionCodeOperationName()»(«langExt.selfPointer(ac.name, hasArgs)»«IF hasArgs»«"InterfaceItemBase".constPointer» ifitem«transitionChainGenerator.generateArgumentList(xpac, tr)»«ENDIF») {
+ «langExt.accessLevelProtected»void «opScopePriv»«tr.getActionCodeOperationName()»(«langExt.selfPointer(ac.name, hasArgs)»«IF hasArgs»InterfaceItemBase«langExt.pointerLiteral()» ifitem«transitionChainGenerator.generateArgumentList(xpac, tr)»«ENDIF») {
«AbstractGenerator::getInstance().getTranslatedCode(tr.action)»
}
«ENDIF»
@@ -139,7 +160,7 @@ class GenericStateMachineGenerator {
* @param to - the final parent state
* @param handler - entry and exit codes are called only if not handler (for handler TransitionPoints)
*/
- «langExt.accessLevelPrivate»void «IF !shallGenerateOneFile»«ac.name»::«ENDIF»exitTo(«langExt.selfPointer(ac.name, true)»int current, int to, «boolType» handler) {
+ «privAccess»void «opScopePriv»exitTo(«self»int current, int to, «boolType» handler) {
while (current!=to) {
switch (current) {
«FOR state : xpac.stateMachine.getBaseStateList()»
@@ -160,7 +181,7 @@ class GenericStateMachineGenerator {
* @param generic_data - the generic data pointer
* @return the ID of the final state
*/
- «langExt.accessLevelPrivate»int «IF !shallGenerateOneFile»«ac.name»::«ENDIF»executeTransitionChain(«langExt.selfPointer(ac.name, true)»int chain«IF handleEvents», «"InterfaceItemBase".constPointer» ifitem, «langExt.voidPointer» generic_data«ENDIF») {
+ «privAccess»int «opScopePriv»executeTransitionChain(«self»int chain«IF handleEvents», InterfaceItemBase«langExt.pointerLiteral()» ifitem, «langExt.voidPointer» generic_data«ENDIF») {
switch (chain) {
«var allchains = xpac.getTransitionChains()»
«FOR tc : allchains»
@@ -179,7 +200,7 @@ class GenericStateMachineGenerator {
* @param handler - entry code is executed if not handler
* @return - the ID of the final leaf state
*/
- «langExt.accessLevelPrivate»int «IF !shallGenerateOneFile»«ac.name»::«ENDIF»enterHistory(«langExt.selfPointer(ac.name, true)»int state, «boolType» handler, «boolType» skip_entry) {
+ «privAccess»int «opScopePriv»enterHistory(«self»int state, «boolType» handler, «boolType» skip_entry) {
while («langExt.booleanConstant(true)») {
switch (state) {
«FOR state : xpac.stateMachine.getBaseStateList()»
@@ -215,20 +236,20 @@ class GenericStateMachineGenerator {
//return NO_STATE; // required by CDT but detected as unreachable by JDT because of while (true)
}
- «IF langExt.usesInheritance»«langExt.accessLevelPublic»«ELSE»«langExt.accessLevelPrivate»«ENDIF»void «IF !shallGenerateOneFile»«ac.name»::«ENDIF»executeInitTransition(«langExt.selfPointer(ac.name, false)») {
+ «publicIf»void «opScope»executeInitTransition(«selfOnly») {
«var initt = xpac.stateMachine.getInitTransition()»
int chain = «xpac.getChain(initt).getChainId()»;
- int next = executeTransitionChain(«langExt.selfPointer(true)»chain«IF handleEvents», «langExt.nullPointer», «langExt.nullPointer»«ENDIF»);
- next = enterHistory(«langExt.selfPointer(true)»next, «langExt.booleanConstant(false)», «langExt.booleanConstant(false)»);
+ int next = «opScopePriv»executeTransitionChain(«langExt.selfPointer(true)»chain«IF handleEvents», «langExt.nullPointer», «langExt.nullPointer»«ENDIF»);
+ next = «opScopePriv»enterHistory(«langExt.selfPointer(true)»next, «langExt.booleanConstant(false)», «langExt.booleanConstant(false)»);
setState(«langExt.selfPointer(true)»next);
}
/* receiveEvent contains the main implementation of the FSM */
- «IF langExt.usesInheritance»«langExt.accessLevelPublic»«ELSE»«langExt.accessLevelPrivate»«ENDIF»void «IF !shallGenerateOneFile»«ac.name»::«ENDIF»receiveEvent(«langExt.selfPointer(ac.name, handleEvents)»«IF handleEvents»«"InterfaceItemBase".pointer» ifitem, int evt, «langExt.voidPointer» generic_data«ENDIF») {
+ «publicIf»void «opScope»receiveEvent(«langExt.selfPointer(ac.name, handleEvents)»«IF handleEvents»InterfaceItemBase«langExt.pointerLiteral()» ifitem, int evt, «langExt.voidPointer» generic_data«ENDIF») {
«IF async»
- int trigger = (ifitem==«langExt.nullPointer»)? POLLING : «IF langExt.usesPointers»ifitem->getLocalId()«ELSE»ifitem.getLocalId()«ENDIF» + EVT_SHIFT*evt;
+ int trigger = (ifitem==«langExt.nullPointer»)? POLLING : ifitem«getLocalId» + EVT_SHIFT*evt;
«ELSEIF eventDriven»
- int trigger = «IF langExt.usesPointers»ifitem->getLocalId()«ELSE»ifitem.getLocalId()«ENDIF» + EVT_SHIFT*evt;
+ int trigger = ifitem«getLocalId» + EVT_SHIFT*evt;
«ENDIF»
int chain = NOT_CAUGHT;
int catching_state = NO_STATE;
@@ -243,9 +264,9 @@ class GenericStateMachineGenerator {
«genStateSwitch(xpac)»
«ENDIF»
if (chain != NOT_CAUGHT) {
- exitTo(getState(), catching_state, is_handler);
- int next = executeTransitionChain(«langExt.selfPointer(true)»chain«IF handleEvents», ifitem, generic_data«ENDIF»);
- next = enterHistory(«langExt.selfPointer(true)»next, is_handler, skip_entry);
+ «opScopePriv»exitTo(«langExt.selfPointer(true)»getState(«langExt.selfPointer(false)»), catching_state, is_handler);
+ int next = «opScopePriv»executeTransitionChain(«langExt.selfPointer(true)»chain«IF handleEvents», ifitem, generic_data«ENDIF»);
+ next = «opScopePriv»enterHistory(«langExt.selfPointer(true)»next, is_handler, skip_entry);
setState(«langExt.selfPointer(true)»next);
}
}
@@ -260,7 +281,7 @@ class GenericStateMachineGenerator {
var eventDriven = xpac.actorClass.commType==ActorCommunicationType::EVENT_DRIVEN
var dataDriven = xpac.actorClass.commType==ActorCommunicationType::DATA_DRIVEN
'''
- switch (getState()) {
+ switch (getState(«langExt.selfPointer(false)»)) {
«FOR state : xpac.stateMachine.getLeafStateList()»
case «state.getStateId()»:
«IF async»
@@ -366,6 +387,11 @@ class GenericStateMachineGenerator {
def private genActionCodeMethods(ExpandedActorClass xpac, State state, boolean generateImplementation) {
val ac = xpac.actorClass
val selfPtr = langExt.selfPointer(xpac.actorClass.name, false)
+ val opScope = langExt.operationScope(ac.name, false)
+ val opScopePriv = if (langExt.usesInheritance)
+ opScope
+ else
+ ""
val entryOp = state.getEntryCodeOperationName()
val exitOp = state.getExitCodeOperationName()
val doOp = state.getDoCodeOperationName()
@@ -397,7 +423,7 @@ class GenericStateMachineGenerator {
'''
«IF !entry.empty»
«IF generateImplementation»
- «langExt.accessLevelProtected»void «scopePrefix(ac.name)»«entryOp»(«selfPtr») {
+ «langExt.accessLevelProtected»void «opScopePriv»«entryOp»(«selfPtr») {
«entry»
}
«ELSE»
@@ -406,7 +432,7 @@ class GenericStateMachineGenerator {
«ENDIF»
«IF !exit.empty»
«IF generateImplementation»
- «langExt.accessLevelProtected»void «scopePrefix(ac.name)»«exitOp»(«selfPtr») {
+ «langExt.accessLevelProtected»void «opScopePriv»«exitOp»(«selfPtr») {
«exit»
}
«ELSE»
@@ -415,7 +441,7 @@ class GenericStateMachineGenerator {
«ENDIF»
«IF !docode.empty»
«IF generateImplementation»
- «langExt.accessLevelProtected» void «scopePrefix(ac.name)»«doOp»(«selfPtr») {
+ «langExt.accessLevelProtected» void «opScopePriv»«doOp»(«selfPtr») {
«docode»
}
«ELSE»
@@ -424,24 +450,11 @@ class GenericStateMachineGenerator {
«ENDIF»
'''
}
- def constRef(String classname) {
- return classname
- }
-
- def addressOp(String classname) {
- return classname
- }
def constPointer(String classname) {
return classname
}
- def pointer(String classname) {
- return classname
- }
- def scopePrefix(String classname) {
- return ""
- }
def boolType() {
return "boolean"
}
@@ -452,6 +465,7 @@ class GenericStateMachineGenerator {
val async = ac.commType==ActorCommunicationType::ASYNCHRONOUS
val eventDriven = ac.commType==ActorCommunicationType::EVENT_DRIVEN
val handleEvents = async || eventDriven
+ val self = langExt.selfPointer(ac.name, true)
'''
@@ -490,7 +504,7 @@ class GenericStateMachineGenerator {
* @param to - the final parent state
* @param handler - entry and exit codes are called only if not handler (for handler TransitionPoints)
*/
- void exitTo(«langExt.selfPointer(ac.name, true)»int current, int to, «boolType» handler);
+ void exitTo(«self»int current, int to, «boolType» handler);
/**
* calls action, entry and exit codes along a transition chain. The generic data are cast to typed data
@@ -499,7 +513,7 @@ class GenericStateMachineGenerator {
* @param generic_data - the generic data pointer
* @return the ID of the final state
*/
- int executeTransitionChain(«langExt.selfPointer(ac.name, true)»int chain«IF handleEvents», «constPointer("etRuntime::InterfaceItemBase")» ifitem, «langExt.voidPointer» generic_data«ENDIF»);
+ int executeTransitionChain(«self»int chain«IF handleEvents», «constPointer("etRuntime::InterfaceItemBase")» ifitem, «langExt.voidPointer» generic_data«ENDIF»);
/**
* calls entry codes while entering a state's history. The ID of the final leaf state is returned
@@ -507,7 +521,7 @@ class GenericStateMachineGenerator {
* @param handler - entry code is executed if not handler
* @return - the ID of the final leaf state
*/
- int enterHistory(«langExt.selfPointer(ac.name, true)»int state, «boolType» handler, «boolType» skip_entry);
+ int enterHistory(«self»int state, «boolType» handler, «boolType» skip_entry);
public:
diff --git a/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java b/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java
index 642b3449d..8dca94aac 100644
--- a/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java
+++ b/plugins/org.eclipse.etrice.generator/xtend-gen/org/eclipse/etrice/generator/generic/GenericStateMachineGenerator.java
@@ -186,6 +186,46 @@ public class GenericStateMachineGenerator {
_or = (async || eventDriven);
}
final boolean handleEvents = _or;
+ String _name = ac.getName();
+ final String opScope = this.langExt.operationScope(_name, false);
+ String _xifexpression = null;
+ boolean _usesInheritance = this.langExt.usesInheritance();
+ if (_usesInheritance) {
+ _xifexpression = opScope;
+ } else {
+ _xifexpression = "";
+ }
+ final String opScopePriv = _xifexpression;
+ String _xifexpression_1 = null;
+ boolean _usesInheritance_1 = this.langExt.usesInheritance();
+ if (_usesInheritance_1) {
+ String _accessLevelPublic = this.langExt.accessLevelPublic();
+ _xifexpression_1 = _accessLevelPublic;
+ } else {
+ String _accessLevelPrivate = this.langExt.accessLevelPrivate();
+ _xifexpression_1 = _accessLevelPrivate;
+ }
+ final String publicIf = _xifexpression_1;
+ final String privAccess = this.langExt.accessLevelPrivate();
+ String _name_1 = ac.getName();
+ final String self = this.langExt.selfPointer(_name_1, true);
+ String _name_2 = ac.getName();
+ final String selfOnly = this.langExt.selfPointer(_name_2, false);
+ String _xifexpression_2 = null;
+ boolean _usesInheritance_2 = this.langExt.usesInheritance();
+ if (_usesInheritance_2) {
+ String _xifexpression_3 = null;
+ boolean _usesPointers = this.langExt.usesPointers();
+ if (_usesPointers) {
+ _xifexpression_3 = "->getLocalId()";
+ } else {
+ _xifexpression_3 = ".getLocalId()";
+ }
+ _xifexpression_2 = _xifexpression_3;
+ } else {
+ _xifexpression_2 = "->localId";
+ }
+ final String getLocalId = _xifexpression_2;
StringConcatenation _builder = new StringConcatenation();
{
if (shallGenerateOneFile) {
@@ -221,8 +261,8 @@ public class GenericStateMachineGenerator {
for(final State state : _stateList) {
{
boolean _or_1 = false;
- boolean _usesInheritance = this.langExt.usesInheritance();
- boolean _not = (!_usesInheritance);
+ boolean _usesInheritance_3 = this.langExt.usesInheritance();
+ boolean _not = (!_usesInheritance_3);
if (_not) {
_or_1 = true;
} else {
@@ -247,8 +287,8 @@ public class GenericStateMachineGenerator {
{
boolean _and = false;
boolean _or_2 = false;
- boolean _usesInheritance_1 = this.langExt.usesInheritance();
- boolean _not_1 = (!_usesInheritance_1);
+ boolean _usesInheritance_4 = this.langExt.usesInheritance();
+ boolean _not_1 = (!_usesInheritance_4);
if (_not_1) {
_or_2 = true;
} else {
@@ -277,24 +317,18 @@ public class GenericStateMachineGenerator {
String _accessLevelProtected = this.langExt.accessLevelProtected();
_builder.append(_accessLevelProtected, "");
_builder.append("void ");
- {
- boolean _not_3 = (!shallGenerateOneFile);
- if (_not_3) {
- String _name = ac.getName();
- _builder.append(_name, "");
- _builder.append("::");
- }
- }
+ _builder.append(opScopePriv, "");
String _actionCodeOperationName = CodegenHelpers.getActionCodeOperationName(tr);
_builder.append(_actionCodeOperationName, "");
_builder.append("(");
- String _name_1 = ac.getName();
- String _selfPointer = this.langExt.selfPointer(_name_1, hasArgs);
+ String _name_3 = ac.getName();
+ String _selfPointer = this.langExt.selfPointer(_name_3, hasArgs);
_builder.append(_selfPointer, "");
{
if (hasArgs) {
- String _constPointer = this.constPointer("InterfaceItemBase");
- _builder.append(_constPointer, "");
+ _builder.append("InterfaceItemBase");
+ String _pointerLiteral = this.langExt.pointerLiteral();
+ _builder.append(_pointerLiteral, "");
_builder.append(" ifitem");
String _generateArgumentList = this.transitionChainGenerator.generateArgumentList(xpac, tr);
_builder.append(_generateArgumentList, "");
@@ -335,21 +369,11 @@ public class GenericStateMachineGenerator {
_builder.append(" ");
_builder.append("*/");
_builder.newLine();
- String _accessLevelPrivate = this.langExt.accessLevelPrivate();
- _builder.append(_accessLevelPrivate, "");
+ _builder.append(privAccess, "");
_builder.append("void ");
- {
- boolean _not_4 = (!shallGenerateOneFile);
- if (_not_4) {
- String _name_2 = ac.getName();
- _builder.append(_name_2, "");
- _builder.append("::");
- }
- }
+ _builder.append(opScopePriv, "");
_builder.append("exitTo(");
- String _name_3 = ac.getName();
- String _selfPointer_1 = this.langExt.selfPointer(_name_3, true);
- _builder.append(_selfPointer_1, "");
+ _builder.append(self, "");
_builder.append("int current, int to, ");
String _boolType = this.boolType();
_builder.append(_boolType, "");
@@ -380,8 +404,8 @@ public class GenericStateMachineGenerator {
String _exitCodeOperationName = CodegenHelpers.getExitCodeOperationName(state_1);
_builder.append(_exitCodeOperationName, " ");
_builder.append("(");
- String _selfPointer_2 = this.langExt.selfPointer(false);
- _builder.append(_selfPointer_2, " ");
+ String _selfPointer_1 = this.langExt.selfPointer(false);
+ _builder.append(_selfPointer_1, " ");
_builder.append(");");
}
}
@@ -440,27 +464,17 @@ public class GenericStateMachineGenerator {
_builder.append(" ");
_builder.append("*/");
_builder.newLine();
- String _accessLevelPrivate_1 = this.langExt.accessLevelPrivate();
- _builder.append(_accessLevelPrivate_1, "");
+ _builder.append(privAccess, "");
_builder.append("int ");
- {
- boolean _not_5 = (!shallGenerateOneFile);
- if (_not_5) {
- String _name_4 = ac.getName();
- _builder.append(_name_4, "");
- _builder.append("::");
- }
- }
+ _builder.append(opScopePriv, "");
_builder.append("executeTransitionChain(");
- String _name_5 = ac.getName();
- String _selfPointer_3 = this.langExt.selfPointer(_name_5, true);
- _builder.append(_selfPointer_3, "");
+ _builder.append(self, "");
_builder.append("int chain");
{
if (handleEvents) {
- _builder.append(", ");
- String _constPointer_1 = this.constPointer("InterfaceItemBase");
- _builder.append(_constPointer_1, "");
+ _builder.append(", InterfaceItemBase");
+ String _pointerLiteral_1 = this.langExt.pointerLiteral();
+ _builder.append(_pointerLiteral_1, "");
_builder.append(" ifitem, ");
String _voidPointer = this.langExt.voidPointer();
_builder.append(_voidPointer, "");
@@ -522,21 +536,11 @@ public class GenericStateMachineGenerator {
_builder.append(" ");
_builder.append("*/");
_builder.newLine();
- String _accessLevelPrivate_2 = this.langExt.accessLevelPrivate();
- _builder.append(_accessLevelPrivate_2, "");
+ _builder.append(privAccess, "");
_builder.append("int ");
- {
- boolean _not_6 = (!shallGenerateOneFile);
- if (_not_6) {
- String _name_6 = ac.getName();
- _builder.append(_name_6, "");
- _builder.append("::");
- }
- }
+ _builder.append(opScopePriv, "");
_builder.append("enterHistory(");
- String _name_7 = ac.getName();
- String _selfPointer_4 = this.langExt.selfPointer(_name_7, true);
- _builder.append(_selfPointer_4, "");
+ _builder.append(self, "");
_builder.append("int state, ");
String _boolType_1 = this.boolType();
_builder.append(_boolType_1, "");
@@ -573,8 +577,8 @@ public class GenericStateMachineGenerator {
String _entryCodeOperationName = CodegenHelpers.getEntryCodeOperationName(state_2);
_builder.append(_entryCodeOperationName, " ");
_builder.append("(");
- String _selfPointer_5 = this.langExt.selfPointer(false);
- _builder.append(_selfPointer_5, " ");
+ String _selfPointer_2 = this.langExt.selfPointer(false);
+ _builder.append(_selfPointer_2, " ");
_builder.append(");");
}
}
@@ -626,8 +630,8 @@ public class GenericStateMachineGenerator {
_builder.append("\t");
_builder.append("\t");
_builder.append("state = executeTransitionChain(");
- String _selfPointer_6 = this.langExt.selfPointer(true);
- _builder.append(_selfPointer_6, " ");
+ String _selfPointer_3 = this.langExt.selfPointer(true);
+ _builder.append(_selfPointer_3, " ");
TransitionChain _chain_1 = xpac.getChain(sub_initt);
String _chainId_1 = this._roomExtensions.getChainId(_chain_1);
_builder.append(_chainId_1, " ");
@@ -721,29 +725,11 @@ public class GenericStateMachineGenerator {
_builder.append("}");
_builder.newLine();
_builder.newLine();
- {
- boolean _usesInheritance_2 = this.langExt.usesInheritance();
- if (_usesInheritance_2) {
- String _accessLevelPublic = this.langExt.accessLevelPublic();
- _builder.append(_accessLevelPublic, "");
- } else {
- String _accessLevelPrivate_3 = this.langExt.accessLevelPrivate();
- _builder.append(_accessLevelPrivate_3, "");
- }
- }
+ _builder.append(publicIf, "");
_builder.append("void ");
- {
- boolean _not_7 = (!shallGenerateOneFile);
- if (_not_7) {
- String _name_8 = ac.getName();
- _builder.append(_name_8, "");
- _builder.append("::");
- }
- }
+ _builder.append(opScope, "");
_builder.append("executeInitTransition(");
- String _name_9 = ac.getName();
- String _selfPointer_7 = this.langExt.selfPointer(_name_9, false);
- _builder.append(_selfPointer_7, "");
+ _builder.append(selfOnly, "");
_builder.append(") {");
_builder.newLineIfNotEmpty();
_builder.append("\t");
@@ -758,9 +744,11 @@ public class GenericStateMachineGenerator {
_builder.append(";");
_builder.newLineIfNotEmpty();
_builder.append("\t");
- _builder.append("int next = executeTransitionChain(");
- String _selfPointer_8 = this.langExt.selfPointer(true);
- _builder.append(_selfPointer_8, " ");
+ _builder.append("int next = ");
+ _builder.append(opScopePriv, " ");
+ _builder.append("executeTransitionChain(");
+ String _selfPointer_4 = this.langExt.selfPointer(true);
+ _builder.append(_selfPointer_4, " ");
_builder.append("chain");
{
if (handleEvents) {
@@ -775,9 +763,11 @@ public class GenericStateMachineGenerator {
_builder.append(");");
_builder.newLineIfNotEmpty();
_builder.append("\t");
- _builder.append("next = enterHistory(");
- String _selfPointer_9 = this.langExt.selfPointer(true);
- _builder.append(_selfPointer_9, " ");
+ _builder.append("next = ");
+ _builder.append(opScopePriv, " ");
+ _builder.append("enterHistory(");
+ String _selfPointer_5 = this.langExt.selfPointer(true);
+ _builder.append(_selfPointer_5, " ");
_builder.append("next, ");
String _booleanConstant_2 = this.langExt.booleanConstant(false);
_builder.append(_booleanConstant_2, " ");
@@ -788,8 +778,8 @@ public class GenericStateMachineGenerator {
_builder.newLineIfNotEmpty();
_builder.append("\t");
_builder.append("setState(");
- String _selfPointer_10 = this.langExt.selfPointer(true);
- _builder.append(_selfPointer_10, " ");
+ String _selfPointer_6 = this.langExt.selfPointer(true);
+ _builder.append(_selfPointer_6, " ");
_builder.append("next);");
_builder.newLineIfNotEmpty();
_builder.append("}");
@@ -797,33 +787,18 @@ public class GenericStateMachineGenerator {
_builder.newLine();
_builder.append("/* receiveEvent contains the main implementation of the FSM */");
_builder.newLine();
- {
- boolean _usesInheritance_3 = this.langExt.usesInheritance();
- if (_usesInheritance_3) {
- String _accessLevelPublic_1 = this.langExt.accessLevelPublic();
- _builder.append(_accessLevelPublic_1, "");
- } else {
- String _accessLevelPrivate_4 = this.langExt.accessLevelPrivate();
- _builder.append(_accessLevelPrivate_4, "");
- }
- }
+ _builder.append(publicIf, "");
_builder.append("void ");
- {
- boolean _not_8 = (!shallGenerateOneFile);
- if (_not_8) {
- String _name_10 = ac.getName();
- _builder.append(_name_10, "");
- _builder.append("::");
- }
- }
+ _builder.append(opScope, "");
_builder.append("receiveEvent(");
- String _name_11 = ac.getName();
- String _selfPointer_11 = this.langExt.selfPointer(_name_11, handleEvents);
- _builder.append(_selfPointer_11, "");
+ String _name_4 = ac.getName();
+ String _selfPointer_7 = this.langExt.selfPointer(_name_4, handleEvents);
+ _builder.append(_selfPointer_7, "");
{
if (handleEvents) {
- String _pointer = this.pointer("InterfaceItemBase");
- _builder.append(_pointer, "");
+ _builder.append("InterfaceItemBase");
+ String _pointerLiteral_2 = this.langExt.pointerLiteral();
+ _builder.append(_pointerLiteral_2, "");
_builder.append(" ifitem, int evt, ");
String _voidPointer_1 = this.langExt.voidPointer();
_builder.append(_voidPointer_1, "");
@@ -838,29 +813,15 @@ public class GenericStateMachineGenerator {
_builder.append("int trigger = (ifitem==");
String _nullPointer_4 = this.langExt.nullPointer();
_builder.append(_nullPointer_4, " ");
- _builder.append(")? POLLING : ");
- {
- boolean _usesPointers = this.langExt.usesPointers();
- if (_usesPointers) {
- _builder.append("ifitem->getLocalId()");
- } else {
- _builder.append("ifitem.getLocalId()");
- }
- }
+ _builder.append(")? POLLING : ifitem");
+ _builder.append(getLocalId, " ");
_builder.append(" + EVT_SHIFT*evt;");
_builder.newLineIfNotEmpty();
} else {
if (eventDriven) {
_builder.append("\t");
- _builder.append("int trigger = ");
- {
- boolean _usesPointers_1 = this.langExt.usesPointers();
- if (_usesPointers_1) {
- _builder.append("ifitem->getLocalId()");
- } else {
- _builder.append("ifitem.getLocalId()");
- }
- }
+ _builder.append("int trigger = ifitem");
+ _builder.append(getLocalId, " ");
_builder.append(" + EVT_SHIFT*evt;");
_builder.newLineIfNotEmpty();
}
@@ -914,12 +875,21 @@ public class GenericStateMachineGenerator {
_builder.append("if (chain != NOT_CAUGHT) {");
_builder.newLine();
_builder.append("\t\t");
- _builder.append("exitTo(getState(), catching_state, is_handler);");
- _builder.newLine();
+ _builder.append(opScopePriv, " ");
+ _builder.append("exitTo(");
+ String _selfPointer_8 = this.langExt.selfPointer(true);
+ _builder.append(_selfPointer_8, " ");
+ _builder.append("getState(");
+ String _selfPointer_9 = this.langExt.selfPointer(false);
+ _builder.append(_selfPointer_9, " ");
+ _builder.append("), catching_state, is_handler);");
+ _builder.newLineIfNotEmpty();
_builder.append("\t\t");
- _builder.append("int next = executeTransitionChain(");
- String _selfPointer_12 = this.langExt.selfPointer(true);
- _builder.append(_selfPointer_12, " ");
+ _builder.append("int next = ");
+ _builder.append(opScopePriv, " ");
+ _builder.append("executeTransitionChain(");
+ String _selfPointer_10 = this.langExt.selfPointer(true);
+ _builder.append(_selfPointer_10, " ");
_builder.append("chain");
{
if (handleEvents) {
@@ -929,15 +899,17 @@ public class GenericStateMachineGenerator {
_builder.append(");");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
- _builder.append("next = enterHistory(");
- String _selfPointer_13 = this.langExt.selfPointer(true);
- _builder.append(_selfPointer_13, " ");
+ _builder.append("next = ");
+ _builder.append(opScopePriv, " ");
+ _builder.append("enterHistory(");
+ String _selfPointer_11 = this.langExt.selfPointer(true);
+ _builder.append(_selfPointer_11, " ");
_builder.append("next, is_handler, skip_entry);");
_builder.newLineIfNotEmpty();
_builder.append("\t\t");
_builder.append("setState(");
- String _selfPointer_14 = this.langExt.selfPointer(true);
- _builder.append(_selfPointer_14, " ");
+ String _selfPointer_12 = this.langExt.selfPointer(true);
+ _builder.append(_selfPointer_12, " ");
_builder.append("next);");
_builder.newLineIfNotEmpty();
_builder.append("\t");
@@ -971,8 +943,11 @@ public class GenericStateMachineGenerator {
ActorCommunicationType _commType_2 = _actorClass_2.getCommType();
boolean dataDriven = Objects.equal(_commType_2, ActorCommunicationType.DATA_DRIVEN);
StringConcatenation _builder = new StringConcatenation();
- _builder.append("switch (getState()) {");
- _builder.newLine();
+ _builder.append("switch (getState(");
+ String _selfPointer = this.langExt.selfPointer(false);
+ _builder.append(_selfPointer, "");
+ _builder.append(")) {");
+ _builder.newLineIfNotEmpty();
{
StateGraph _stateMachine = xpac.getStateMachine();
List<State> _leafStateList = this._roomExtensions.getLeafStateList(_stateMachine);
@@ -1338,6 +1313,16 @@ public class GenericStateMachineGenerator {
ActorClass _actorClass = xpac.getActorClass();
String _name = _actorClass.getName();
final String selfPtr = this.langExt.selfPointer(_name, false);
+ String _name_1 = ac.getName();
+ final String opScope = this.langExt.operationScope(_name_1, false);
+ String _xifexpression = null;
+ boolean _usesInheritance = this.langExt.usesInheritance();
+ if (_usesInheritance) {
+ _xifexpression = opScope;
+ } else {
+ _xifexpression = "";
+ }
+ final String opScopePriv = _xifexpression;
final String entryOp = CodegenHelpers.getEntryCodeOperationName(state);
final String exitOp = CodegenHelpers.getExitCodeOperationName(state);
final String doOp = CodegenHelpers.getDoCodeOperationName(state);
@@ -1361,8 +1346,8 @@ public class GenericStateMachineGenerator {
AbstractGenerator _instance_5 = AbstractGenerator.getInstance();
DetailCode _inheritedDo = rs.getInheritedDo();
final String inhDo = _instance_5.getTranslatedCode(_inheritedDo);
- boolean _usesInheritance = this.langExt.usesInheritance();
- if (_usesInheritance) {
+ boolean _usesInheritance_1 = this.langExt.usesInheritance();
+ if (_usesInheritance_1) {
ActorClass _actorClass_1 = xpac.getActorClass();
ActorClass _base = _actorClass_1.getBase();
final String baseName = _base.getName();
@@ -1409,9 +1394,7 @@ public class GenericStateMachineGenerator {
String _accessLevelProtected = this.langExt.accessLevelProtected();
_builder.append(_accessLevelProtected, "");
_builder.append("void ");
- String _name_1 = ac.getName();
- String _scopePrefix = this.scopePrefix(_name_1);
- _builder.append(_scopePrefix, "");
+ _builder.append(opScopePriv, "");
_builder.append(entryOp, "");
_builder.append("(");
_builder.append(selfPtr, "");
@@ -1444,9 +1427,7 @@ public class GenericStateMachineGenerator {
String _accessLevelProtected_2 = this.langExt.accessLevelProtected();
_builder.append(_accessLevelProtected_2, "");
_builder.append("void ");
- String _name_2 = ac.getName();
- String _scopePrefix_1 = this.scopePrefix(_name_2);
- _builder.append(_scopePrefix_1, "");
+ _builder.append(opScopePriv, "");
_builder.append(exitOp, "");
_builder.append("(");
_builder.append(selfPtr, "");
@@ -1479,9 +1460,7 @@ public class GenericStateMachineGenerator {
String _accessLevelProtected_4 = this.langExt.accessLevelProtected();
_builder.append(_accessLevelProtected_4, "");
_builder.append(" void ");
- String _name_3 = ac.getName();
- String _scopePrefix_2 = this.scopePrefix(_name_3);
- _builder.append(_scopePrefix_2, "");
+ _builder.append(opScopePriv, "");
_builder.append(doOp, "");
_builder.append("(");
_builder.append(selfPtr, "");
@@ -1510,26 +1489,10 @@ public class GenericStateMachineGenerator {
return _xblockexpression;
}
- public String constRef(final String classname) {
- return classname;
- }
-
- public String addressOp(final String classname) {
- return classname;
- }
-
public String constPointer(final String classname) {
return classname;
}
- public String pointer(final String classname) {
- return classname;
- }
-
- public String scopePrefix(final String classname) {
- return "";
- }
-
public String boolType() {
return "boolean";
}
@@ -1549,6 +1512,8 @@ public class GenericStateMachineGenerator {
_or = (async || eventDriven);
}
final boolean handleEvents = _or;
+ String _name = ac.getName();
+ final String self = this.langExt.selfPointer(_name, true);
StringConcatenation _builder = new StringConcatenation();
_builder.newLine();
_builder.append("/* state IDs */");
@@ -1640,8 +1605,8 @@ public class GenericStateMachineGenerator {
String _actionCodeOperationName = CodegenHelpers.getActionCodeOperationName(tr);
_builder.append(_actionCodeOperationName, "");
_builder.append("(");
- String _name = ac.getName();
- String _selfPointer = this.langExt.selfPointer(_name, hasArgs);
+ String _name_1 = ac.getName();
+ String _selfPointer = this.langExt.selfPointer(_name_1, hasArgs);
_builder.append(_selfPointer, "");
{
if (hasArgs) {
@@ -1684,9 +1649,7 @@ public class GenericStateMachineGenerator {
_builder.newLine();
_builder.append("\t");
_builder.append("void exitTo(");
- String _name_1 = ac.getName();
- String _selfPointer_1 = this.langExt.selfPointer(_name_1, true);
- _builder.append(_selfPointer_1, " ");
+ _builder.append(self, " ");
_builder.append("int current, int to, ");
String _boolType = this.boolType();
_builder.append(_boolType, " ");
@@ -1717,9 +1680,7 @@ public class GenericStateMachineGenerator {
_builder.newLine();
_builder.append("\t");
_builder.append("int executeTransitionChain(");
- String _name_2 = ac.getName();
- String _selfPointer_2 = this.langExt.selfPointer(_name_2, true);
- _builder.append(_selfPointer_2, " ");
+ _builder.append(self, " ");
_builder.append("int chain");
{
if (handleEvents) {
@@ -1756,9 +1717,7 @@ public class GenericStateMachineGenerator {
_builder.newLine();
_builder.append("\t");
_builder.append("int enterHistory(");
- String _name_3 = ac.getName();
- String _selfPointer_3 = this.langExt.selfPointer(_name_3, true);
- _builder.append(_selfPointer_3, " ");
+ _builder.append(self, " ");
_builder.append("int state, ");
String _boolType_1 = this.boolType();
_builder.append(_boolType_1, " ");
@@ -1773,9 +1732,9 @@ public class GenericStateMachineGenerator {
_builder.newLine();
_builder.append("\t");
_builder.append("void executeInitTransition(");
- String _name_4 = ac.getName();
- String _selfPointer_4 = this.langExt.selfPointer(_name_4, false);
- _builder.append(_selfPointer_4, " ");
+ String _name_2 = ac.getName();
+ String _selfPointer_1 = this.langExt.selfPointer(_name_2, false);
+ _builder.append(_selfPointer_1, " ");
_builder.append(");");
_builder.newLineIfNotEmpty();
_builder.append("\t");
@@ -1785,9 +1744,9 @@ public class GenericStateMachineGenerator {
_builder.newLine();
_builder.append("\t");
_builder.append("void receiveEvent(");
- String _name_5 = ac.getName();
- String _selfPointer_5 = this.langExt.selfPointer(_name_5, handleEvents);
- _builder.append(_selfPointer_5, " ");
+ String _name_3 = ac.getName();
+ String _selfPointer_2 = this.langExt.selfPointer(_name_3, handleEvents);
+ _builder.append(_selfPointer_2, " ");
{
if (handleEvents) {
_builder.append("etRuntime::InterfaceItemBase* ifitem, int evt, ");
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.c b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.c
index b7ae57028..5783e905d 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.c
@@ -12,7 +12,7 @@
#include "modelbase/etActor.h"
-etBool handleSystemEvent(InterfaceItemBase ifitem, int evt, void* generic_data) {
+etBool handleSystemEvent(InterfaceItemBase* ifitem, int evt, void* generic_data) {
/* TODO */
return FALSE;
}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.h b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.h
index 182a2f912..4791fa991 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etActor.h
@@ -19,6 +19,6 @@
#define NOT_CAUGHT 0
#define EVT_SHIFT 100
-etBool handleSystemEvent(InterfaceItemBase ifitem, int evt, void* generic_data);
+etBool handleSystemEvent(InterfaceItemBase* ifitem, int evt, void* generic_data);
#endif /* _ETACTOR_H_ */
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.h b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.h
index f6fe71c2d..dbeeaa7e0 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/modelbase/etPort.h
@@ -50,7 +50,7 @@ typedef struct {
const etReplSubPort* ports;
} etReplPort;
-typedef etPort* InterfaceItemBase;
+typedef etPort InterfaceItemBase;
//void etPort_receive(const etPort* self, const etMessage* msg);
void etPort_sendMessage(const etPort* self, etInt16 evtId, int size, void* data);

Back to the top