You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by "tenthe (via GitHub)" <gi...@apache.org> on 2023/01/21 09:05:15 UTC

[GitHub] [streampipes] tenthe commented on a diff in pull request #1122: [#1121] Add replay once option to FileStreamProtocol

tenthe commented on code in PR #1122:
URL: https://github.com/apache/streampipes/pull/1122#discussion_r1083265528


##########
streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/protocol/stream/FileStreamProtocol.java:
##########
@@ -199,10 +274,16 @@ public ProtocolDescription declareModel() {
         .withLocales(Locales.EN)
         .sourceType(AdapterSourceType.STREAM)
         .category(AdapterType.Generic)
-        .requiredFile(Labels.withId("filePath"), Filetypes.CSV, Filetypes.JSON, Filetypes.XML)
-        .requiredMultiValueSelection(Labels.withId("replaceTimestamp"),
+        .requiredFile(Labels.withId(FILE_PATH), Filetypes.CSV, Filetypes.JSON, Filetypes.XML)
+        .requiredMultiValueSelection(Labels.withId(REPLACE_TIMESTAMP),
             Options.from(""))
-        .requiredFloatParameter(Labels.withId("speed"))
+        .requiredSingleValueSelection(Labels.withId(REPLAY_ONCE), Options.from("no", "yes"))
+        .requiredAlternatives(Labels.withId(SPEED),
+            Alternatives.from(Labels.withId(KEEP_ORIGINAL_TIME), true),
+            Alternatives.from(Labels.withId(FASTEST)),
+            Alternatives.from(Labels.withId(SPEED_UP_FACTOR),
+                StaticProperties.group(Labels.withId("speed-up-factor-group"),

Review Comment:
   Good point. I left it as a String because it is only used once, but I can change it to a variable



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org