Skip to content

Commit

Permalink
docs: Updated documentation according with latest webui changes (#5579)
Browse files Browse the repository at this point in the history
* Removed integer and flost entries in asset page

Signed-off-by: pierantoniomerlino <[email protected]>

* fixed examples according with the latest webui changes

* Restored interger and float mode

* Update docs/connect-field-devices/asset-implemetation.md

Co-authored-by: Mattia Dal Ben <[email protected]>

---------

Signed-off-by: pierantoniomerlino <[email protected]>
Co-authored-by: Salvatore Coppola <[email protected]>
Co-authored-by: Mattia Dal Ben <[email protected]>
  • Loading branch information
3 people authored Dec 19, 2024
1 parent 1595415 commit d410dc1
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions docs/connect-field-devices/asset-implemetation.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The **mode** can be selected in the following way:
Example of `DOUBLE` **mode**:
channel configured with:

- **value.type**: INTEGER
- **value.type**: `INTEGER`
- **scaleoffset.type**: `DOUBLE`
- **scale**: 3.25
- **offset**: 1.5
Expand All @@ -84,29 +84,26 @@ If `channel_value` is 5 (INTEGER) the result is: `(int) ((double) channel_value
Example of `INTEGER` **mode**:
channel configured with:

- **value.type**: INTEGER
- **value.type**: `INTEGER`
- **scaleoffset.type**: `DEFINED_BY_VALUE_TYPE`
- **scale**: 3.25
- **offset**: 1.5
- **scale**: 3
- **offset**: 1

Since **scaleoffset.type** is `DEFINED_BY_VALUE_TYPE`, the **mode** determined by the **value.type** parameter (`INTEGER`) will be used.

If `channel_value` is 5 (INTEGER) the result is: `(int) (channel_value * (int) 3.25d + (int) 1.5d) = 16`.
If `channel_value` is 5 (INTEGER) the result is: `(int) (channel_value * (int) 3 + (int) 1) = 16`.

Example of `DOUBLE` **mode**:
channel configured with:

- **value.type**: DOUBLE
- **value.type**: `DOUBLE`
- **scaleoffset.type**: `DEFINED_BY_VALUE_TYPE`
- **scale**: 3.25
- **offset**: 1.5

If `channel_value` is 5 (DOUBLE) the result is: `(double) (channel_value * (double) 3.25d + (double) 1.5d) = 17.75`.

!!! warning
If the **mode** is `LONG` or `INTEGER` the decimal part of the **scale** and **offset** value will be discarded.

As the examples show the final result can be different depending on the used **mode** and **value.type**.
As the examples show, the final result can change depending on the **mode** and **value.type** used.

### Driver specific parameters

Expand Down Expand Up @@ -164,4 +161,4 @@ If, for example, the user downloads the channels list following the steps descri

### Replace current channels

The `Replace current channels` must be checked when the user wants to replace **all** the channels currently present in the asset, with the ones that will be created by the csv uploading.
The `Replace current channels` must be checked when the user wants to replace **all** the channels currently present in the asset, with the ones that will be created by the csv uploading.

0 comments on commit d410dc1

Please sign in to comment.