D. Kalinsky Associates
 Home  |  Online Learning  |  Resources  |  About Us  |  Contact  |  Site Map  
Online Training Session:         Messages for Intertask Communication
How does a Task Receive a Message?
1.  Define Content and Structure of the Message
•  Make Sure Sender and Receiver Tasks have Same Definition
2. Ask to Receive a Message
•  Task may need to Wait (in “Blocked” state) for Message to Arrive
3. If / When Message is Received, Process Appropriately
4. Free the Message Buffer
•  … if the Message was in RTOS-allocated Memory
5. (Optionally) Loop back and Ask for Another Message
Previous                    Page 8 of 9                 Next
NOTES:

This is a 5-step "cookbook" for what to do to program a task to receive a message.  The details are slightly different for
different off-the-shelf RTOSs and RTOS categories.

1.  Define Content and Structure of the Message
•  Make Sure Sender and Receiver Tasks have Same Definition
2. Ask to Receive a Message, taking into account that the task may need to Wait (in “Blocked” or "Waiting" or "Pended"
state) for a Message to Arrive
3. If / When Message is Received, Process Appropriately
4. Free the Message Buffer   … if the Message was in RTOS-allocated Memory
5. (Optionally) Loop back and Ask for Another Message
© Copyright 2010, D. Kalinsky Associates, All Rights Reserved.
This page Updated January 1, 2010