diff --git a/case-study-sorting-pkg/build.gradle b/case-study-sorting-pkg/build.gradle index 6e0ea157e9fb6134be7f1cc588fd43254830f9e8..98433bf1d5d57e224ac4225bb7ef43c777727315 100644 --- a/case-study-sorting-pkg/build.gradle +++ b/case-study-sorting-pkg/build.gradle @@ -67,7 +67,7 @@ run { task jarSelectorNode(type: Jar) { group = "nodes" - destinationDirectory.set(file("./nodes")) + destinationDirectory.set(file("./dineros/nodes")) manifest { attributes "Main-Class": "de.tudresden.inf.st.sorting.launcher.SelectorLauncher" @@ -85,7 +85,7 @@ task jarSelectorNode(type: Jar) { task jarLeftControllerNode(type: Jar) { group = "nodes" - destinationDirectory.set(file("./nodes")) + destinationDirectory.set(file("./dineros/nodes")) manifest { attributes "Main-Class": "de.tudresden.inf.st.sorting.launcher.LeftControllerLauncher" @@ -103,7 +103,7 @@ task jarLeftControllerNode(type: Jar) { task jarRightControllerNode(type: Jar) { group = "nodes" - destinationDirectory.set(file("./nodes")) + destinationDirectory.set(file("./dineros/nodes")) manifest { attributes "Main-Class": "de.tudresden.inf.st.sorting.launcher.RightControllerLauncher" @@ -121,7 +121,7 @@ task jarRightControllerNode(type: Jar) { task jarSynchronizerNode(type: Jar) { group = "nodes" - destinationDirectory.set(file("./nodes")) + destinationDirectory.set(file("./dineros/nodes")) manifest { attributes "Main-Class": "de.tudresden.inf.st.sorting.launcher.SynchronizerLauncher" @@ -139,7 +139,7 @@ task jarSynchronizerNode(type: Jar) { task jarFeedbackNode(type: Jar) { group = "nodes" - destinationDirectory.set(file("./nodes")) + destinationDirectory.set(file("./dineros/nodes")) manifest { attributes "Main-Class": "de.tudresden.inf.st.sorting.launcher.FeedbackLauncher" @@ -157,7 +157,7 @@ task jarFeedbackNode(type: Jar) { task jarExecutorNode(type: Jar) { group = "nodes" - destinationDirectory.set(file("./nodes")) + destinationDirectory.set(file("./dineros/nodes")) manifest { attributes "Main-Class": "de.tudresden.inf.st.sorting.launcher.ExecutorLauncher" @@ -175,7 +175,7 @@ task jarExecutorNode(type: Jar) { task jarSensorNode(type: Jar) { group = "nodes" - destinationDirectory.set(file("./nodes")) + destinationDirectory.set(file("./dineros/nodes")) manifest { attributes "Main-Class": "de.tudresden.inf.st.sorting.launcher.SensorLauncher" @@ -191,6 +191,24 @@ task jarSensorNode(type: Jar) { archiveBaseName = 'case-study-sorting-pkg-sensor' } +task jarTracingNode(type: Jar) { + group = "system" + destinationDirectory.set(file("./dineros/system")) + + manifest { + attributes "Main-Class": "de.tudresden.inf.st.sorting.launcher.TracingNodeLauncher" + } + + from sourceSets.main.output + from { + configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } + } + + exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA' + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + archiveBaseName = 'dineros-tracing-node' +} + task jarAllNodes(type: Jar){ group = "nodes" } @@ -202,3 +220,5 @@ jarAllNodes.dependsOn jarSynchronizerNode jarAllNodes.dependsOn jarFeedbackNode jarAllNodes.dependsOn jarExecutorNode jarAllNodes.dependsOn jarSensorNode + +jarAllNodes.dependsOn jarTracingNode diff --git a/case-study-sorting-pkg/libs/pnml-relast-engine-fatjar-0.1.jar b/case-study-sorting-pkg/libs/pnml-relast-engine-fatjar-0.1.jar index 07e243a4637c1493f47348f370ca9ff37748184d..6b9836bdaaeb962ab6b4d50755e445b81c76ba17 100644 Binary files a/case-study-sorting-pkg/libs/pnml-relast-engine-fatjar-0.1.jar and b/case-study-sorting-pkg/libs/pnml-relast-engine-fatjar-0.1.jar differ diff --git a/case-study-sorting-pkg/src/main/java/de/tudresden/inf/st/sorting/launcher/TracingNodeLauncher.java b/case-study-sorting-pkg/src/main/java/de/tudresden/inf/st/sorting/launcher/TracingNodeLauncher.java new file mode 100644 index 0000000000000000000000000000000000000000..1eaeb48d8cc0ccd8312f1fc7ae70bbf3eb2e4c1e --- /dev/null +++ b/case-study-sorting-pkg/src/main/java/de/tudresden/inf/st/sorting/launcher/TracingNodeLauncher.java @@ -0,0 +1,24 @@ +package de.tudresden.inf.st.sorting.launcher; + +import de.tudresden.inf.st.pnml.engine.tracing.TracingNode; +import org.ros.node.DefaultNodeMainExecutor; +import org.ros.node.NodeConfiguration; +import org.ros.node.NodeMainExecutor; + +import java.net.URI; + +public class TracingNodeLauncher { + + protected static final String ROS_HOST = "localhost"; + protected static final String ROS_MASTER_URI = "http://localhost:11311"; + + protected static final NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic(ROS_HOST); + protected static final NodeMainExecutor nodeMainExecutor = DefaultNodeMainExecutor.newDefault(); + + public static void main(java.lang.String[] args) { + + nodeConfiguration.setMasterUri(URI.create(ROS_MASTER_URI)); + new Thread(() -> nodeMainExecutor.execute(new TracingNode(), nodeConfiguration)) {{start();}}; + } +} +