This is an automated email from the ASF dual-hosted git repository.

bossenti pushed a commit to branch 2856-file-stream-adapter
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/2856-file-stream-adapter by 
this push:
     new 6b49509de7 docs: improve documentation of file stream adapter
6b49509de7 is described below

commit 6b49509de752d9b23c2989e563bf78b4556881b7
Author: bossenti <[email protected]>
AuthorDate: Mon May 13 13:30:08 2024 +0200

    docs: improve documentation of file stream adapter
---
 .../documentation.md                               |  1 +
 .../documentation.md                               | 56 +++++++++++++++++++++-
 .../strings.en                                     | 10 ++--
 3 files changed, 60 insertions(+), 7 deletions(-)

diff --git 
a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.oi4/documentation.md
 
b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.oi4/documentation.md
index fccb004c9c..1a9bf14903 100644
--- 
a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.oi4/documentation.md
+++ 
b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.adapters.oi4/documentation.md
@@ -79,3 +79,4 @@ The output consists of all values from the selected sensor 
type. Below is an exa
     "Device status": 0,
     "timestamp": 1685525380729
 }
+```
diff --git 
a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/documentation.md
 
b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/documentation.md
index a03969e8fa..34f3bde459 100644
--- 
a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/documentation.md
+++ 
b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/documentation.md
@@ -26,7 +26,59 @@
 
 ## Description
 
-Continuously streams the content from a file
+The File Stream Adapter enables continuous streaming of file contents to 
Apache StreamPipes, creating a data stream for utilization within StreamPipes. 
It's particularly handy when you prefer not to connect directly to the data 
source via StreamPipes or for testing and demonstration purposes. Currently, it 
supports the following file types:
 
-***
+- CSV
+- JSON
+- XML
+
+### Example
+
+Suppose we have a CSV file (`temperature.csv`) containing data from a 
temperature sensor recording data every second:
+
+```text
+time,temperature
+1715593295000,36.3
+1715593296000,37.5
+1715593297000,37.0
+1715593298000,37.2
+1715593299000,37.2
+1715593210000,37.6
+1715593211000,37.4
+1715593212000,37.5
+1715593213000,37.5
+1715593214000,37.7
+```
+
+When creating a new File Stream Adapter:
+- Upload the file
+- Select `yes` for `Replay Once`
+- Choose `CSV` as the `Format` with `,` as the `delimiter`, check `Header`
+
+After creating the adapter, it will output one line of the CSV as an event 
every second.
+Further details on configuration options are provided below.
+
+---
+
+## Configuration
+
+### File
+
+This section determines the file to be streamed by the adapter. Options 
include:
+
+- `Choose existing file`: Select from files already present in StreamPipes.
+- `Upload new file`: Upload a new file, also available for other adapters. 
Supports `.csv`, `.json`, and `.xml` file types.
+
+### Overwrite file time
+Enable this option to always pass the current system time as the timestamp 
when emitting an event. If your file lacks timestamp information, this should 
be enabled. Conversely, if your file has timestamp information, enabling this 
option will overwrite it with the current system time. By default, this option 
is disabled, leaving timestamp information unaffected.
+
+### Replay Once
+Distinguishes between replaying all data contained in the file only once or in 
a loop until the adapter is manually stopped.
+If enabled, this will cause events from the file to be emitted multiple times. 
In this case, it is recommended to enable `Overwrite file time` if the 
resulting stream is to be persisted in StreamPipes, otherwise existing events 
with the same timestamp will be overwritten.
+
+### Replay Speed
 
+Configures the event frequency:
+- **Keep original time**: Events are emitted based on the timestamp 
information in the file. 
+- **Fastest**: All data in the file is replayed as quickly as possible, with 
no waiting time. 
+- **Speed Up Factor**: Adjusts the waiting time of the adapter based on the 
provided speed up factor, considering the time between two events in the file.
diff --git 
a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/strings.en
 
b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/strings.en
index 1f6fecb2d8..0b4bebcfa5 100644
--- 
a/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/strings.en
+++ 
b/streampipes-extensions/streampipes-connect-adapters-iiot/src/main/resources/org.apache.streampipes.connect.iiot.protocol.stream.file/strings.en
@@ -17,16 +17,16 @@
 
 
 org.apache.streampipes.connect.iiot.protocol.stream.file.title=File Stream
-org.apache.streampipes.connect.iiot.protocol.stream.file.description=Continuously
 streams the content from a file.
+org.apache.streampipes.connect.iiot.protocol.stream.file.description=allows 
you to continuously stream the contents of a file to Apache StreamPipes, 
creating a data stream that allows you to use the data within StreamPipes
 
 filePath.title=File
-filePath.description=File Path
+filePath.description=Choose between an already existing file or upload a new 
file
 
-replaceTimestamp.title=Use current time
-replaceTimestamp.description=Replace Event Time with Current Timestamp
+replaceTimestamp.title=Overwrite file time
+replaceTimestamp.description=Always use the current time as the timestamp when 
emitting the event, regardless of any time value in the file.
 
 speed.title=Replay Speed
-speed.description=
+speed.description=Determine the event frequency.
 
 speedUp.title=Speed Up
 speedUp.description=original = 1; speedup 2x = 2; half speed  =  0.5

Reply via email to