Command disabled: backlink
 
Available Languages?:

OSA : OS_Squeue_Send_TO

OS_Squeue_Send_TO (squeue, smessage, timeout)

Allowed only in taskSwitches contextUses timer

Same as OS_Squeue_Send with exit if timeout expires.

OS_ENABLE_SQUEUE constant must be defined in OSAcfg.h.

For PIC16, message queues can be allocated only in bank0 or bank1

Call allowed:

Only in task

Parameters:

squeue Queue of simple messages descriptor. Variable of OST_SQUEUE 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_SQUEUE squeue;
 
void Task (void)
{
    for (;;) {
        /*...*/
        OS_Squeue_Send_TO (squeue, 'E', 10);   // Wait 10 ticks for free space
        if (OS_IsTimeout()) {
            // Message was not sent!
            /*...*/
        }
        /*...*/
    }
}

Old style name

OS_SendQSMsgTimeout

See also

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