Skip to content
Snippets Groups Projects
Commit 0d65fe3a authored by René Schöne's avatar René Schöne
Browse files

cleanup

parent 04268a6f
No related branches found
No related tags found
3 merge requests!39Version 1.1.0,!35Version 1.0.0,!19Resolve "Make specification langauge more concise"
Pipeline #11916 passed
...@@ -5,9 +5,9 @@ The full example is available at <https://git-st.inf.tu-dresden.de/jastadd/ragco ...@@ -5,9 +5,9 @@ The full example is available at <https://git-st.inf.tu-dresden.de/jastadd/ragco
## Preparation ## Preparation
The following examples are inspired by the real test case [read1write2](https://git-st.inf.tu-dresden.de/jastadd/ragconnect-tests/-/tree/master/ragconnect.tests/src/test/01-input/read1write2) The following examples are inspired by the real test case [read1write2](https://git-st.inf.tu-dresden.de/jastadd/ragconnect-tests/-/tree/master/ragconnect.tests/src/test/01-input/read1write2)
The idea is to have two nonterminals, where input information is received on one of them, and - after transformation - is sent out by both. The idea is to have two non-terminals, where input information is received on one of them, and - after transformation - is sent out by both.
Let the following grammar be used: Let's use the following grammar:
```bnf ```bnf
A ::= <Input:String> /<OutputOnA:String>/ B* ; A ::= <Input:String> /<OutputOnA:String>/ B* ;
...@@ -92,7 +92,7 @@ b1.connectOutputOnB("mqtt://localhost/b1/out", true); ...@@ -92,7 +92,7 @@ b1.connectOutputOnB("mqtt://localhost/b1/out", true);
b2.connectOutputOnB("mqtt://localhost/b2/out", false); b2.connectOutputOnB("mqtt://localhost/b2/out", false);
``` ```
The first parameter of those connect-methods is always an URI-like String, to identify the protocol to use, the server operating the protocol, and a path to identify the concrete token. The first parameter of those connect-methods is always a URI-like String, to identify the protocol to use, the server operating the protocol, and a path to identify the concrete token.
In case of MQTT, the server is the host running an MQTT broker, and the path is equal to the topic to publish or subscribe to. In case of MQTT, the server is the host running an MQTT broker, and the path is equal to the topic to publish or subscribe to.
Please note, that the first leading slash (`/`) is removed for MQTT topics, e.g., for `A.Input` the topic is actually `topic/for/input`. Please note, that the first leading slash (`/`) is removed for MQTT topics, e.g., for `A.Input` the topic is actually `topic/for/input`.
......
...@@ -145,7 +145,7 @@ aspect Mappings { ...@@ -145,7 +145,7 @@ aspect Mappings {
// if no mappings are specified, or if first mapping is not suitable. // if no mappings are specified, or if first mapping is not suitable.
// then prepend the suitable default mapping // then prepend the suitable default mapping
if (getMappingList().isEmpty() || !getMappingList().get(0).getFromType().isByteArray()) { if (getMappingList().isEmpty() || !getMappingList().get(0).getFromType().isByteArray()) {
result = new java.util.ArrayList(); result = new java.util.ArrayList<>();
result.add(suitableReceiveDefaultMapping()); result.add(suitableReceiveDefaultMapping());
result.addAll(getMappingList()); result.addAll(getMappingList());
} else { } else {
...@@ -155,7 +155,7 @@ aspect Mappings { ...@@ -155,7 +155,7 @@ aspect Mappings {
// if no mappings are specified, or if last mapping is not suitable // if no mappings are specified, or if last mapping is not suitable
// then append the suitable default mapping // then append the suitable default mapping
if (getMappingList().isEmpty() || !getMappingList().get(getMappingList().size() - 1).getToType().isByteArray()) { if (getMappingList().isEmpty() || !getMappingList().get(getMappingList().size() - 1).getToType().isByteArray()) {
result = new java.util.ArrayList(getMappingList()); result = new java.util.ArrayList<>(getMappingList());
result.add(suitableSendDefaultMapping()); result.add(suitableSendDefaultMapping());
} else { } else {
result = getMappingList(); result = getMappingList();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment