Commit 039f9fd2 authored by Markus Georg Bendel's avatar Markus Georg Bendel
Browse files

Merge branch 'integrate-someip' into 'master'

# Conflicts:
#   pom.xml
#   src/main/java/de/monticore/lang/monticar/generator/middleware/cli/DistributedTargetGeneratorCli.java
parents 59868f08 231f6e4c
Pipeline #188880 failed with stages
in 3 minutes and 11 seconds
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.helpers;
public class NameHelper {
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.helpers;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.helpers;
import de.se_rwth.commons.logging.Log;
......@@ -18,7 +19,7 @@ public class TemplateHelper {
String resourceFileName = "/de/monticore/lang/monticar/generator/middleware/templates/" + fileName;
try {
tmpStr = IOUtils.toString(TemplateHelper.class.getResourceAsStream(resourceFileName));
tmpStr = IOUtils.toString(TemplateHelper.class.getResourceAsStream(resourceFileName)).replaceAll("<#--[^>]*-->", "");
} catch (Exception e) {
//Not recoverable
Log.error("Template file not found: " + resourceFileName);
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.MiddlewareSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......@@ -10,9 +11,7 @@ import de.se_rwth.commons.logging.Log;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.*;
public class EMADLGeneratorImpl implements GeneratorImpl {
private String generationTargetPath;
......@@ -36,7 +35,8 @@ public class EMADLGeneratorImpl implements GeneratorImpl {
List<File> files = new ArrayList<>();
emadlGenerator.setGenerationTargetPath(generationTargetPath);
List<FileContent> fileContents = emadlGenerator.generateStrings(taggingResolver, componentInstanceSymbol, taggingResolver);
List<FileContent> fileContents = emadlGenerator.generateStrings(taggingResolver, componentInstanceSymbol,
taggingResolver, new HashSet<>(), "n");
for (FileContent fileContent : fileContents) {
files.add(emadlGenerator.getEmamGen().generateFile(fileContent));
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
package de.monticore.lang.monticar.generator.middleware.impls;
import java.io.File;
import java.io.IOException;
import java.util.List;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAPortInstanceSymbol;
import de.monticore.lang.monticar.generator.mqtt.GeneratorMqtt;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
import de.se_rwth.commons.logging.Log;
public class MqttGenImpl implements GeneratorImpl {
private String generationTargetPath;
private GeneratorMqtt generatorMqtt;
public MqttGenImpl(){
generatorMqtt = new GeneratorMqtt();
}
public void setGeneratorMqttCpp(GeneratorMqtt generatorMqttCpp) {
this.generatorMqtt = generatorMqttCpp;
}
@Override
public List<File> generate(EMAComponentInstanceSymbol componentInstanceSymbol, TaggingResolver taggingResolver)
throws IOException {
generatorMqtt.setGenerationTargetPath(generationTargetPath);
return generatorMqtt.generateMqttAdapter(componentInstanceSymbol);
}
@Override
public void setGenerationTargetPath(String path) {
this.generationTargetPath = path;
}
@Override
public boolean willAccept(EMAComponentInstanceSymbol componentInstanceSymbol) {
boolean result = componentInstanceSymbol.getPortInstanceList().stream().anyMatch(EMAPortInstanceSymbol::isMqttPort);
if(!result){
Log.warn("GeneratorMqttCpp: No MQTT Ports found! Ignoring component " + componentInstanceSymbol.getName());
}
return result;
}
}
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.impls;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates;
import de.monticore.lang.monticar.generator.middleware.templates.compile.BashCompilationGenerator;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates.compile;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates.compile;
import de.monticore.lang.monticar.generator.FileContent;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates.compile;
import de.monticore.lang.monticar.generator.middleware.templates.MiddlewareTemplates;
......
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.middleware.templates.compile;
import de.monticore.lang.monticar.generator.middleware.templates.MiddlewareTemplates;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment