Command disabled: backlink
 
Available Languages?:

OSA : OS_Smsg_Send_TO

OS_Smsg_Send_TO (smsg, smessage, timeout)

Allowed only in taskSwitches contextUses timer

Same as OS_Smsg_Send with exit if timeout expires. If timeout expires before message is free, then new simple message will not be sent.

Call allowed:

Only in task

Parameters:

smsg Simple message descriptor. Variable of OST_SMSG type
smessage Message body (OST_SMSG)
timeout Time of waiting in system ticks - calling OS_Timer periods

Returns:

timeout If timeout expired then system service OS_IsTimeout will return true

Example:

OST_SMSG smsg;
 
void Task (void)
{
    for (;;) {
        /*...*/
        OS_Smsg_Send_TO (smsg, 'B', 100);
        if (OS_IsTimeout()) {
            // Message is not sent!
            /*...*/
        }
        /*...*/
    }
}

Old style name

OS_SendSMsgTimeout

See also

 
en/osa/ref/allservices/os_smsg_send_to.txt · Last modified: 07.10.2010 13:57 (external edit)
 
Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki