OS_Msg_Accept (msg_cb, os_msg_type_var)
OS_Msg_Accept_I (msg_cb, os_msg_type_var)
Accept existing message. Before calling this service you should be sure that a message exists. After service is executed message will be cleared.
Everywhere
msg_cb |
Pointer to message descriptor. Variable of OST_MSG_CB type |
os_msg_type_var |
Variable of OST_MSG type, where pointer to message will be placed |
nothing
OST_MSG_CB msg_cb; void Task (void) { OST_MSG msg; for (;;) { /*...*/ if (OS_Msg_Check(msg_cb)) { // if message exists OS_Msg_Accept (msg_cb, msg); // than accept it and store pointer // to msg variable } /*...*/ } }
OS_AcceptMsg