Commit 74f61020 authored by Nathan Bonnemberger's avatar Nathan Bonnemberger
Browse files

MQTTExecutor: development ongoing

parent c61f50b4
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -42,3 +42,8 @@ sql.connection.url=jdbc:postgresql://localhost/nathan
sql.driver.class=org.postgresql.Driver
sql.user.name=nathan
sql.user.password=qwertz
# Properties for MQTT messaging
mqtt.broker.address=tcp://localhost
mqtt.broker.port=1883
mqtt.broker.publisherid=tui
\ No newline at end of file
......@@ -29,6 +29,7 @@ import lu.list.itis.dkd.tui.bootstrapping.TangibleApplicationBootstrapper;
import lu.list.itis.dkd.tui.cps.system.EquationSystemBuilder;
import lu.list.itis.dkd.tui.cps.system.EquationSystemException;
import lu.list.itis.dkd.tui.cps.variable.SpatialVariable;
import lu.list.itis.dkd.tui.cps.variable.TextVariable;
import lu.list.itis.dkd.tui.cps.variable.Variable;
import lu.list.itis.dkd.tui.cps.variable.tangible.TangibleNumericalVariable;
import lu.list.itis.dkd.tui.exception.BuildException;
......@@ -78,6 +79,7 @@ public class Scenario {
* thrown when the provided URI could not be interpreted and, hence, the scenario
* description document loaded.
*/
public Scenario(String file) throws BuildException {
......@@ -198,6 +200,18 @@ public class Scenario {
return (SpatialVariable) (inputs.get(name) == null ? outputs.get(name) : inputs.get(name));
}
/**
* Method used to find a text variable given its name in either input or output maps.
*
* @param name
* The name of the variable to find.
* @return The {@link TextVariable} that responds to the given name or <code>null</code> should
* no such variable exist.
*/
static @Nullable TextVariable retrieveTextVariableByName(String name) {
return (TextVariable) (inputs.get(name) == null ? outputs.get(name) : inputs.get(name));
}
/**
* Entry point for the application.
*
......
......@@ -195,6 +195,13 @@
<result name="Building" equate="id"/>
</results>
</equation>
<equation name="MQTTTest">
<parameters>
<parameter name="Building"/>
</parameters>
<invoke executor="Mqtt">SEND {Payload} TO {Topic}</invoke>
</equation>
</equations>
</system>
</scenario>
\ No newline at end of file
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