5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
Queues

Functions

wiced_result_t wiced_rtos_deinit_queue (wiced_queue_t *queue)
 
wiced_result_t wiced_rtos_get_queue_occupancy (wiced_queue_t *queue, uint32_t *count)
 
wiced_result_t wiced_rtos_init_queue (wiced_queue_t *queue, const char *name, uint32_t message_size, uint32_t number_of_messages)
 
wiced_result_t wiced_rtos_is_queue_empty (wiced_queue_t *queue)
 
wiced_result_t wiced_rtos_is_queue_full (wiced_queue_t *queue)
 
wiced_result_t wiced_rtos_pop_from_queue (wiced_queue_t *queue, void *message, uint32_t timeout_ms)
 
wiced_result_t wiced_rtos_push_to_queue (wiced_queue_t *queue, void *message, uint32_t timeout_ms)
 

Detailed Description

Queue management functions

Function Documentation

◆ wiced_rtos_deinit_queue()

wiced_result_t wiced_rtos_deinit_queue ( wiced_queue_t * queue)

De-initialize a queue

Deletes a queue created with wiced_rtos_init_queue

Parameters
[in]queue: A pointer to the queue handle
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred

◆ wiced_rtos_get_queue_occupancy()

wiced_result_t wiced_rtos_get_queue_occupancy ( wiced_queue_t * queue,
uint32_t * count )

Get the queue occupancy

Parameters
[in]queue: A pointer to the queue handle
[out]count: Pointer to integer for storing occupancy count
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred

◆ wiced_rtos_init_queue()

wiced_result_t wiced_rtos_init_queue ( wiced_queue_t * queue,
const char * name,
uint32_t message_size,
uint32_t number_of_messages )

Initializes a FIFO queue

Parameters
[in]queue: A pointer to the queue handle to be initialized
[in]name: A text string name for the queue (NULL is allowed)
[in]message_size: Size in bytes of objects that will be held in the queue
[in]number_of_messages: Depth of the queue - i.e. max number of objects in the queue
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error occurred

◆ wiced_rtos_is_queue_empty()

wiced_result_t wiced_rtos_is_queue_empty ( wiced_queue_t * queue)

Check if a queue is empty

Parameters
[in]queue: A pointer to the queue handle
Returns
WICED_SUCCESS : queue is empty.
WICED_ERROR : queue is not empty.

◆ wiced_rtos_is_queue_full()

wiced_result_t wiced_rtos_is_queue_full ( wiced_queue_t * queue)

Check if a queue is full

Parameters
[in]queue: A pointer to the queue handle
Returns
WICED_SUCCESS : queue is full.
WICED_ERROR : queue is not full.

◆ wiced_rtos_pop_from_queue()

wiced_result_t wiced_rtos_pop_from_queue ( wiced_queue_t * queue,
void * message,
uint32_t timeout_ms )

Pops an object off a queue

Pops an object off a queue

Parameters
[in]queue: A pointer to the queue handle
[out]message: Pointer to a buffer that will receive the object being popped off the queue. Size is assumed to be the size specified in wiced_rtos_init_queue, hence you must ensure the buffer is long enough or memory corruption will result
[in]timeout_ms: The number of milliseconds to wait before returning
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error or timeout occurred

◆ wiced_rtos_push_to_queue()

wiced_result_t wiced_rtos_push_to_queue ( wiced_queue_t * queue,
void * message,
uint32_t timeout_ms )

Pushes an object onto a queue

Parameters
[in]queue: A pointer to the queue handle
[in]message: The object to be added to the queue. Size is assumed to be the size specified in wiced_rtos_init_queue
[in]timeout_ms: The number of milliseconds to wait before returning
Returns
WICED_SUCCESS : on success.
WICED_ERROR : if an error or timeout occurred