GitLab update scheduled for Friday, January 21th between 08:15 and 08:45 CET. If unpleasant, please contact René or Martin.

Commit c2fc88cd authored by René Schöne's avatar René Schöne
Browse files

Updating receiver and sender stubs.

Fixed error to not handle YAML correctly.
parent 8e32458f
......@@ -3,7 +3,7 @@ apply plugin: 'com.google.protobuf'
sourceCompatibility = 1.8
mainClassName = 'de.tudresden.inf.st.ros2rag.receiverstub.Main'
mainClassName = 'de.tudresden.inf.st.ros2rag.receiverstub.ReceiverMain'
repositories {
jcenter()
......@@ -17,16 +17,16 @@ buildscript {
}
sourceSets.main.java.srcDir "src/gen/java"
jar.manifest.attributes('Main-Class': 'de.tudresden.inf.st.ros2rag.receiverstub.Main')
jar.manifest.attributes('Main-Class': 'de.tudresden.inf.st.ros2rag.receiverstub.ReceiverMain')
dependencies {
implementation project(':ros2rag.starter')
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "${jackson_version}"
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_version}"
implementation group: 'net.sf.beaver', name: 'beaver-rt', version: '0.9.11'
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.0.0'
implementation group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
// implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_version}"
// implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jackson_version}"
// implementation group: 'net.sf.beaver', name: 'beaver-rt', version: '0.9.11'
// implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.0.0'
// implementation group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
protobuf files("$projectDir/../ros2rag.example/src/main/proto")
}
......
package de.tudresden.inf.st.ros2rag.receiverstub;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.google.protobuf.InvalidProtocolBufferException;
import config.Dataconfig.DataConfig;
import config.Robotconfig.RobotConfig;
......@@ -19,14 +20,14 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
public class Main {
public class ReceiverMain {
private static final Logger logger = LogManager.getLogger(Main.class);
private static final Logger logger = LogManager.getLogger(ReceiverMain.class);
private String topicPattern;
public static void main(String[] args) throws Exception {
Main main = new Main();
ObjectMapper mapper = new ObjectMapper();
ReceiverMain main = new ReceiverMain();
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
File configFile = new File(args[0]);
System.out.println("Using config file: " + configFile.getAbsolutePath());
ActualConfiguration config = mapper.readValue(configFile, DataConfiguration.class).panda_mqtt_connector;
......
......@@ -3,7 +3,7 @@ apply plugin: 'com.google.protobuf'
sourceCompatibility = 1.8
mainClassName = 'de.tudresden.inf.st.ros2rag.senderstub.Main'
mainClassName = 'de.tudresden.inf.st.ros2rag.senderstub.SenderMain'
repositories {
jcenter()
......@@ -17,16 +17,13 @@ buildscript {
}
sourceSets.main.java.srcDir "src/gen/java"
jar.manifest.attributes('Main-Class': 'de.tudresden.inf.st.ros2rag.senderstub.Main')
jar.manifest.attributes('Main-Class': 'de.tudresden.inf.st.ros2rag.senderstub.SenderMain')
dependencies {
implementation project(':ros2rag.starter')
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "${jackson_version}"
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_version}"
implementation group: 'net.sf.beaver', name: 'beaver-rt', version: '0.9.11'
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.0.0'
implementation group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
// implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.0.0'
// implementation group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
protobuf files("$projectDir/../ros2rag.example/src/main/proto")
}
......
......@@ -5,7 +5,7 @@ import panda.Linkstate;
import java.util.concurrent.TimeUnit;
public class Main {
public class SenderMain {
public static void main(String[] args) throws Exception {
// assume 4 arguments
if (args.length < 4) {
......
......@@ -28,12 +28,12 @@ jar.manifest.attributes('Main-Class': 'de.tudresden.inf.st.ros2rag.starter.Start
dependencies {
implementation project (':ros2rag.base')
baseRuntimeClasspath project (':ros2rag.base')
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "${jackson_version}"
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_version}"
implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jackson_version}"
// implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml', version: "${jackson_version}"
api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_version}"
api group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: "${jackson_version}"
implementation group: 'net.sf.beaver', name: 'beaver-rt', version: '0.9.11'
implementation group: 'com.google.protobuf', name: 'protobuf-java', version: '3.0.0'
implementation group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
api group: 'com.google.protobuf', name: 'protobuf-java', version: '3.0.0'
api group: 'org.fusesource.mqtt-client', name: 'mqtt-client', version: '1.15'
jastadd2 "org.jastadd:jastadd:2.3.4"
}
......
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