Commit 99e4bf87 authored by Georg Vinogradov's avatar Georg Vinogradov

Extend DistributedTargetGeneratorCli.java

parent ec8a7a57
Pipeline #165575 failed with stages
in 1 minute and 9 seconds
......@@ -5,10 +5,6 @@ import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instance
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosToEmamTagSchema;
import de.monticore.lang.monticar.emadl.generator.EMADLAbstractSymtab;
import de.monticore.lang.monticar.generator.middleware.DistributedTargetGenerator;
import de.monticore.lang.monticar.generator.middleware.impls.CPPGenImpl;
import de.monticore.lang.monticar.generator.middleware.impls.EMADLGeneratorImpl;
import de.monticore.lang.monticar.generator.middleware.impls.ODVGenImpl;
import de.monticore.lang.monticar.generator.middleware.impls.RosCppGenImpl;
import de.monticore.lang.monticar.generator.middleware.impls.*;
import de.monticore.lang.monticar.generator.order.simulator.AbstractSymtab;
import de.monticore.lang.monticar.generator.roscpp.helper.TagHelper;
......@@ -45,6 +41,7 @@ public final class DistributedTargetGeneratorCli {
public static final String GENERATOR_CPP = "cpp";
public static final String GENERATOR_EMADL = "emadlcpp";
public static final String GENERATOR_ROSCPP = "roscpp";
public static final String GENERATOR_MQTT = "mqtt";
public static final String GENERATOR_ODV = "odv";
//ros2cpp is an alias for rclcpp
public static final String GENERATOR_RCLCPP = "rclcpp";
......@@ -84,6 +81,7 @@ public final class DistributedTargetGeneratorCli {
res.add(GENERATOR_CPP);
res.add(GENERATOR_EMADL);
res.add(GENERATOR_ROSCPP);
res.add(GENERATOR_MQTT);
res.add(GENERATOR_ODV);
res.add(GENERATOR_ROS2CPP);
res.add(GENERATOR_RCLCPP);
......@@ -166,6 +164,12 @@ public final class DistributedTargetGeneratorCli {
RosToEmamTagSchema.registerTagTypes(taggingResolver);
TagHelper.resolveTags(taggingResolver, componentInstanceSymbol);
}
if (generators.contains(GENERATOR_MQTT)) {
generator.add(new MqttGenImpl(), "mqtt");
// RosToEmamTagSchema.registerTagTypes(taggingResolver);
//TagHelper.resolveTags(taggingResolver, componentInstanceSymbol);
}
if (generators.contains(GENERATOR_RCLCPP) || generators.contains(GENERATOR_ROS2CPP)) {
generator.add(new RclCppGenImpl(), "rclcpp");
......
......@@ -10,20 +10,24 @@ import de.monticore.lang.monticar.generator.mqtt.GeneratorMqtt;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
import de.se_rwth.commons.logging.Log;
public class MqttCppGenImpl implements GeneratorImpl {
public class MqttGenImpl implements GeneratorImpl {
private String generationTargetPath;
private GeneratorMqtt generatorMqttCpp;
private GeneratorMqtt generatorMqtt;
public MqttCppGenImpl(){
generatorMqttCpp = new 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 {
generatorMqttCpp.setGenerationTargetPath(generationTargetPath);
return generatorMqttCpp.generateMqttAdapter(componentInstanceSymbol);
generatorMqtt.setGenerationTargetPath(generationTargetPath);
return generatorMqtt.generateMqttAdapter(componentInstanceSymbol);
}
@Override
......
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