Adding description for datasource state [develop Scada-LTS]
https://github.com/SCADA-LTS/Scada-LTS
[New Features] Adding description for datasource state
- Adding new datasource state and describing why it is disabled or enabled.
Issue: 718
We need this functionality because the datasource can be disabled not only by the user but also by other situations in the application:
- Disable or enable datasource.
- Import datasource.
- In script run functions: “enableDataSource(xid_ds)” “disableDataSource(xid_ds)”.
- Copy datasource.
- From API (wsdl not tested).
- When the datasource migrates.
Describe code:
Now, state pattern describe only a state of datasources but in future it will be used for other things. for eg. when HttpRetriver is disable (with stop option), the program will create a scheduler which tries to enable HttpRetriver.
We have six classes which set the status:
- MigrationOrErrorSerializeChangeEnableState
(In the new version of program, the datasource definition has been changed, resulting in on/off change of the datasource). - ScryptChangeEnableStateDs
(that datasource is turned off/on from script) - StopChangeEnableStateDs
(that datasource is stopped or it will be sleeping in future when the remote server is not available) - UserChangeEnableStateDs
(that datasource is changed by the user) - UserCpChangeEnableStateDs
(that datasource is changed by the user when a datasosurce copy has been made) - ApiChangeEnableStateDs
(that datasource is changed from API WDSL)
In order to skip using “SeroUtils.jar” library for newly created code, I created class ConfigLocalization.java.
It works as follow:
The description below will also demonstrate (test) if the task works as intended.
I created and enabled new datasource.
As seen, the user has changed the on/off status of datasource
I imported datasource
my github acount: https://github.com/grzesiekb
Changes will been introduced to the released version 0.0.9.8
https://github.com/SCADA-LTS/Scada-LTS/releases
Pull request:
Leave Adding description for datasource state [develop Scada-LTS] to:
Read more #utopian-io posts
Best Posts From grzesiek
We have not curated any of grzesiekb's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From grzesiek
- Bash script - challenge [part 3]. Authentication test (token) using the curl program.
- Bash script challenge [part 2]. Authentication test (session) using the curl program.
- Bash script - challenge. Writing API tests using the curl program
- Adding description for datasource state [develop Scada-LTS]
- New option in HttpRetriver datasource [Scada-LTS]
- New Export/Import pointHierarchy. [ScadaLTS]
- [Scada-LTS] The possibility to add image sets without requiring a reboot
- [Scada-LTS] The possibility to add image sets without a restart
- New Project “shop-at-everything”.
- A successful attempt on adding switch language option in the angular app and integrating it with crowdin.com
- Add login component [EN/PL]
- Generating data (multistate) for simulations in Scada-LTS. [EN/PL]
- Correct the api rest authentication [EN/PL]
- How the data of virtual multisate points in the Scada-LTS program change
- We add a virtual point with the ** multistate ** type (increment) in Scada-LTS
- Generating data (binary) for simulations in Scada-LTS / Generowanie danych (binarnych) do symulacji w Scadzie-LTS [EN/PL]
- Preview how data from "virtual-data source" (type binary - Alternate, No Change, Random) changes every second
- Add "virtual point" in "virual data-source" - with Binary type in Scada-LTS
- Add a "virtual data-source" in Scada-LTS
- Add permission mask decoding