Available Languages?:

OSA : OS_Msg_Send_TO

OS_Msg_Send_TO (msg_cb, message, timeout)

Allowed only in taskSwitches contextUses timer

Same as OS_Msg_Send with exit if timeout expires. If timeout expires before msg_cb is free then new message will not be sent.

Call allowed:

Only in task

Parameters:

msg_cb Pointer to message descriptor. Variable of OST_MSG_CB type
message pointer to message body (OST_MSG)
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_MSG_CB msg_cb;
 
void Task (void)
{
    OST_MSG msg;
    static char buf[10];
    for (;;) {
        /*...*/
        OS_Msg_Send_TO (msg_cb, buf, 100);
        if (OS_IsTimeout()) {
            // Message is not sent!
            /*...*/
        }
        /*...*/
    }
}

Old style name

OS_SendMsgTimeout

See also

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