Skip to content
Morten Fyhn Amundsen edited this page Jul 26, 2017 · 2 revisions

This example is similar to the "How to create tasks" with the addition of:

  1. The temperature value is pulled from the "ini" file instead of hard coding it.
  2. Calling two producer tasks.
  3. Let the consumer choose one of the producers then display the temperature.

The changes in the code will be as follows:
  • Producer Task: will pull the temperature value from the "ini" file then it will be sent as an IMC message.
  • Consumer Task: will read the target producer from the "ini" then will search for the variable "temperature" in the BUS, if the "Entity Label" matches the "Target Producer" it will print it on screen.
  • Producer and Consumer Task interaction: Here, we create the "ini" file with the required fields.