summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2012-11-12 12:05:42 (EST)
committerJuergen Haug2012-11-12 12:05:42 (EST)
commitcee5a6f76524b0a1412f48ff759c95da41d06c62 (patch)
tree4d65255620698094f687feeb0edfc198ae11abd8
parent7ac63420d6f275c0d34347b765fa6d957d1d15fc (diff)
downloadorg.eclipse.etrice-cee5a6f76524b0a1412f48ff759c95da41d06c62.zip
org.eclipse.etrice-cee5a6f76524b0a1412f48ff759c95da41d06c62.tar.gz
org.eclipse.etrice-cee5a6f76524b0a1412f48ff759c95da41d06c62.tar.bz2
[CQ][generator.java] port config fixrefs/changes/43/8643/1
-rw-r--r--plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend6
-rw-r--r--plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/util/DataConfigurationHelper.java7
-rw-r--r--plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/.DataConfiguration.java._tracebin41616 -> 45396 bytes
-rw-r--r--plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java19
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.xtend38
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend2
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.java138
-rw-r--r--plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java2
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/IDataConfiguration.java2
9 files changed, 185 insertions, 29 deletions
diff --git a/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend b/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend
index ea7ebfb..df5949b 100644
--- a/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend
+++ b/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/DataConfiguration.xtend
@@ -30,6 +30,7 @@ import org.eclipse.etrice.core.config.RealLiteral
import org.eclipse.etrice.core.config.StringLiteral
import org.eclipse.etrice.core.config.LiteralArray
import org.eclipse.etrice.core.config.Literal
+import org.eclipse.etrice.core.room.InterfaceItem
class DataConfiguration implements IDataConfiguration {
@@ -75,6 +76,11 @@ class DataConfiguration implements IDataConfiguration {
DataConfigurationHelper::actorInstanceAttrMap.get(id)?.value?.toStringExpr
}
+ override getAttrInstanceConfigValue(ActorInstance ai, InterfaceItem port, List<Attribute> path) {
+ var id = ai.path+"/"+port.name+"/"+path.toStringPath
+ DataConfigurationHelper::actorInstanceAttrMap.get(id)?.value?.toStringExpr
+ }
+
// dynamic
override getPollingTimerUser(SubSystemClass subsystem) {
diff --git a/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/util/DataConfigurationHelper.java b/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/util/DataConfigurationHelper.java
index 25e0d6b..e7a2c56 100644
--- a/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/util/DataConfigurationHelper.java
+++ b/plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice/generator/config/util/DataConfigurationHelper.java
@@ -26,6 +26,7 @@ import org.eclipse.etrice.core.config.ActorInstanceConfig;
import org.eclipse.etrice.core.config.AttrClassConfig;
import org.eclipse.etrice.core.config.AttrInstanceConfig;
import org.eclipse.etrice.core.config.ConfigModel;
+import org.eclipse.etrice.core.config.PortInstanceConfig;
import org.eclipse.etrice.core.config.ProtocolClassConfig;
import org.eclipse.etrice.core.config.SubSystemConfig;
import org.eclipse.etrice.core.config.util.ConfigUtil;
@@ -127,7 +128,7 @@ public class DataConfigurationHelper {
String path, Map<String, AttrInstanceConfig> map) {
for (AttrInstanceConfig c : actorConfig.getAttributes()) {
collectConfigs(c, path + "/" + c.getAttribute().getName(), map);
-
+
if (c.isDynConfig()) {
List<AttrInstanceConfig> list = dynActorInstanceAttrMap
.get(path);
@@ -144,6 +145,10 @@ public class DataConfigurationHelper {
dynActorClassAttrMap.put(ac, list);
}
}
+ for(PortInstanceConfig c : actorConfig.getPorts()){
+ for(AttrInstanceConfig a : c.getAttributes())
+ collectConfigs(a, path+"/"+c.getItem().getName()+"/"+a.getAttribute().getName(), map);
+ }
}
private static void collectConfigs(ProtocolClassConfig protocolConfig,
diff --git a/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/.DataConfiguration.java._trace b/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/.DataConfiguration.java._trace
index 5be2e69..2a02988 100644
--- a/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/.DataConfiguration.java._trace
+++ b/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/.DataConfiguration.java._trace
Binary files differ
diff --git a/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java b/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java
index d7f51d1..3109e59 100644
--- a/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java
+++ b/plugins/org.eclipse.etrice.generator.config/xtend-gen/org/eclipse/etrice/generator/config/DataConfiguration.java
@@ -21,6 +21,7 @@ import org.eclipse.etrice.core.genmodel.base.ILogger;
import org.eclipse.etrice.core.genmodel.etricegen.ActorInstance;
import org.eclipse.etrice.core.room.ActorClass;
import org.eclipse.etrice.core.room.Attribute;
+import org.eclipse.etrice.core.room.InterfaceItem;
import org.eclipse.etrice.core.room.ProtocolClass;
import org.eclipse.etrice.core.room.SubSystemClass;
import org.eclipse.etrice.generator.base.IDataConfiguration;
@@ -138,6 +139,24 @@ public class DataConfiguration implements IDataConfiguration {
return _xblockexpression;
}
+ public String getAttrInstanceConfigValue(final ActorInstance ai, final InterfaceItem port, final List<Attribute> path) {
+ String _xblockexpression = null;
+ {
+ String _path = ai.getPath();
+ String _plus = (_path + "/");
+ String _name = port.getName();
+ String _plus_1 = (_plus + _name);
+ String _plus_2 = (_plus_1 + "/");
+ String _stringPath = this.toStringPath(path);
+ String id = (_plus_2 + _stringPath);
+ AttrInstanceConfig _get = DataConfigurationHelper.actorInstanceAttrMap.get(id);
+ LiteralArray _value = _get==null?(LiteralArray)null:_get.getValue();
+ String _stringExpr = _value==null?(String)null:this.toStringExpr(_value);
+ _xblockexpression = (_stringExpr);
+ }
+ return _xblockexpression;
+ }
+
public int getPollingTimerUser(final SubSystemClass subsystem) {
SubSystemConfig _config = this.getConfig(subsystem);
DynamicConfig _dynConfig = _config==null?(DynamicConfig)null:_config.getDynConfig();
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.xtend
index 12666fc..bb4c4e3 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.xtend
@@ -13,17 +13,20 @@
package org.eclipse.etrice.generator.java.gen
import com.google.inject.Inject
+import java.util.ArrayList
+import java.util.List
import org.eclipse.etrice.core.genmodel.etricegen.ActorInstance
import org.eclipse.etrice.core.room.ActorClass
import org.eclipse.etrice.core.room.Attribute
import org.eclipse.etrice.core.room.DataClass
+import org.eclipse.etrice.core.room.GeneralProtocolClass
+import org.eclipse.etrice.core.room.InterfaceItem
import org.eclipse.etrice.core.room.PrimitiveType
+import org.eclipse.etrice.core.room.ProtocolClass
import org.eclipse.etrice.generator.base.IDataConfiguration
import org.eclipse.etrice.generator.generic.ProcedureHelpers
import org.eclipse.etrice.generator.generic.RoomExtensions
import org.eclipse.etrice.generator.generic.TypeHelpers
-import java.util.List
-import java.util.ArrayList
class ConfigGenAddon {
@@ -37,16 +40,39 @@ class ConfigGenAddon {
def public genActorInstanceConfig(ActorInstance ai, String aiVariableName){'''
«FOR a : ai.actorClass.attributes»
- «applyInstanceConfig(ai, aiVariableName, new ArrayList<Attribute>().union(a))»
+ «applyInstanceConfig(ai, null, aiVariableName, new ArrayList<Attribute>().union(a))»
+ «ENDFOR»
+ «FOR p : ai.actorClass.allEndPorts»
+ «FOR a : getAttributes(p.protocol, !p.conjugated)»
+ «applyInstanceConfig(ai, p, aiVariableName+"."+invokeGetter(p.name, null), new ArrayList<Attribute>().union(a))»
+ «ENDFOR»
+ «ENDFOR»
+ «FOR sap : ai.actorClass.allSAPs»
+ «FOR a : getAttributes(sap.protocol, true)»
+ «applyInstanceConfig(ai, sap, aiVariableName+"."+invokeGetter(sap.name, null), new ArrayList<Attribute>().union(a))»
+ «ENDFOR»
«ENDFOR»
'''
}
- def private applyInstanceConfig(ActorInstance ai, String invokes, List<Attribute> path){
+ def private List<Attribute> getAttributes(GeneralProtocolClass gpc, boolean regular){
+ var result = new ArrayList<Attribute>
+ if(gpc instanceof ProtocolClass){
+ var protocol = gpc as ProtocolClass
+ if(regular && protocol.regular?.attributes != null)
+ result.addAll(protocol.regular.attributes)
+ else if(!regular && protocol.conjugate?.attributes != null)
+ result.addAll(protocol.conjugate.attributes)
+ }
+ return result
+ }
+
+ def private applyInstanceConfig(ActorInstance ai, InterfaceItem port, String invokes, List<Attribute> path){
var a = path.last
var aType = a.refType.type
if(aType.primitive){
- var value = dataConfigExt.getAttrInstanceConfigValue(ai, path)
+ var value = if(port==null)dataConfigExt.getAttrInstanceConfigValue(ai, path)
+ else dataConfigExt.getAttrInstanceConfigValue(ai, port, path)
if(value == null)
''''''
else if(a.size == 0 || aType.characterType)
@@ -63,7 +89,7 @@ class ConfigGenAddon {
}
else if (aType.dataClass)'''
«FOR e : (aType as DataClass).attributes»
- «applyInstanceConfig(ai, invokes+"."+a.name.invokeGetter(null), path.union(e))»
+ «applyInstanceConfig(ai, port, invokes+"."+a.name.invokeGetter(null), path.union(e))»
«ENDFOR»
'''
}
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
index 85bc4a9..38208cb 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
@@ -110,7 +110,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
public «portClassName»(IEventReceiver actor, String name, int localId, int idx, Address addr, Address peerAddress) {
super(actor, name, localId, idx, addr, peerAddress);
«IF pclass!=null»
- «pclass.attributes.attributeInitialization(pc, true)»
+ «pclass.attributes.attributeInitialization(pclass, true)»
«ENDIF»
DebuggingService.getInstance().addPortInstance(this);
}
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.java
index 80d84c1..2ff8234 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ConfigGenAddon.java
@@ -10,8 +10,14 @@ import org.eclipse.etrice.core.room.ActorClass;
import org.eclipse.etrice.core.room.Attribute;
import org.eclipse.etrice.core.room.DataClass;
import org.eclipse.etrice.core.room.DataType;
+import org.eclipse.etrice.core.room.GeneralProtocolClass;
+import org.eclipse.etrice.core.room.InterfaceItem;
+import org.eclipse.etrice.core.room.Port;
+import org.eclipse.etrice.core.room.PortClass;
import org.eclipse.etrice.core.room.PrimitiveType;
+import org.eclipse.etrice.core.room.ProtocolClass;
import org.eclipse.etrice.core.room.RefableType;
+import org.eclipse.etrice.core.room.SAPRef;
import org.eclipse.etrice.generator.base.IDataConfiguration;
import org.eclipse.etrice.generator.generic.ProcedureHelpers;
import org.eclipse.etrice.generator.generic.RoomExtensions;
@@ -47,15 +53,98 @@ public class ConfigGenAddon {
for(final Attribute a : _attributes) {
ArrayList<Attribute> _arrayList = new ArrayList<Attribute>();
List<Attribute> _union = this._roomExtensions.<Attribute>union(_arrayList, a);
- CharSequence _applyInstanceConfig = this.applyInstanceConfig(ai, aiVariableName, _union);
+ CharSequence _applyInstanceConfig = this.applyInstanceConfig(ai, null, aiVariableName, _union);
_builder.append(_applyInstanceConfig, "");
_builder.newLineIfNotEmpty();
}
}
+ {
+ ActorClass _actorClass_1 = ai.getActorClass();
+ List<Port> _allEndPorts = this._roomExtensions.getAllEndPorts(_actorClass_1);
+ for(final Port p : _allEndPorts) {
+ {
+ GeneralProtocolClass _protocol = p.getProtocol();
+ boolean _isConjugated = p.isConjugated();
+ boolean _not = (!_isConjugated);
+ List<Attribute> _attributes_1 = this.getAttributes(_protocol, _not);
+ for(final Attribute a_1 : _attributes_1) {
+ String _plus = (aiVariableName + ".");
+ String _name = p.getName();
+ CharSequence _invokeGetter = this.helpers.invokeGetter(_name, null);
+ String _plus_1 = (_plus + _invokeGetter);
+ ArrayList<Attribute> _arrayList_1 = new ArrayList<Attribute>();
+ List<Attribute> _union_1 = this._roomExtensions.<Attribute>union(_arrayList_1, a_1);
+ CharSequence _applyInstanceConfig_1 = this.applyInstanceConfig(ai, p, _plus_1, _union_1);
+ _builder.append(_applyInstanceConfig_1, "");
+ _builder.newLineIfNotEmpty();
+ }
+ }
+ }
+ }
+ {
+ ActorClass _actorClass_2 = ai.getActorClass();
+ List<SAPRef> _allSAPs = this._roomExtensions.getAllSAPs(_actorClass_2);
+ for(final SAPRef sap : _allSAPs) {
+ {
+ ProtocolClass _protocol_1 = sap.getProtocol();
+ List<Attribute> _attributes_2 = this.getAttributes(_protocol_1, true);
+ for(final Attribute a_2 : _attributes_2) {
+ String _plus_2 = (aiVariableName + ".");
+ String _name_1 = sap.getName();
+ CharSequence _invokeGetter_1 = this.helpers.invokeGetter(_name_1, null);
+ String _plus_3 = (_plus_2 + _invokeGetter_1);
+ ArrayList<Attribute> _arrayList_2 = new ArrayList<Attribute>();
+ List<Attribute> _union_2 = this._roomExtensions.<Attribute>union(_arrayList_2, a_2);
+ CharSequence _applyInstanceConfig_2 = this.applyInstanceConfig(ai, sap, _plus_3, _union_2);
+ _builder.append(_applyInstanceConfig_2, "");
+ _builder.newLineIfNotEmpty();
+ }
+ }
+ }
+ }
return _builder;
}
- private CharSequence applyInstanceConfig(final ActorInstance ai, final String invokes, final List<Attribute> path) {
+ private List<Attribute> getAttributes(final GeneralProtocolClass gpc, final boolean regular) {
+ ArrayList<Attribute> _arrayList = new ArrayList<Attribute>();
+ ArrayList<Attribute> result = _arrayList;
+ if ((gpc instanceof ProtocolClass)) {
+ ProtocolClass protocol = ((ProtocolClass) gpc);
+ boolean _and = false;
+ if (!regular) {
+ _and = false;
+ } else {
+ PortClass _regular = protocol.getRegular();
+ EList<Attribute> _attributes = _regular==null?(EList<Attribute>)null:_regular.getAttributes();
+ boolean _notEquals = (!Objects.equal(_attributes, null));
+ _and = (regular && _notEquals);
+ }
+ if (_and) {
+ PortClass _regular_1 = protocol.getRegular();
+ EList<Attribute> _attributes_1 = _regular_1.getAttributes();
+ result.addAll(_attributes_1);
+ } else {
+ boolean _and_1 = false;
+ boolean _not = (!regular);
+ if (!_not) {
+ _and_1 = false;
+ } else {
+ PortClass _conjugate = protocol.getConjugate();
+ EList<Attribute> _attributes_2 = _conjugate==null?(EList<Attribute>)null:_conjugate.getAttributes();
+ boolean _notEquals_1 = (!Objects.equal(_attributes_2, null));
+ _and_1 = (_not && _notEquals_1);
+ }
+ if (_and_1) {
+ PortClass _conjugate_1 = protocol.getConjugate();
+ EList<Attribute> _attributes_3 = _conjugate_1.getAttributes();
+ result.addAll(_attributes_3);
+ }
+ }
+ }
+ return result;
+ }
+
+ private CharSequence applyInstanceConfig(final ActorInstance ai, final InterfaceItem port, final String invokes, final List<Attribute> path) {
CharSequence _xblockexpression = null;
{
Attribute a = IterableExtensions.<Attribute>last(path);
@@ -66,22 +155,31 @@ public class ConfigGenAddon {
if (_isPrimitive) {
CharSequence _xblockexpression_1 = null;
{
- String value = this.dataConfigExt.getAttrInstanceConfigValue(ai, path);
- CharSequence _xifexpression_1 = null;
- boolean _equals = Objects.equal(value, null);
+ String _xifexpression_1 = null;
+ boolean _equals = Objects.equal(port, null);
if (_equals) {
+ String _attrInstanceConfigValue = this.dataConfigExt.getAttrInstanceConfigValue(ai, path);
+ _xifexpression_1 = _attrInstanceConfigValue;
+ } else {
+ String _attrInstanceConfigValue_1 = this.dataConfigExt.getAttrInstanceConfigValue(ai, port, path);
+ _xifexpression_1 = _attrInstanceConfigValue_1;
+ }
+ String value = _xifexpression_1;
+ CharSequence _xifexpression_2 = null;
+ boolean _equals_1 = Objects.equal(value, null);
+ if (_equals_1) {
StringConcatenation _builder = new StringConcatenation();
- _xifexpression_1 = _builder;
+ _xifexpression_2 = _builder;
} else {
- CharSequence _xifexpression_2 = null;
+ CharSequence _xifexpression_3 = null;
boolean _or = false;
int _size = a.getSize();
- boolean _equals_1 = (_size == 0);
- if (_equals_1) {
+ boolean _equals_2 = (_size == 0);
+ if (_equals_2) {
_or = true;
} else {
boolean _isCharacterType = this.typeHelpers.isCharacterType(aType);
- _or = (_equals_1 || _isCharacterType);
+ _or = (_equals_2 || _isCharacterType);
}
if (_or) {
StringConcatenation _builder_1 = new StringConcatenation();
@@ -92,14 +190,14 @@ public class ConfigGenAddon {
CharSequence _invokeSetter = this.helpers.invokeSetter(_name, null, _valueLiteral);
_builder_1.append(_invokeSetter, "");
_builder_1.append(";");
- _xifexpression_2 = _builder_1;
+ _xifexpression_3 = _builder_1;
} else {
- CharSequence _xifexpression_3 = null;
+ CharSequence _xifexpression_4 = null;
int _size_1 = a.getSize();
String[] _split = value.split(",");
int _size_2 = ((List<String>)Conversions.doWrapArray(_split)).size();
- boolean _equals_2 = (_size_1 == _size_2);
- if (_equals_2) {
+ boolean _equals_3 = (_size_1 == _size_2);
+ if (_equals_3) {
CharSequence _xblockexpression_2 = null;
{
StringConcatenation _builder_2 = new StringConcatenation();
@@ -136,7 +234,7 @@ public class ConfigGenAddon {
_builder_3.append(";");
_xblockexpression_2 = (_builder_3);
}
- _xifexpression_3 = _xblockexpression_2;
+ _xifexpression_4 = _xblockexpression_2;
} else {
StringConcatenation _builder_2 = new StringConcatenation();
_builder_2.append("{");
@@ -165,13 +263,13 @@ public class ConfigGenAddon {
_builder_2.append(";");
_builder_2.newLineIfNotEmpty();
_builder_2.append("}");
- _xifexpression_3 = _builder_2;
+ _xifexpression_4 = _builder_2;
}
- _xifexpression_2 = _xifexpression_3;
+ _xifexpression_3 = _xifexpression_4;
}
- _xifexpression_1 = _xifexpression_2;
+ _xifexpression_2 = _xifexpression_3;
}
- _xblockexpression_1 = (_xifexpression_1);
+ _xblockexpression_1 = (_xifexpression_2);
}
_xifexpression = _xblockexpression_1;
} else {
@@ -187,7 +285,7 @@ public class ConfigGenAddon {
CharSequence _invokeGetter = this.helpers.invokeGetter(_name, null);
String _plus_1 = (_plus + _invokeGetter);
List<Attribute> _union = this._roomExtensions.<Attribute>union(path, e);
- CharSequence _applyInstanceConfig = this.applyInstanceConfig(ai, _plus_1, _union);
+ CharSequence _applyInstanceConfig = this.applyInstanceConfig(ai, port, _plus_1, _union);
_builder.append(_applyInstanceConfig, "");
_builder.newLineIfNotEmpty();
}
diff --git a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
index 6526e87..2b8c6b7 100644
--- a/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
+++ b/plugins/org.eclipse.etrice.generator.java/xtend-gen/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.java
@@ -252,7 +252,7 @@ public class ProtocolClassGen extends GenericProtocolClassGenerator {
if (_notEquals_1) {
_builder.append("\t\t");
EList<Attribute> _attributes = pclass.getAttributes();
- CharSequence _attributeInitialization = this._initialization.attributeInitialization(_attributes, pc, true);
+ CharSequence _attributeInitialization = this._initialization.attributeInitialization(_attributes, pclass, true);
_builder.append(_attributeInitialization, " ");
_builder.newLineIfNotEmpty();
}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/IDataConfiguration.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/IDataConfiguration.java
index 281e790..bfcef55 100644
--- a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/IDataConfiguration.java
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/base/IDataConfiguration.java
@@ -18,6 +18,7 @@ import org.eclipse.etrice.core.genmodel.base.ILogger;
import org.eclipse.etrice.core.genmodel.etricegen.ActorInstance;
import org.eclipse.etrice.core.room.ActorClass;
import org.eclipse.etrice.core.room.Attribute;
+import org.eclipse.etrice.core.room.InterfaceItem;
import org.eclipse.etrice.core.room.ProtocolClass;
import org.eclipse.etrice.core.room.SubSystemClass;
@@ -34,6 +35,7 @@ public interface IDataConfiguration {
public String getAttrClassConfigMaxValue(ActorClass actor, List<Attribute> path);
public String getAttrInstanceConfigValue(ActorInstance ai, List<Attribute> path);
+ public String getAttrInstanceConfigValue(ActorInstance ai, InterfaceItem port, List<Attribute> path);
// dynamic configuration