Skip to content
rbencatel edited this page Jun 12, 2013 · 16 revisions

Under Development (Do Not Use, Not Finished)

This is a simple example on how to create tasks in DUNE.

First assume:

  • DH> = $home/dune (DUNE repository directory tree)
  • DBuild> = $home/dune_build (DUNE compilation directory. Try to avoid having the compilation directory inside the repository directory tree)

There are two parts in this exercise:

  • Understand how to create tasks
  • Create simple tasks to produce a variable (representing some sensor input), consume a variable (representing functions that use the sensor input), and binding these two (produce and consume) tasks for a meaningful interaction.

We will use temperature value for producing and consuming tasks.

  • Producer Task: will create a static variable "temperature" and set a value for it then it will be send as an IMC message.
  • Consumer Task: will keep searching in the BUS for the variable "temperature" and print it on the screen.
  • Producer and Consumer Task interaction: Here, the consumer will consume the temperature variable from the producer task to display the temperature value. Later we will do advanced task interactions.

Clone this wiki locally