LibJuno 1.0.1
LibJuno is a lightweight C11 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
buff_api.hpp
Go to the documentation of this file.
1/*
2 MIT License
3
4 Copyright (c) 2025 Robin A. Onsay
5
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files
8 (the "Software"), to deal in the Software without restriction,
9 including without limitation the rights to use, copy, modify, merge,
10 publish, distribute, sublicense, and/or sell copies of the Software,
11 and to permit persons to whom the Software is furnished to do so,
12 subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be
15 included in all copies or substantial portions of the Software.
16*/
17
27#ifndef JUNO_DS_QUEUE_API_HPP
28#define JUNO_DS_QUEUE_API_HPP
29#include "juno/status.h"
30#include "juno/module.h"
31#include "juno/module.hpp"
32#include "juno/types.hpp"
33#include <cstddef>
34
35namespace juno
36{
37namespace buff
38{
39
43template<typename T, const size_t N>
44struct QUEUE_API_T;
45
49template<typename T, const size_t N>
51 ARRAY_T<T,N> tArrBuff;
52 size_t iStartIndex;
53 size_t zLength;
54);
55
59template<typename T, const size_t N>
61{
63 JUNO_STATUS_T (*Enqueue)(QUEUE_ROOT_T<T, N>& tQueue, T tData);
68};
69
70
72template<typename T, const size_t N>
73struct STACK_API_T;
74
76template<typename T, const size_t N>
79 size_t zLength;
80);
81
83template<typename T, const size_t N>
93
94}
95}
96
97#endif // JUNO_DS_QUEUE_API_H
#define JUNO_MODULE_ARG(...)
Pass-through argument pack helper for module macros.
Definition module.h:91
#define JUNO_MODULE_ROOT(API_T,...)
Implement a module root struct containing ptApi and failure fields.
Definition module.h:126
int32_t JUNO_STATUS_T
Canonical status type for LibJuno functions.
Definition status.h:49
Module system and dependency injection primitives for LibJuno.
Definition buff_api.hpp:36
Status codes and failure-handling helpers for LibJuno.
Definition types.hpp:31
Definition module.hpp:29
Definition buff_api.hpp:61
RESULT_T< T * >(* Peek)(QUEUE_ROOT_T< T, N > &tQueue)
Peek at the next data item in the queue buffer. Calling Dequeue would dequeue this.
Definition buff_api.hpp:67
JUNO_STATUS_T(* Enqueue)(QUEUE_ROOT_T< T, N > &tQueue, T tData)
Enqueue data into the queue buffer.
Definition buff_api.hpp:63
RESULT_T< T >(* Dequeue)(QUEUE_ROOT_T< T, N > &tQueue)
Dequeue data from the queue buffer.
Definition buff_api.hpp:65
The stack buffer api.
Definition buff_api.hpp:85
JUNO_STATUS_T(* Push)(STACK_ROOT_T< T, N > &tStack, T tData)
Push data onto the stack buffer.
Definition buff_api.hpp:87
RESULT_T< T >(* Pop)(STACK_ROOT_T< T, N > &tStack)
Pop data from the stack buffer.
Definition buff_api.hpp:89
RESULT_T< T * >(* Peek)(STACK_ROOT_T< T, N > &tStack)
Peek into data on the stack buffer.
Definition buff_api.hpp:91