LibJuno 0.42.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
buff_queue_api.h File Reference
#include "juno/macros.h"
#include "juno/status.h"
#include "juno/module.h"
#include "juno/types.h"
Include dependency graph for buff_queue_api.h:

Go to the source code of this file.

Typedefs

typedef struct JUNO_BUFF_QUEUE_ROOT_TAG JUNO_BUFF_QUEUE_ROOT_T
 The Buffer queue root.
 
typedef union JUNO_BUFF_QUEUE_T JUNO_BUFF_QUEUE_T
 The Buffer queue module.
 

Functions

struct JUNO_BUFF_QUEUE_ROOT_TAG JUNO_MODULE_ROOT (void, size_t iStartIndex;size_t zLength;size_t zCapacity;)
 The root buffee queue.
 
static JUNO_STATUS_T JunoBuff_QueueInit (JUNO_BUFF_QUEUE_T *ptQueue, size_t zCapacity, JUNO_FAILURE_HANDLER_T pfcnFailureHdlr, JUNO_USER_DATA_T *pvFailureUserData)
 Initialize a buffer queue with a capacity.
 
static JUNO_RESULT_SIZE_T JunoBuff_QueueEnqueue (JUNO_BUFF_QUEUE_T *ptQueue)
 
static JUNO_RESULT_SIZE_T JunoBuff_QueueDequeue (JUNO_BUFF_QUEUE_T *ptQueue)
 
static JUNO_RESULT_SIZE_T JunoBuff_QueuePeek (JUNO_BUFF_QUEUE_T *ptQueue)
 

Typedef Documentation

◆ JUNO_BUFF_QUEUE_ROOT_T

typedef struct JUNO_BUFF_QUEUE_ROOT_TAG JUNO_BUFF_QUEUE_ROOT_T

The Buffer queue root.

This API has been generated by LibJuno: https://www.robinonsay.com/libjuno/ This header contains the juno_buff_queue library API

Author
Robin Onsay

◆ JUNO_BUFF_QUEUE_T

The Buffer queue module.

Function Documentation

◆ JUNO_MODULE_ROOT()

struct JUNO_BUFF_QUEUE_ROOT_TAG JUNO_MODULE_ROOT ( void  ,
size_t iStartIndex;size_t zLength;size_t zCapacity;   
)

The root buffee queue.

◆ JunoBuff_QueueDequeue()

static JUNO_RESULT_SIZE_T JunoBuff_QueueDequeue ( JUNO_BUFF_QUEUE_T ptQueue)
inlinestatic

Dequeue an item from the buffer

Returns
The index to dequeue the item from

◆ JunoBuff_QueueEnqueue()

static JUNO_RESULT_SIZE_T JunoBuff_QueueEnqueue ( JUNO_BUFF_QUEUE_T ptQueue)
inlinestatic

Enqueue an item into the buffer

Returns
The index to place the enqueued item

◆ JunoBuff_QueueInit()

static JUNO_STATUS_T JunoBuff_QueueInit ( JUNO_BUFF_QUEUE_T ptQueue,
size_t  zCapacity,
JUNO_FAILURE_HANDLER_T  pfcnFailureHdlr,
JUNO_USER_DATA_T pvFailureUserData 
)
inlinestatic

Initialize a buffer queue with a capacity.

◆ JunoBuff_QueuePeek()

static JUNO_RESULT_SIZE_T JunoBuff_QueuePeek ( JUNO_BUFF_QUEUE_T ptQueue)
inlinestatic

Peek at the next item in the queue

Returns
the index of the next item in the queue