Command disabled: backlink
 
Available Languages?:

OSA : OS_Queue_Check

bool OS_Queue_Check (queue)
bool OS_Queue_Check_I (queue)

Check if there is any message in queue.

OS_ENABLE_QUEUE constant must be defined in OSAcfg.h.

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

Call allowed:

Everywhere

Parameters:

queue Queue of messages descriptor. Variable of OST_QUEUE type.

Returns:

false queue is empty
true there are some messages in queue

Example:

OST_QUEUE queue;
 
void Task (void)
{
    OST_MSG msg;
    for (;;) {
        /*...*/
        if (OS_Queue_Check(queue)) {     // If any message present
            OS_AcceptQueue(queue, msg);  // then accept it
            /*...*/
        }
        /*...*/
    }
}

Old style name

OS_CheckQMsg

See also

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