1.2.12.4.1 SRV_QUEUE_Init Function

C

void SRV_QUEUE_Init(
    SRV_QUEUE *queue, 
    uint16_t capacity, 
    SRV_QUEUE_TYPE type
);

Summary

Initializes a queue.

Description

This function initializes a queue.

Precondition

None.

Parameters

ParamDescription
queuePointer to the queue to be initialized
capacityMaximum number of elements in the queue
typeQueue type (single or priority queue)

Returns

None.

Example

#define NUM_MAX_NODES    750
static SRV_QUEUE nodeQueue;
   
SRV_QUEUE_Init(&nodeQueue, NUM_MAX_NODES, SRV_QUEUE_TYPE_SINGLE);

Remarks

This function must be called before invoking any other functionality of the queue management module.