|
1 | 1 | # Module thermo |
2 | 2 |
|
3 | | -## TODO |
| 3 | +The thermo module demonstrates a temperature monitoring system using the controls-kt framework. It provides a real-time dashboard for monitoring multiple temperature sensors with visualization capabilities. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +* Real-time temperature monitoring via Modbus protocol |
| 8 | +* Visual dashboard with color-coded temperature display |
| 9 | +* Real-time temperature trend graphs |
| 10 | +* Status monitoring with different states (Normal, Warning, Alarm, NotConnected) |
| 11 | +* OPC UA server for exposing sensor data to external systems |
| 12 | +* Simulated sensors for demonstration purposes |
| 13 | + |
| 14 | +## Architecture |
| 15 | + |
| 16 | +The module consists of several key components: |
| 17 | + |
| 18 | +1. **ThermoSensor** - Interface for temperature sensors with Modbus implementation |
| 19 | +2. **ThermoSensorHub** - Manages multiple sensors and provides access to their data |
| 20 | +3. **ThermoHubController** - Controls the sensor hub and exposes data via OPC UA |
| 21 | +4. **Dashboard UI** - Compose-based UI for visualizing sensor data |
| 22 | + |
| 23 | +## Running the Demo |
| 24 | + |
| 25 | +The demo creates a simulated Modbus TCP server with 100 virtual temperature sensors (10 units × 10 addresses). The sensors generate random temperature values that fluctuate around the warning threshold. |
| 26 | + |
| 27 | +To run the demo, use the Gradle task: |
| 28 | + |
| 29 | +```bash |
| 30 | +./gradlew :demo:thermo:run |
| 31 | +``` |
| 32 | + |
| 33 | +When the application starts: |
| 34 | +1. A Modbus TCP slave is started on port 9090 |
| 35 | +2. An OPC UA server is started on port 9091 |
| 36 | +3. The dashboard UI displays all sensors with their current temperatures |
| 37 | +4. Sensors can be selected to display their temperature trends on the graph |
| 38 | + |
| 39 | +The main application class is `center.sciprog.controls.demo.thermo.PanelKt`. |
| 40 | + |
| 41 | +## Future Enhancements |
| 42 | + |
4 | 43 | * Add spatial position of sensors |
5 | 44 | * Average spatial temperature analyzer |
6 | | -* 3D visualization for sensors |
| 45 | +* 3D visualization for sensors |
0 commit comments