OSA : OS_Smsg_Accept

OS_Smsg_Accept (smsg, os_smsg_type_var)
OS_Smsg_Accept_I (smsg, os_smsg_type_var)

Accept existing simple message. Before calling this service you should be sure that a message exists. After service completes, the simple message is cleared.

Call allowed:

Everywhere

Parameters:

smsg Simple message descriptor. Variable of OST_SMSG type
os_smsg_type_var Variable of OST_SMSG type, where simple message will be placed

Returns:

nothing

Example:

OST_SMSG smsg;
 
void Task (void)
{
    OST_SMSG my_smsg;
    for (;;) {
        /*...*/
        if (OS_Smsg_Check(smsg)) {          // if simple message exists
            OS_Smsg_Accept (smsg, my_smsg); // then accept it and store into my_smsg
        }
        /*...*/
    }
}

Old style name

OS_AcceptSMsg

See also