2020-06-07 21:16:19 +03:00
[![JetBrains Research ](https://jb.gg/badges/research.svg )](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
2021-01-07 20:13:10 +03:00
# Controls.kt
2020-06-10 22:37:20 +03:00
2021-10-23 11:02:31 +03:00
Controls.kt (former DataForge-control) is a data acquisition framework (work in progress). It is based on DataForge, a software framework for automated data processing.
2023-05-03 11:05:54 +03:00
This repository contains a prototype of API and simple implementation
2020-06-10 22:37:20 +03:00
of a slow control system, including a demo.
2023-05-03 11:05:54 +03:00
Controls.kt uses some concepts and modules of DataForge,
such as `Meta` (tree-like value structure).
2020-06-10 22:37:20 +03:00
To learn more about DataForge, please consult the following URLs:
2023-05-03 11:05:54 +03:00
* [Kotlin multiplatform implementation of DataForge ](https://github.com/mipt-npm/dataforge-core )
* [DataForge documentation ](http://npm.mipt.ru/dataforge/ )
* [Original implementation of DataForge ](https://bitbucket.org/Altavir/dataforge/src/default/ )
2020-06-10 22:37:20 +03:00
DataForge-control is a [Kotlin-multiplatform ](https://kotlinlang.org/docs/reference/multiplatform.html )
2023-05-03 11:05:54 +03:00
application. Asynchronous operations are implemented with
2020-06-10 22:37:20 +03:00
[kotlinx.coroutines ](https://github.com/Kotlin/kotlinx.coroutines ) library.
2021-10-06 22:39:38 +03:00
## Materials and publications
* Video - [A general overview seminar ](https://youtu.be/LO-qjWgXMWc )
* Video - [A seminar about the system mechanics ](https://youtu.be/wES0RV5GpoQ )
2023-05-03 11:05:54 +03:00
* Article - [A Novel Solution for Controlling Hardware Components of Accelerators and Beamlines ](https://www.preprints.org/manuscript/202108.0336/v1 )
2020-06-10 22:37:20 +03:00
### Features
Among other things, you can:
2023-05-03 11:05:54 +03:00
- Describe devices and their properties.
2020-06-10 22:37:20 +03:00
- Collect data from devices and execute arbitrary actions supported by a device.
- Property values can be cached in the system and requested from devices as needed, asynchronously.
- Connect devices to event bus via bidirectional message flows.
2023-05-03 11:05:54 +03:00
Example view of a demo:
2020-06-10 22:37:20 +03:00
2023-05-03 11:05:54 +03:00
![](docs/pictures/demo-view.png)
2020-06-10 22:37:20 +03:00
2023-05-03 11:05:54 +03:00
## Modules
### [controls-core](controls-core)
>
>
> **Maturity**: EXPERIMENTAL
>
> **Features:**
> - [device](controls-core/src/commonMain/kotlin/space/kscience/controls/api/Device.kt) : Device API with subscription (asynchronous and pseudo-synchronous properties)
> - [deviceMessage](controls-core/src/commonMain/kotlin/space/kscience/controls/api/DeviceMessage.kt) : Specification for messages used to communicate between Controls-kt devices.
> - [deviceHub](controls-core/src/commonMain/kotlin/space/kscience/controls/api/DeviceHub.kt) : Grouping of devices into local tree-like hubs.
### [controls-ktor-tcp](controls-ktor-tcp)
>
>
> **Maturity**: EXPERIMENTAL
### [controls-magix-client](controls-magix-client)
>
>
> **Maturity**: EXPERIMENTAL
### [controls-modbus](controls-modbus)
>
>
> **Maturity**: EXPERIMENTAL
### [controls-opcua](controls-opcua)
>
>
> **Maturity**: EXPERIMENTAL
### [controls-serial](controls-serial)
>
>
> **Maturity**: EXPERIMENTAL
### [controls-server](controls-server)
>
>
> **Maturity**: EXPERIMENTAL
### [controls-storage](controls-storage)
>
>
> **Maturity**: PROTOTYPE
### [demo](demo)
>
>
> **Maturity**: EXPERIMENTAL
### [magix](magix)
>
>
> **Maturity**: EXPERIMENTAL
### [controls-storage/controls-xodus](controls-storage/controls-xodus)
>
>
> **Maturity**: PROTOTYPE
### [demo/all-things](demo/all-things)
>
>
> **Maturity**: EXPERIMENTAL
### [demo/car](demo/car)
>
>
> **Maturity**: EXPERIMENTAL
### [demo/echo](demo/echo)
>
>
> **Maturity**: EXPERIMENTAL
### [demo/magix-demo](demo/magix-demo)
>
>
> **Maturity**: EXPERIMENTAL
### [demo/mks-pdr900](demo/mks-pdr900)
>
>
> **Maturity**: EXPERIMENTAL
### [demo/motors](demo/motors)
>
>
> **Maturity**: EXPERIMENTAL
### [magix/magix-api](magix/magix-api)
>
>
> **Maturity**: EXPERIMENTAL
### [magix/magix-java-client](magix/magix-java-client)
>
>
> **Maturity**: EXPERIMENTAL
### [magix/magix-mqtt](magix/magix-mqtt)
>
>
> **Maturity**: PROTOTYPE
### [magix/magix-rabbit](magix/magix-rabbit)
>
>
> **Maturity**: PROTOTYPE
### [magix/magix-rsocket](magix/magix-rsocket)
>
>
> **Maturity**: EXPERIMENTAL
### [magix/magix-server](magix/magix-server)
>
>
> **Maturity**: EXPERIMENTAL
### [magix/magix-storage](magix/magix-storage)
>
>
> **Maturity**: EXPERIMENTAL
### [magix/magix-zmq](magix/magix-zmq)
>
>
> **Maturity**: EXPERIMENTAL
### [magix/magix-storage/magix-storage-xodus](magix/magix-storage/magix-storage-xodus)
>
>
> **Maturity**: PROTOTYPE
2020-06-10 22:37:20 +03:00
### `demo` module
The demo includes a simple mock device with a few properties changing as `sin` and `cos` of
2023-05-03 11:05:54 +03:00
the current time. The device is configurable via a simple TornadoFX-based control panel.
You can run a demo by executing `application/run` Gradle task.
2020-06-10 22:37:20 +03:00
The graphs are displayed using [plotly.kt ](https://github.com/mipt-npm/plotly.kt ) library.