1.2.12.4.9 SRV_QUEUE_Flush Function
C
void SRV_QUEUE_Flush(
SRV_QUEUE *queue
);
Summary
Flushes the given queue.
Description
This function flushes the given queue.
Precondition
The queue must have been initialized previously with function SRV_QUEUE_Init.
Parameters
Param | Description |
---|---|
queue | Pointer to the queue to be flushed |
Returns
None.
Example
#define NUM_MAX_NODES 750 typedef struct _node_info_tag { struct _node_info_tag *prev; struct _node_info_tag *next; uint8_t macAddress[8] } NODE_INFO; static SRV_QUEUE nodeQueue; static node_info_t nodeInfo; SRV_QUEUE_Init(&nodeQueue, NUM_MAX_NODES, SRV_QUEUE_TYPE_SINGLE); memset(nodeInfo.macAddress, 0xFF, 8); SRV_QUEUE_Append(&nodeQueue, (SRV_QUEUE_ELEMENT *)&nodeInfo); SRV_QUEUE_Flush(&nodeQueue);
Remarks
None.