This is an automated email from the ASF dual-hosted git repository.
zehnder pushed a commit to branch dev
in repository
https://gitbox.apache.org/repos/asf/incubator-streampipes-extensions.git
The following commit(s) were added to refs/heads/dev by this push:
new 262e6e3 Add exception content to plc adapter exception
new 56cbb89 Merge branch 'dev' of
github.com:apache/incubator-streampipes-extensions into dev
262e6e3 is described below
commit 262e6e37c75b5431197e9d0df5539226d5236b82
Author: Philipp Zehnder <[email protected]>
AuthorDate: Tue Jul 21 12:25:29 2020 +0200
Add exception content to plc adapter exception
---
.../streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java
b/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java
index c118d4e..34fb108 100644
---
a/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java
+++
b/streampipes-connect-adapters/src/main/java/org/apache/streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java
@@ -145,11 +145,12 @@ public class Plc4xS7Adapter extends PullAdapter {
*/
@Override
public GuessSchema getSchema(SpecificAdapterStreamDescription
adapterDescription) throws AdapterException {
- // TODO add a validation to check if the user input is available in
the PLC
// Extract user input
getConfigurations(adapterDescription);
+ // TODO add a validation to check if the user input is available in
the PLC
+
GuessSchema guessSchema = new GuessSchema();
EventSchema eventSchema = new EventSchema();
@@ -182,15 +183,14 @@ public class Plc4xS7Adapter extends PullAdapter {
getConfigurations(adapterDescription);
try {
-// this.plcConnection= new PlcDriverManager().getConnection("s7://"
+ this.ip + "/1/1");
- this.plcConnection= new PlcDriverManager().getConnection("s7://" +
this.ip);
+ this.plcConnection = new PlcDriverManager().getConnection("s7://"
+ this.ip);
if (!this.plcConnection.getMetadata().canRead()) {
throw new AdapterException("The S7 on IP: " + this.ip + " does
not support reading data");
}
} catch (PlcConnectionException e) {
- throw new AdapterException("Could not establish connection to S7
with ip " + this.ip);
+ throw new AdapterException("Could not establish connection to S7
with ip " + this.ip, e);
}
}