Command disabled: backlink
 
Available Languages?:

OSA : OS_Smsg_Wait_TO

OS_Smsg_Wait_TO (smsg, os_smsg_type_var, timeout)

Allowed only in task

Same as OS_Smsg_Wait. If timeout expires before message received, then stop waiting with Timeout flag set (see OS_IsTimeout)

Call allowed:

Only in task

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
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)
{
    OST_SMSG  mysmsg;
    for (;;) {
        /*...*/
        OS_Smsg_Wait_TO (smsg, mysmsg, 30);   // Wait 30 ticks for simple message
        if (!OS_IsTimeout()) {
            // Message has been received and stored into mysmsg
            /*...*/
        }
        /*...*/
    }
}

Old style name

OS_WaitSMsgTimeout

See also

 
en/osa/ref/allservices/os_smsg_wait_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