i’m new to the freertos and programmed avrs in a mainloop style so far. For a new project i want to learn more about the intertask communication and the best practises.
So far no problem in the understanding of the RTOS but now i have the following problem.
I have a GUI task which displays the status of other tasks ( UART active, temperatures, usb, …) So i need some status information from the tasks. My goal is to make independed tasks, which in future could developed by seperate programmers. So they only need to know the messages how to communicate with each other.
Solution 1: The Peripheral tasks sending continously the status data. For me this makes no sense.
Solution 2: The Gui Task uses a shared memory variable from the other task protected by a semaphore. Advantage: No memory overhead, but the GUI task needs to know about the task and its member variables…
Solution 3: The Gui Task requests the data by a Message through a Queue to the corresponding task. The Task will answer in a different queue with the requested data. So the advantage is, you only need to know the messages but not about the task. So different programmers could program independed tasks with only one defined interface ( Messages).
So what are your suggestions about this problem regarding performance, reuse, simply and robustness?