====== OSA : OS_Squeue_Check ======
**bool OS_Squeue_Check (squeue)**\\
**bool OS_Squeue_Check_I (squeue)**\\
=== ===
Check if there is any message in queue of simple messages.
##[[en:osa:ref:appendix:configuration#System constants|OS_ENABLE_SQUEUE]]## 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"
|-
|//''squeue''//
|Queue of simple messages descriptor. Variable of ##[[en:osa:ref:description:data_types#OST_SQUEUE|OST_SQUEUE]]## type.
|}
=== Returns: ===
{| class = "fpl"
|-
|//''false''//
| queue is empty
|-
|//''true''//
| there is at least one simple message in queue
|}
=== Example: ===
OST_SQUEUE squeue;
void Task (void)
{
OST_SMSG smsg;
for (;;) {
/*...*/
if (OS_Squeue_Check (squeue)) { // If simple message present
OS_AcceptSQueue(squeue, smsg); // then accept it
/*...*/
}
/*...*/
}
}
=== Old style name ===
**OS_CheckQSMsg**\\
=== See also ===
* [[en:osa:ref:allservices:OS_Squeue_Create|OS_Squeue_Create]]
* [[en:osa:ref:allservices:OS_Squeue_Send|OS_Squeue_Send]]
* [[en:osa:ref:allservices:OS_Squeue_Send_TO|OS_Squeue_Send_TO]]
* [[en:osa:ref:allservices:OS_Squeue_Send_Now|OS_Squeue_Send_Now]]
* [[en:osa:ref:allservices:OS_Squeue_IsFull|OS_Squeue_IsFull]]
* [[en:osa:ref:allservices:OS_Squeue_Wait|OS_Squeue_Wait]]
* [[en:osa:ref:allservices:OS_Squeue_Wait_TO|OS_Squeue_Wait_TO]]
----
* [[en:osa:ref:services:alphabetical|Alphabetical]]
* [[en:osa:ref:services:brieflist|All services]]
~~UP~~