////////////////////////////////////////////////////////////////////////////////////////////////////
// FUNCT:
// Mesh_Checkqueue
// DESCR:
// Check if the corresponding bit of wanted node has been set or not.
// Check whether specified node is already in the queue.
// If set, return 1. Else return 0.
// INPUTS:
// node - node ID.
// parray - indication array
// OUTPUTS:
// node - ID of the node.
// RETURN:
// TRUE or FALSE indicate whether specified node is in the queue.
// Considerations:
// None.
////////////////////////////////////////////////////////////////////////////////////////////////////
uint8 Mesh_Checkqueue(address_size node, const uint8* parray)
{
address_size i;
address_size j;
address_size k;
node --; // node - 1 to align with the corresponding bit in the array
i = node / 8;
j = node % 8;
k = 0x01 << j;
if((parray[i] & k) != 0)
{
return TRUE;
}
else
return FALSE;
}
|