Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/indeemasoftware/qsimplescada
Qt based simple SCADA framework, with dashboard, static and dynamic components
https://github.com/indeemasoftware/qsimplescada
configurator cpp dashboard dashboard-application dashboard-templates dashboard-widget dashboards industrial industry-4 iot iot-framework iot-platform qpm qt qt-gui qt5 scada scada-framework
Last synced: about 7 hours ago
JSON representation
Qt based simple SCADA framework, with dashboard, static and dynamic components
- Host: GitHub
- URL: https://github.com/indeemasoftware/qsimplescada
- Owner: IndeemaSoftware
- License: mit
- Created: 2018-05-14T14:16:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-03T09:48:58.000Z (over 4 years ago)
- Last Synced: 2025-01-15T07:51:47.833Z (7 days ago)
- Topics: configurator, cpp, dashboard, dashboard-application, dashboard-templates, dashboard-widget, dashboards, industrial, industry-4, iot, iot-framework, iot-platform, qpm, qt, qt-gui, qt5, scada, scada-framework
- Language: C++
- Homepage: https://indeema.com
- Size: 3.96 MB
- Stars: 302
- Watchers: 31
- Forks: 104
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QSimpleScada
Qt/C++ based simple SCADA library for your IoT projects. We created QSimpleScada to speed up and simplify visualising any data, so we (and you) can concentrate on developing automation algorithms that rock. It completely handles connection to and editing of widgets. Using QSimpleScada, you can easily create a visualization of IoT data with static and dynamic components. After you are satisfied with the layout, save the generated .xml file and use it in your project.Library is created with Qt/C++ and basic widget is based on C++. There is interface for QML, so you can independently create individual widgets on QML (as when creating classic QML UIs) and upload them to your app on a go.
## Installing
### Minimum requirements
Qt 5.8
### Using qpm:
To install via qpm, run:
```
qpm install com.indeema.qsimplescada
```
And add:
```
include (../vendor/vendor.pri)
```
To *.pro file of your project.As a bonus, try out our preset of widgets:
```
qpm install com.indeema.eeiot
```
### From GitHub:
To clone the repo, go to:
https://github.com/IndeemaSoftware/QSimpleScada
To also add preconfigured widgets, clone:
https://github.com/IndeemaSoftware/EEIoTAnd add:
```include($$PWD/com/indeema/QSimpleScada/com_indeema_QSimpleScada.pri)
include($$PWD/com/indeema/eeiot/com_indeema_eeiot.pri)
```
To the* *.pro* file. You'll receive QSimpleScadaLib folder with compiled Windows or MacOS libs.### Using binary release:
https://github.com/IndeemaSoftware/QSimpleScada/releases## Structure
One QScadaController can keep many devices with unique IP addresses. IP address is a unique id for each device.
Each device can have several dashboards with unique ids. On each board, you can set up many widgets. You can save the architecture to a* *.irp* file.## Sample of usage
You can check examples of QSimpleScada use at https://github.com/IndeemaSoftware/QSimpleScadaSample
#### How the dynamic components look in the sample
# Using QSimpleScada
1. Create your device:
```cpp
QScadaDeviceInfo *lDeviceInfo = new QScadaDeviceInfo();
lDeviceInfo->setName("Test Device");
lDeviceInfo->setIp(QHostAddress("127.0.0.1"));
```2. Init your board controller. Your boardcontroller object is the main contact spot.
```cpp
QScadaBoardController *mController = new QScadaBoardController();
mController->appendDevice(lDeviceInfo);
```
3. Init your board. Board ids are iterators. So if you will create one more board for this device, its id will be 1.
```cpp
mController->initBoardForDeviceIp("127.0.0.1");
```* To handle events, you can connect to signals:
```cpp
signals:
void objectDoubleClicked(QScadaObject*);
```
* You can get pointers to specific board by calling methods:
```cpp
QList getBoardList();
QList getBoardListForDeviceIp(QString);
```* And you can create new object by calling method of QScadaBoard object:
```cpp
QScadaObject *initNewObject(QScadaObjectInfo *);
void createNewObject(QScadaObjectInfo *);void createQMLObject(int id, QString path);
void createQMLObject(QString path);
```4. Define the editable or static type for your controller:
```cpp
mController->setEditingMode(true);
```5. Include your controller widget to you central widget:
```cpp
QGridLayout *mainLayout = new QGridLayout(ui->centralWidget);
mainLayout->addWidget(mController);
```Now your board controller is initialized. Next steps are setting up the widget resources.
We’ve also developed a EEIoT library with a set of preconfigured widgets. You can download it at https://github.com/IndeemaSoftware/EEIoT and try it out as a start. Read wiki page to know the rules on [how to create qml widgets that can be used by QSimpleScada](https://github.com/IndeemaSoftware/QSimpleScada/wiki/How-to-create-QML-Widgets)**To use a widget collection**:
Call the function with QML resources url to let the controller know the location of QML widgets:
```cpp
QMLConfig::instance.appendQMLPath(:/com/indeema/eeiot/EEIoT/);
```
Path ```:/com/indeema/eeiot/EEIoT/``` is added by default, so you don't need to add it manually. If you call ```appendQMLPath``` with different path to EEIoT, it will replace the default path. Also you can add your own custom widgets.You can use our simple editor to create your first dashboard https://github.com/IndeemaSoftware/QSimpleScadaSample
Then set up QScadaBoardController in your app without any devices and boards and call:
```cpp
mController->openProject(QString )
```where is a full path to your project file (*.irp)
For example:
```cpp
mController->openProject(QString )
```## Set up flexible connection, streaming, and visualization of widget data
```cpp
mController->updateValue(deviceIp, boardId, Id, value);
```
Where:
* __deviceIp__ - QString, the IP address of the monitored device (for example, "192.168.1.1");
* __boardId__ - integer, unique ID of a dashboard (since 1 device may contain several dashboards);
* __Id__ - integer, unique ID of a widget;
* __value__ - QVariant, the value you're monitoring on a widget. Its type is undefined (QVariant), so that you can flexibly stream any data when builing different widgets on a board.## Support
* If you have suggestions, feedback, or encounter any issues, write to [Stackoverflow](https://stackoverflow.com/), [Qt forum](https://forum.qt.io) with **QSimpleScada** tag, or contact us at [email protected].
* If you find a bug, create an [issue](https://github.com/IndeemaSoftware/QSimpleScada/issues).
* To learn more about our [IoT expertise](https://indeema.com/services/iot), visit https://indeema.com, follow our news at [@IndeemaSoftware](https://twitter.com/IndeemaSoftware) or subscribe to our [blog](https://indeema.com/blog).## License
[MIT license](https://github.com/IndeemaSoftware/QSimpleScada/blob/master/LICENSE)
Copyright 2019 © [Indeema Software](https://indeema.com).
#### Developed by Volodymyr Shevchyk