This section will show you how to make applications communicate using MQTT Paho. 4DIAC uses a layered communication architecture. For MQTT Paho, a bottom layer has been realized, connecting MQTT Paho and the FBDK layer. Please consider that with the current implementation it is not possible to connect to more than one MQTT Paho broker on one Device.
Since you need MQTT Paho, you need to install the libraries in your computer. Therefore you need to download the code and compile it. You will need the same tools needed for FORTE (git, cmake, compilers). The process is based on the normal compilation of FORTE, but the MQTT feature is enabled. Here's a quick link to FORTE's compilation. For the installation please follow the next steps:
Use CMake to generate the files to compile in a similar way you would use for compiling FORTE. The options in CMake for Paho are less and easy to understand. You will export the files to [binPaho]. Then do
Attention: When using the raw[] layer in your ID, the RD_1 of your subscriber and the SD_1 of your publishers must be connected to a STRING type data. Also, you can only use PUBLISHER_1 and SUSBCRIBER_1, not others function blocks wit more inputs or outputs.
The main reason for this additional "raw" parameter is that mqtt does not define a payload format. With the additional param you specify in 4diac a so called communication layer to be used on top of MQTT. This communication layer is now in charge of taking the data from IEC 61499 and generate an according payload format or take the payload and transform it for the FB's outputs. The raw-layer is just accepting strings and sends the raw string content.
Go back to Protocols index:
If you want to go back to the Start Here page, we leave you here a fast access
Or Go to top