Command disabled: backlink
Available Languages?:

OSA : OS_Msg_Wait_TO

OS_Msg_Wait_TO (msg_cb, os_msg_type_var, timeout)

Allowed only in taskSwitches contextUses timer

Same as OS_Msg_Wait. If timeout expires before event occurs, then stop waiting with Timeout flag set (see OS_IsTimeout)

Call allowed:

Only in task


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
timeout Time of waiting in system ticks - calling OS_Timer periods


timeout If timeout expired then system service OS_IsTimeout will return true


OST_MSG_CB msg_cb;
void Task (void)
    OST_MSG msg;
    for (;;) {
        OS_Msg_Wait_TO (msg_cb, msg, 100);   // wait 100 ticks for message
        if (!OS_IsTimeout()) {
            // Message received and stored into msg

Old style name


See also

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