LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
JUNO_DS_QUEUE_API_TAG Struct Reference

Queue API vtable. More...

#include <queue_api.h>

Data Fields

JUNO_STATUS_T(* Enqueue )(JUNO_DS_QUEUE_ROOT_T *ptQueue, JUNO_POINTER_T tItem)
 Enqueue an item to the back of the queue.
 
JUNO_STATUS_T(* Dequeue )(JUNO_DS_QUEUE_ROOT_T *ptQueue, JUNO_POINTER_T tReturn)
 Dequeue the item at the front of the queue.
 
JUNO_RESULT_POINTER_T(* Peek )(JUNO_DS_QUEUE_ROOT_T *ptQueue)
 Peek at the item at the front without removing it.
 

Detailed Description

Queue API vtable.

Field Documentation

◆ Dequeue

JUNO_STATUS_T(* JUNO_DS_QUEUE_API_TAG::Dequeue) (JUNO_DS_QUEUE_ROOT_T *ptQueue, JUNO_POINTER_T tReturn)

Dequeue the item at the front of the queue.

Parameters
ptQueueQueue instance.
tReturnPointer trait receiving the dequeued item (copied out).
Returns
JUNO_STATUS_SUCCESS on success; JUNO_STATUS_ERR if empty; or pointer/array errors.

◆ Enqueue

JUNO_STATUS_T(* JUNO_DS_QUEUE_API_TAG::Enqueue) (JUNO_DS_QUEUE_ROOT_T *ptQueue, JUNO_POINTER_T tItem)

Enqueue an item to the back of the queue.

Parameters
ptQueueQueue instance.
tItemPointer trait describing the item to copy into the queue.
Returns
JUNO_STATUS_SUCCESS on success; JUNO_STATUS_INVALID_SIZE_ERROR if full; or pointer/array errors.

◆ Peek

JUNO_RESULT_POINTER_T(* JUNO_DS_QUEUE_API_TAG::Peek) (JUNO_DS_QUEUE_ROOT_T *ptQueue)

Peek at the item at the front without removing it.

Parameters
ptQueueQueue instance.
Returns
Result with pointer descriptor to the front element; JUNO_STATUS_INVALID_SIZE_ERROR if empty.

The documentation for this struct was generated from the following file: