GSoC/2018/StatusReports/FerenczKovács: Difference between revisions

From KDE Community Wiki
< GSoC‎ | 2018‎ | StatusReports
(Created page with "== Plotting of live MQTT data == Currently, LabPlot has some support for the plotting of live data, which can be read from file/named pipe, TCP socket, UDP socket, local sock...")
 
No edit summary
Line 18: Line 18:
Investigating/analysing deeply already existing features for live data sources provided by [https://github.com/KDE/labplot/blob/master/src/backend/datasources/LiveDataSource.cpp LiveDataSource], [https://github.com/KDE/labplot/blob/master/src/kdefrontend/datasources/ImportFileWidget.cpp ImportFileWidget], [https://github.com/KDE/labplot/blob/master/src/kdefrontend/dockwidgets/LiveDataDock.cpp LiveDataDock], [https://github.com/KDE/labplot/blob/master/src/backend/datasources/filters/AsciiFilter.cpp AsciiFilter]
Investigating/analysing deeply already existing features for live data sources provided by [https://github.com/KDE/labplot/blob/master/src/backend/datasources/LiveDataSource.cpp LiveDataSource], [https://github.com/KDE/labplot/blob/master/src/kdefrontend/datasources/ImportFileWidget.cpp ImportFileWidget], [https://github.com/KDE/labplot/blob/master/src/kdefrontend/dockwidgets/LiveDataDock.cpp LiveDataDock], [https://github.com/KDE/labplot/blob/master/src/backend/datasources/filters/AsciiFilter.cpp AsciiFilter]


=== Week 1 - Week 4 (May 14 - June 10)===
The very first steps were digging deeply into [http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.pdf MQTT protocol] and [http://doc.qt.io/QtMQTT/qtmqtt-module.html Qt's MQTT API]  to save up time later. Then designing the Import File Widget followed, in order to be able to provide the necessary functionalities.
The next task was to update the Import File Widget. Using the widget the user can set:
* the MQTT client's host and port to the host and port of the broker, which the user wants to connect to,
* the username and password (if authentication is required by the broker)
* the client ID.
After successfully connecting to the broker, we can add every active topic to a combo box. The user can choose from these topics the ones the MQTT client will subscribe to. Subscribing and unsubscribing to a topic is also implemented.
The next logical step is to offer a preview of the data, that is received via MQTT messages, so the user is able to see what kind of data is transmitted in every topic that the user subscribed to.
The next step was adapting already existing options and functionality of live data sources to MQTT protocol. Here's a list of the options I adapted to MQTT:
* Reading type
** From end
** Till the end
* Update type
** Periodically
** On new data
*Keep last N values
* Update now
* Pause/Continue
* Update interval
* Sample rate
For more details about what has been accomplished and videos about the implemented features in use check out [https://kfereneczgsoc2018.blogspot.com/2018/06/labplot-getting-support-for-mqtt.html my blog post]


== Branches where I'm working ==
== Branches where I'm working ==

Revision as of 20:12, 7 June 2018

Plotting of live MQTT data

Currently, LabPlot has some support for the plotting of live data, which can be read from file/named pipe, TCP socket, UDP socket, local socket and serial port. The goal of this project is to provide support for the plotting of data received via MQTT protocol from a certain broker. LabPlot currently doesn’t provide any support for MQTT, even though it would be quite important for LabPlot to provide this kind of support, since it is a scientific data plotting software and MQTT protocol is widely used to transmit certain sensor data. This project would increase LabPlot’s usability regarding analyses of scientific data, monitoring data collected by sensors, that is transmitted by MQTT protocol, or even make LabPlot usable in the field of Internet of Things or Smart Home Appliances.


Mentor: Fábián Kristóf

Project Goals

  • Support data received via MQTT protocol
  • Provide functionality to configure the MQTT connection
  • Adapt already existing features to MQTT protocol and also implement new ones

Work Report

Community Bonding Period

Investigating/analysing deeply already existing features for live data sources provided by LiveDataSource, ImportFileWidget, LiveDataDock, AsciiFilter

Week 1 - Week 4 (May 14 - June 10)

The very first steps were digging deeply into MQTT protocol and Qt's MQTT API to save up time later. Then designing the Import File Widget followed, in order to be able to provide the necessary functionalities.

The next task was to update the Import File Widget. Using the widget the user can set:

  • the MQTT client's host and port to the host and port of the broker, which the user wants to connect to,
  • the username and password (if authentication is required by the broker)
  • the client ID.

After successfully connecting to the broker, we can add every active topic to a combo box. The user can choose from these topics the ones the MQTT client will subscribe to. Subscribing and unsubscribing to a topic is also implemented.

The next logical step is to offer a preview of the data, that is received via MQTT messages, so the user is able to see what kind of data is transmitted in every topic that the user subscribed to.

The next step was adapting already existing options and functionality of live data sources to MQTT protocol. Here's a list of the options I adapted to MQTT:

  • Reading type
    • From end
    • Till the end
  • Update type
    • Periodically
    • On new data
  • Keep last N values
  • Update now
  • Pause/Continue
  • Update interval
  • Sample rate

For more details about what has been accomplished and videos about the implemented features in use check out my blog post

Branches where I'm working

Important Links

Proposal Link

Blog

Contact

Email: [email protected]