You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2021/06/16 14:00:23 UTC

[incubator-streampipes-extensions] branch dev updated: Add support for strings in PLC4x S7 adapter

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 bc97f85  Add support for strings in PLC4x S7 adapter
bc97f85 is described below

commit bc97f853aecf523738843ef1181a4d78dbce39ef
Author: Philipp Zehnder <ze...@fzi.de>
AuthorDate: Wed Jun 16 15:59:59 2021 +0200

    Add support for strings in PLC4x S7 adapter
---
 .../apache/streampipes/connect/adapters/plc4x/s7/Plc4xS7Adapter.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 a60cd8d..bca00e6 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
@@ -132,7 +132,7 @@ public class Plc4xS7Adapter extends PullAdapter {
                                         StaticProperties.stringFreeTextProperty(Labels.withId(PLC_NODE_RUNTIME_NAME)),
                                         StaticProperties.stringFreeTextProperty(Labels.withId(PLC_NODE_NAME)),
                                         StaticProperties.singleValueSelection(Labels.withId(PLC_NODE_TYPE),
-                                                Options.from("Bool",  "Byte", "Int", "Word", "Real")))),
+                                                Options.from("Bool",  "Byte", "Int", "Word", "Real", "String")))),
                         Alternatives.from(Labels.withId(CSV_IMPORT),
                                 StaticProperties.fileProperty(Labels.withId(PLC_NODES_CSV_FILE), Filetypes.CSV)),
                         Alternatives.from(Labels.withId(EXCEL_IMPORT),
@@ -394,6 +394,8 @@ public class Plc4xS7Adapter extends PullAdapter {
                 return Datatypes.String;
             case "REAL":
                 return Datatypes.Float;
+            case "STRING":
+                return Datatypes.String;
             default:
                 throw new AdapterException("Datatype " + plcType + " is not supported");
         }