Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2012-11-12 17:05:42 +0000
committerJuergen Haug2012-11-12 17:05:42 +0000
commitcee5a6f76524b0a1412f48ff759c95da41d06c62 (patch)
tree4d65255620698094f687feeb0edfc198ae11abd8 /plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice
parent7ac63420d6f275c0d34347b765fa6d957d1d15fc (diff)
downloadorg.eclipse.etrice-cee5a6f76524b0a1412f48ff759c95da41d06c62.tar.gz
org.eclipse.etrice-cee5a6f76524b0a1412f48ff759c95da41d06c62.tar.xz
org.eclipse.etrice-cee5a6f76524b0a1412f48ff759c95da41d06c62.zip
[CQ][generator.java] port config fix
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.config/src/org/eclipse/etrice')
-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
2 files changed, 12 insertions, 1 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 ea7ebfb66..df5949be2 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 25e0d6bb6..e7a2c5673 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,

Back to the top