1.2.12.4.2 SRV_QUEUE_Append Function
C
void SRV_QUEUE_Append(
SRV_QUEUE *queue,
SRV_QUEUE_ELEMENT *element
);
Summary
Appends an element into a queue.
Description
This function appends an element into a queue.
Precondition
The queue must have been initialized previously with function SRV_QUEUE_Init.
Parameters
Param | Description |
---|---|
queue | Pointer to the queue where to append the element |
element | Pointer to the element to be appended |
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 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);
Remarks
None.