Best method to pass data from multiple task to single task

Hi,
I have created 4 tasks. Each task will have its own procedure. For example the three tasks are GPS, Ethernet and GSM and Logging task. I want to use logging task as common for remaining three tasks.
I want to send whatever information or data I get from three tasks (GSM, Ethernet, and GPS) to Logging task. This logging task will just display the internal log of 3 tasks.
How can I do that?

Regards,
Kumar

I would just use a queue to send the data, each task puts it message in the queue, and the logging task takes it out. That would mean all the tasks need the same data struct to send (or you send pointers and the sending tasks do’t reuse those buffers until the logging task says their clear).

You could also use a message buffer with a mutex on the sending side so only one task at a time is using the message buffer, That allows different structures to be sent, as long as the logging task can figure out which type of structure was sent.

Thanks Mr. Richard for the idea. Can you share some specific example that does this if possible?

Regards,
Kumar

There are examples of sending structures to queues on the website (see the 'alternatives to queue sets on that page), in the book, and in various of the demo applications in the download.

Thank you so much for your time. I will try that.

Regards,
Kumar