====== OSA : OS_Queue_Check ======
**bool OS_Queue_Check (queue)**\\
**bool OS_Queue_Check_I (queue)**\\
=== ===
Check if there is any message in queue.
##[[en:osa:ref:appendix:configuration#System constants|OS_ENABLE_QUEUE]]## constant must be defined in ##[[en:osa:ref:appendix:configuration|OSAcfg.h]]##.
For PIC16, message queues can be allocated only in **bank0** or **bank1**
=== Call allowed: ===
Everywhere
=== Parameters: ===
{| class = "fpl"
|-
|//''queue''//
|Queue of messages descriptor. Variable of ##[[en:osa:ref:description:data_types#OST_QUEUE|OST_QUEUE]]## type.
|}
=== Returns: ===
{| class = "fpl"
|-
|//''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_Create|OS_Queue_Create]]
* [[en:osa:ref:allservices:OS_Queue_Send|OS_Queue_Send]]
* [[en:osa:ref:allservices:OS_Queue_Send_TO|OS_Queue_Send_TO]]
* [[en:osa:ref:allservices:OS_Queue_Send_Now|OS_Queue_Send_Now]]
* [[en:osa:ref:allservices:OS_Queue_IsFull|OS_Queue_IsFull]]
* [[en:osa:ref:allservices:OS_Queue_Wait|OS_Queue_Wait]]
* [[en:osa:ref:allservices:OS_Queue_Wait_TO|OS_Queue_Wait_TO]]
----
* [[en:osa:ref:services:alphabetical|Alphabetical]]
* [[en:osa:ref:services:brieflist|All services]]
~~UP~~