Commit 8e95f43a authored by Evgeny Kusmenko's avatar Evgeny Kusmenko
Browse files

Merge branch 'BreakingSymbolUpdate' into 'master'

Breaking symbol update

See merge request !7
parents 07a52abb ea354813
Pipeline #65249 passed with stages
in 1 minute and 13 seconds
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<groupId>de.monticore.lang.monticar</groupId> <groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-roscpp-generator</artifactId> <artifactId>embedded-montiarc-math-roscpp-generator</artifactId>
<version>0.0.5-SNAPSHOT</version> <version>0.1.0-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= --> <!-- == PROJECT DEPENDENCIES ============================================= -->
...@@ -17,10 +17,9 @@ ...@@ -17,10 +17,9 @@
<!-- .. SE-Libraries .................................................. --> <!-- .. SE-Libraries .................................................. -->
<se-commons.version>1.7.7</se-commons.version> <se-commons.version>1.7.7</se-commons.version>
<Embedded-MontiArc-Math.version>0.0.19-SNAPSHOT</Embedded-MontiArc-Math.version> <Embedded-MontiArc-Math.version>0.1.0-SNAPSHOT</Embedded-MontiArc-Math.version>
<Embedded-montiarc-math-generator.version>0.0.22-SNAPSHOT</Embedded-montiarc-math-generator.version> <Embedded-montiarc-math-rosmsg-generator.version>0.1.0-SNAPSHOT</Embedded-montiarc-math-rosmsg-generator.version>
<Embedded-montiarc-math-rosmsg-generator.version>0.0.3-SNAPSHOT</Embedded-montiarc-math-rosmsg-generator.version>
<tagging.version>0.0.6</tagging.version>
<!-- .. Libraries .................................................. --> <!-- .. Libraries .................................................. -->
<guava.version>18.0</guava.version> <guava.version>18.0</guava.version>
<junit.version>4.12</junit.version> <junit.version>4.12</junit.version>
...@@ -28,7 +27,6 @@ ...@@ -28,7 +27,6 @@
<yamlbeans.version>1.12</yamlbeans.version> <yamlbeans.version>1.12</yamlbeans.version>
<!-- .. Plugins ....................................................... --> <!-- .. Plugins ....................................................... -->
<monticore.plugin>4.5.3-SNAPSHOT</monticore.plugin>
<assembly.plugin>2.5.4</assembly.plugin> <assembly.plugin>2.5.4</assembly.plugin>
<compiler.plugin>3.3</compiler.plugin> <compiler.plugin>3.3</compiler.plugin>
<source.plugin>2.4</source.plugin> <source.plugin>2.4</source.plugin>
...@@ -49,23 +47,12 @@ ...@@ -49,23 +47,12 @@
<dependencies> <dependencies>
<dependency>
<groupId>de.monticore.lang</groupId>
<artifactId>Tagging</artifactId>
<version>${tagging.version}</version>
</dependency>
<dependency> <dependency>
<groupId>de.se_rwth.commons</groupId> <groupId>de.se_rwth.commons</groupId>
<artifactId>se-commons-logging</artifactId> <artifactId>se-commons-logging</artifactId>
<version>${se-commons.version}</version> <version>${se-commons.version}</version>
</dependency> </dependency>
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-generator</artifactId>
<version>${Embedded-montiarc-math-generator.version}</version>
</dependency>
<dependency> <dependency>
<groupId>de.monticore.lang.monticar</groupId> <groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-rosmsg-generator</artifactId> <artifactId>embedded-montiarc-math-rosmsg-generator</artifactId>
......
package de.monticore.lang.monticar.generator.roscpp; package de.monticore.lang.monticar.generator.roscpp;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.PortSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAPortSymbol;
import de.monticore.lang.monticar.generator.roscpp.helper.NameHelper; import de.monticore.lang.monticar.generator.roscpp.helper.NameHelper;
public class DirectMsgConverter implements MsgConverter { public class DirectMsgConverter implements MsgConverter {
...@@ -18,7 +18,7 @@ public class DirectMsgConverter implements MsgConverter { ...@@ -18,7 +18,7 @@ public class DirectMsgConverter implements MsgConverter {
} }
@Override @Override
public String getConversion(PortSymbol portSymbol) { public String getConversion(EMAPortSymbol portSymbol) {
return !isMsgToPort ? "." + msgField + " = component->" + NameHelper.getPortNameTargetLanguage(portSymbol) : "msg->" + msgField; return !isMsgToPort ? "." + msgField + " = component->" + NameHelper.getPortNameTargetLanguage(portSymbol) : "msg->" + msgField;
} }
......
package de.monticore.lang.monticar.generator.roscpp; package de.monticore.lang.monticar.generator.roscpp;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.monticar.generator.FileContent; import de.monticore.lang.monticar.generator.rosmsg.util.FileContent;
import de.monticore.lang.monticar.generator.cpp.BluePrintCPP; import de.monticore.lang.monticar.generator.roscpp.util.BluePrintCPP;
import de.monticore.lang.monticar.generator.roscpp.helper.FormatHelper; import de.monticore.lang.monticar.generator.roscpp.helper.FormatHelper;
import de.monticore.lang.monticar.generator.roscpp.helper.NameHelper; import de.monticore.lang.monticar.generator.roscpp.helper.NameHelper;
import de.monticore.lang.monticar.generator.roscpp.helper.PrinterHelper; import de.monticore.lang.monticar.generator.roscpp.helper.PrinterHelper;
...@@ -36,7 +36,7 @@ public class GeneratorRosCpp { ...@@ -36,7 +36,7 @@ public class GeneratorRosCpp {
this.generationTargetPath = generationTargetPath; this.generationTargetPath = generationTargetPath;
} }
public List<File> generateFiles(ExpandedComponentInstanceSymbol component, TaggingResolver symtab) throws IOException { public List<File> generateFiles(EMAComponentInstanceSymbol component, TaggingResolver symtab) throws IOException {
List<FileContent> fileContents = generateStrings(component); List<FileContent> fileContents = generateStrings(component);
if (getGenerationTargetPath().charAt(getGenerationTargetPath().length() - 1) != '/') { if (getGenerationTargetPath().charAt(getGenerationTargetPath().length() - 1) != '/') {
...@@ -66,7 +66,7 @@ public class GeneratorRosCpp { ...@@ -66,7 +66,7 @@ public class GeneratorRosCpp {
return f; return f;
} }
public List<FileContent> generateStrings(ExpandedComponentInstanceSymbol component) { public List<FileContent> generateStrings(EMAComponentInstanceSymbol component) {
List<FileContent> fileContents = new ArrayList<>(); List<FileContent> fileContents = new ArrayList<>();
fileContents.addAll(generateRosAdapter(component)); fileContents.addAll(generateRosAdapter(component));
fileContents.stream() fileContents.stream()
...@@ -75,7 +75,7 @@ public class GeneratorRosCpp { ...@@ -75,7 +75,7 @@ public class GeneratorRosCpp {
return fileContents; return fileContents;
} }
private List<FileContent> generateRosAdapter(ExpandedComponentInstanceSymbol component) { private List<FileContent> generateRosAdapter(EMAComponentInstanceSymbol component) {
List<FileContent> res = new ArrayList<>(); List<FileContent> res = new ArrayList<>();
FileContent apdapter = new FileContent(); FileContent apdapter = new FileContent();
......
package de.monticore.lang.monticar.generator.roscpp; package de.monticore.lang.monticar.generator.roscpp;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.monticar.generator.FileContent;
import de.monticore.lang.monticar.generator.roscpp.helper.NameHelper; import de.monticore.lang.monticar.generator.roscpp.helper.NameHelper;
import de.monticore.lang.monticar.generator.rosmsg.util.FileContent;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -23,7 +23,7 @@ public class LanguageUnitRosCMake { ...@@ -23,7 +23,7 @@ public class LanguageUnitRosCMake {
"\n" + "\n" +
"export(TARGETS <name> FILE <name>.cmake)"; "export(TARGETS <name> FILE <name>.cmake)";
FileContent generate(ExpandedComponentInstanceSymbol componentInstanceSymbol, List<String> additionalPackages) { FileContent generate(EMAComponentInstanceSymbol componentInstanceSymbol, List<String> additionalPackages) {
FileContent fileContent = new FileContent(); FileContent fileContent = new FileContent();
fileContent.setFileName("CMakeLists.txt"); fileContent.setFileName("CMakeLists.txt");
......
package de.monticore.lang.monticar.generator.roscpp; package de.monticore.lang.monticar.generator.roscpp;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.PortSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAPortSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosConnectionSymbol; import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosConnectionSymbol;
import de.monticore.lang.monticar.generator.*; import de.monticore.lang.monticar.generator.roscpp.util.*;
import de.monticore.lang.monticar.generator.cpp.BluePrintCPP;
import de.monticore.lang.monticar.generator.roscpp.helper.NameHelper; import de.monticore.lang.monticar.generator.roscpp.helper.NameHelper;
import de.monticore.lang.monticar.generator.roscpp.helper.TagHelper; import de.monticore.lang.monticar.generator.roscpp.helper.TagHelper;
import de.monticore.lang.monticar.generator.roscpp.instructions.*; import de.monticore.lang.monticar.generator.roscpp.instructions.*;
...@@ -29,7 +28,7 @@ public class LanguageUnitRosCppAdapter { ...@@ -29,7 +28,7 @@ public class LanguageUnitRosCppAdapter {
return additionalPackages; return additionalPackages;
} }
public Optional<BluePrintCPP> generateBluePrint(ExpandedComponentInstanceSymbol componentSymbol) { public Optional<BluePrintCPP> generateBluePrint(EMAComponentInstanceSymbol componentSymbol) {
BluePrintCPP currentBluePrint = null; BluePrintCPP currentBluePrint = null;
...@@ -37,8 +36,8 @@ public class LanguageUnitRosCppAdapter { ...@@ -37,8 +36,8 @@ public class LanguageUnitRosCppAdapter {
String name = NameHelper.getAdapterName(componentSymbol); String name = NameHelper.getAdapterName(componentSymbol);
currentBluePrint = new BluePrintCPP(name); currentBluePrint = new BluePrintCPP(name);
List<PortSymbol> rosPorts = componentSymbol.getPortsList().stream() List<EMAPortSymbol> rosPorts = componentSymbol.getPortInstanceList().stream()
.filter(PortSymbol::isRosPort) .filter(EMAPortSymbol::isRosPort)
.collect(Collectors.toList()); .collect(Collectors.toList());
generateFields(componentSymbol, rosPorts, currentBluePrint); generateFields(componentSymbol, rosPorts, currentBluePrint);
...@@ -54,7 +53,7 @@ public class LanguageUnitRosCppAdapter { ...@@ -54,7 +53,7 @@ public class LanguageUnitRosCppAdapter {
} }
private void generateIncludes(ExpandedComponentInstanceSymbol componentSymbol, List<PortSymbol> rosPorts, BluePrintCPP currentBluePrint) { private void generateIncludes(EMAComponentInstanceSymbol componentSymbol, List<EMAPortSymbol> rosPorts, BluePrintCPP currentBluePrint) {
currentBluePrint.addAdditionalIncludeString("<ros/ros.h>"); currentBluePrint.addAdditionalIncludeString("<ros/ros.h>");
String compName = NameHelper.getComponentNameTargetLanguage(componentSymbol.getFullName()); String compName = NameHelper.getComponentNameTargetLanguage(componentSymbol.getFullName());
currentBluePrint.addAdditionalIncludeString("\"" + compName + ".h\""); currentBluePrint.addAdditionalIncludeString("\"" + compName + ".h\"");
...@@ -62,7 +61,7 @@ public class LanguageUnitRosCppAdapter { ...@@ -62,7 +61,7 @@ public class LanguageUnitRosCppAdapter {
//Add each msg include exactly once //Add each msg include exactly once
rosPorts.stream() rosPorts.stream()
.map(PortSymbol::getMiddlewareSymbol) .map(EMAPortSymbol::getMiddlewareSymbol)
.map(Optional::get) .map(Optional::get)
.map(mws -> (RosConnectionSymbol) mws) .map(mws -> (RosConnectionSymbol) mws)
.map(RosConnectionSymbol::getTopicType) .map(RosConnectionSymbol::getTopicType)
...@@ -78,7 +77,7 @@ public class LanguageUnitRosCppAdapter { ...@@ -78,7 +77,7 @@ public class LanguageUnitRosCppAdapter {
.forEach(currentBluePrint::addAdditionalIncludeString); .forEach(currentBluePrint::addAdditionalIncludeString);
} }
private void generatePublishMethods(List<PortSymbol> rosPorts, BluePrint currentBluePrint) { private void generatePublishMethods(List<EMAPortSymbol> rosPorts, BluePrintCPP currentBluePrint) {
Map<String, Method> topicToMethod = new HashMap<>(); Map<String, Method> topicToMethod = new HashMap<>();
publishers.keySet().forEach(var -> { publishers.keySet().forEach(var -> {
...@@ -89,8 +88,8 @@ public class LanguageUnitRosCppAdapter { ...@@ -89,8 +88,8 @@ public class LanguageUnitRosCppAdapter {
}); });
rosPorts.stream() rosPorts.stream()
.filter(PortSymbol::isOutgoing) .filter(EMAPortSymbol::isOutgoing)
.sorted(Comparator.comparing(PortSymbol::getName)) .sorted(Comparator.comparing(EMAPortSymbol::getName))
.forEachOrdered(p -> { .forEachOrdered(p -> {
RosConnectionSymbol rcs = (RosConnectionSymbol) p.getMiddlewareSymbol().get(); RosConnectionSymbol rcs = (RosConnectionSymbol) p.getMiddlewareSymbol().get();
Method method = topicToMethod.get(rcs.getTopicName().get()); Method method = topicToMethod.get(rcs.getTopicName().get());
...@@ -119,13 +118,13 @@ public class LanguageUnitRosCppAdapter { ...@@ -119,13 +118,13 @@ public class LanguageUnitRosCppAdapter {
.replace("]", "_"); .replace("]", "_");
} }
private void generateConstructor(String classname, BluePrint currentBluePrint) { private void generateConstructor(String classname, BluePrintCPP currentBluePrint) {
Method constructorMethod = new Method(classname, ""); Method constructorMethod = new Method(classname, "");
constructorMethod.addInstruction(new TargetCodeInstruction("")); constructorMethod.addInstruction(new TargetCodeInstruction(""));
currentBluePrint.addMethod(constructorMethod); currentBluePrint.addMethod(constructorMethod);
} }
public void generateInit(String classname, String componentName, BluePrint currentBluePrint) { public void generateInit(String classname, String componentName, BluePrintCPP currentBluePrint) {
Method initMethod = new Method("init", "void"); Method initMethod = new Method("init", "void");
Variable compPointer = new Variable(); Variable compPointer = new Variable();
...@@ -157,7 +156,7 @@ public class LanguageUnitRosCppAdapter { ...@@ -157,7 +156,7 @@ public class LanguageUnitRosCppAdapter {
currentBluePrint.addMethod(initMethod); currentBluePrint.addMethod(initMethod);
} }
private void generateFields(ExpandedComponentInstanceSymbol symbol, List<PortSymbol> rosPorts, BluePrintCPP currBluePrint) { private void generateFields(EMAComponentInstanceSymbol symbol, List<EMAPortSymbol> rosPorts, BluePrintCPP currBluePrint) {
currBluePrint.addDefineGenerics(symbol); currBluePrint.addDefineGenerics(symbol);
//component //component
Variable componentField = new Variable(); Variable componentField = new Variable();
...@@ -171,7 +170,7 @@ public class LanguageUnitRosCppAdapter { ...@@ -171,7 +170,7 @@ public class LanguageUnitRosCppAdapter {
//subs //subs
rosPorts.stream() rosPorts.stream()
.filter(PortSymbol::isIncoming) .filter(EMAPortSymbol::isIncoming)
.map(p -> (RosConnectionSymbol) p.getMiddlewareSymbol().get()) .map(p -> (RosConnectionSymbol) p.getMiddlewareSymbol().get())
.forEach(rosConnectionSymbol -> { .forEach(rosConnectionSymbol -> {
String name = getTopicNameTargetLanguage(rosConnectionSymbol.getTopicName().get()).toLowerCase() + "Subscriber"; String name = getTopicNameTargetLanguage(rosConnectionSymbol.getTopicName().get()).toLowerCase() + "Subscriber";
...@@ -187,7 +186,7 @@ public class LanguageUnitRosCppAdapter { ...@@ -187,7 +186,7 @@ public class LanguageUnitRosCppAdapter {
//pubs //pubs
rosPorts.stream() rosPorts.stream()
.filter(PortSymbol::isOutgoing) .filter(EMAPortSymbol::isOutgoing)
.map(p -> (RosConnectionSymbol) p.getMiddlewareSymbol().get()) .map(p -> (RosConnectionSymbol) p.getMiddlewareSymbol().get())
.forEach(rosConnectionSymbol -> { .forEach(rosConnectionSymbol -> {
String name = getTopicNameTargetLanguage(rosConnectionSymbol.getTopicName().get()).toLowerCase() + "Publisher"; String name = getTopicNameTargetLanguage(rosConnectionSymbol.getTopicName().get()).toLowerCase() + "Publisher";
...@@ -204,7 +203,7 @@ public class LanguageUnitRosCppAdapter { ...@@ -204,7 +203,7 @@ public class LanguageUnitRosCppAdapter {
} }
private void generateTick(BluePrint currentBluePrint) { private void generateTick(BluePrintCPP currentBluePrint) {
Method tickMethod = new Method("tick", "void"); Method tickMethod = new Method("tick", "void");
publishMethods.stream() publishMethods.stream()
...@@ -223,13 +222,13 @@ public class LanguageUnitRosCppAdapter { ...@@ -223,13 +222,13 @@ public class LanguageUnitRosCppAdapter {
return rosConnectionSymbol.getTopicType().get().replace("/", "::"); return rosConnectionSymbol.getTopicType().get().replace("/", "::");
} }
private void generateCallbacks(List<PortSymbol> rosPorts, BluePrint currentBluePrint) { private void generateCallbacks(List<EMAPortSymbol> rosPorts, BluePrintCPP currentBluePrint) {
Map<String, Method> uniqueMethods = new HashMap<>(); Map<String, Method> uniqueMethods = new HashMap<>();
rosPorts.stream() rosPorts.stream()
.filter(PortSymbol::isIncoming) .filter(EMAPortSymbol::isIncoming)
.forEachOrdered(portSymbol -> { .forEachOrdered(portSymbol -> {
RosConnectionSymbol rosCon = (RosConnectionSymbol) portSymbol.getMiddlewareSymbol().get(); RosConnectionSymbol rosCon = (RosConnectionSymbol) portSymbol.getMiddlewareSymbol().get();
if (!uniqueMethods.containsKey(rosCon.getTopicName().get())) { if (!uniqueMethods.containsKey(rosCon.getTopicName().get())) {
......
package de.monticore.lang.monticar.generator.roscpp; package de.monticore.lang.monticar.generator.roscpp;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.PortSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAPortSymbol;
import de.monticore.lang.monticar.generator.roscpp.helper.NameHelper; import de.monticore.lang.monticar.generator.roscpp.helper.NameHelper;
import java.util.Set; import java.util.Set;
...@@ -25,7 +25,7 @@ public class MethodMsgConverter implements MsgConverter { ...@@ -25,7 +25,7 @@ public class MethodMsgConverter implements MsgConverter {
} }
@Override @Override
public String getConversion(PortSymbol portSymbol) { public String getConversion(EMAPortSymbol portSymbol) {
return isMsgToPort ? methodNameWithClass + "(msg)" : " = " + methodNameWithClass + "(component->" + (NameHelper.getPortNameTargetLanguage(portSymbol) + ")"); return isMsgToPort ? methodNameWithClass + "(msg)" : " = " + methodNameWithClass + "(component->" + (NameHelper.getPortNameTargetLanguage(portSymbol) + ")");
} }
......
package de.monticore.lang.monticar.generator.roscpp; package de.monticore.lang.monticar.generator.roscpp;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.PortSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAPortSymbol;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;
...@@ -14,7 +14,7 @@ public interface MsgConverter { ...@@ -14,7 +14,7 @@ public interface MsgConverter {
return !isMsgToPort(); return !isMsgToPort();
} }
String getConversion(PortSymbol portSymbol); String getConversion(EMAPortSymbol portSymbol);
default Set<String> getAdditionalIncludes() { default Set<String> getAdditionalIncludes() {
return Collections.emptySet(); return Collections.emptySet();
......
package de.monticore.lang.monticar.generator.roscpp; package de.monticore.lang.monticar.generator.roscpp;
import com.google.common.base.Objects; import com.google.common.base.Objects;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.PortSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAPortSymbol;
import de.monticore.lang.monticar.generator.Method; import de.monticore.lang.monticar.generator.roscpp.util.Method;
import de.monticore.lang.monticar.generator.Variable; import de.monticore.lang.monticar.generator.roscpp.util.Variable;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
...@@ -14,7 +14,7 @@ public class ResolvedRosInterface { ...@@ -14,7 +14,7 @@ public class ResolvedRosInterface {
private String type; private String type;
private String topic; private String topic;
private String include; private String include;
private Map<PortSymbol, String> portToMsgField = new HashMap<>(); private Map<EMAPortSymbol, String> portToMsgField = new HashMap<>();
private Optional<Variable> publisherField = Optional.empty(); private Optional<Variable> publisherField = Optional.empty();
private Optional<Variable> subscriberField = Optional.empty(); private Optional<Variable> subscriberField = Optional.empty();
private Optional<Method> publishMethod = Optional.empty(); private Optional<Method> publishMethod = Optional.empty();
...@@ -81,15 +81,15 @@ public class ResolvedRosInterface { ...@@ -81,15 +81,15 @@ public class ResolvedRosInterface {
this.include = include; this.include = include;
} }
public void addPort(PortSymbol portSymbol, String msgField) { public void addPort(EMAPortSymbol portSymbol, String msgField) {
portToMsgField.put(portSymbol, msgField); portToMsgField.put(portSymbol, msgField);
} }
public Set<PortSymbol> getPorts() { public Set<EMAPortSymbol> getPorts() {
return portToMsgField.keySet(); return portToMsgField.keySet();
} }
public String getMsgFieldForPort(PortSymbol portSymbol) { public String getMsgFieldForPort(EMAPortSymbol portSymbol) {
return portToMsgField.get(portSymbol); return portToMsgField.get(portSymbol);
} }
......
package de.monticore.lang.monticar.generator.roscpp; package de.monticore.lang.monticar.generator.roscpp;
import com.google.common.base.Objects; import com.google.common.base.Objects;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
//TODO: rename: not used as a Tag //TODO: rename: not used as a Tag
public class ResolvedRosTag { public class ResolvedRosTag {
private ExpandedComponentInstanceSymbol component; private EMAComponentInstanceSymbol component;
private Set<ResolvedRosInterface> subscriberInterfaces = new HashSet<>(); private Set<ResolvedRosInterface> subscriberInterfaces = new HashSet<>();
private Set<ResolvedRosInterface> publisherInterfaces = new HashSet<>(); private Set<ResolvedRosInterface> publisherInterfaces = new HashSet<>();
public ResolvedRosTag(ExpandedComponentInstanceSymbol component) { public ResolvedRosTag(EMAComponentInstanceSymbol component) {
this.component = component; this.component = component;
} }
public ExpandedComponentInstanceSymbol getComponent() { public EMAComponentInstanceSymbol getComponent() {
return component; return component;
} }
public void setComponent(ExpandedComponentInstanceSymbol component) { public void setComponent(EMAComponentInstanceSymbol component) {
this.component = component; this.component = component;
} }
......
package de.monticore.lang.monticar.generator.roscpp.helper; package de.monticore.lang.monticar.generator.roscpp.helper;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.PortSymbol; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAPortSymbol;
import de.monticore.lang.monticar.generator.rosmsg.RosMsg; import de.monticore.lang.monticar.generator.rosmsg.RosMsg;
import de.se_rwth.commons.logging.Log; import de.se_rwth.commons.logging.Log;
...@@ -13,7 +13,7 @@ public class NameHelper { ...@@ -13,7 +13,7 @@ public class NameHelper {
private NameHelper() {