OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
openlcb_buffer_fifo.h
Go to the documentation of this file.
1
39// This is a guard condition so that contents of this file are not included
40// more than once.
41#ifndef __OPENLCB_OPENLCB_BUFFER_FIFO__
42#define __OPENLCB_OPENLCB_BUFFER_FIFO__
43
44#include <stdbool.h>
45#include <stdint.h>
46
47#include "openlcb_types.h"
48
49#ifdef __cplusplus
50extern "C" {
51#endif /* __cplusplus */
52
59 extern void OpenLcbBufferFifo_initialize(void);
60
69
76
78 extern bool OpenLcbBufferFifo_is_empty(void);
79
81 extern uint16_t OpenLcbBufferFifo_get_allocated_count(void);
82
96
110
111
112#ifdef __cplusplus
113}
114#endif /* __cplusplus */
115
116#endif /* __OPENLCB_OPENLCB_BUFFER_FIFO__ */
openlcb_msg_t * OpenLcbBufferFifo_pop(void)
Removes and returns the oldest message from the FIFO.
Definition openlcb_buffer_fifo.c:130
openlcb_msg_t * OpenLcbBufferFifo_push_to_head(openlcb_msg_t *new_msg)
Inserts a message pointer at the head of the FIFO.
Definition openlcb_buffer_fifo.c:220
void OpenLcbBufferFifo_check_and_invalidate_messages_by_source_alias(uint16_t alias)
Marks all queued incoming messages from a released alias as invalid.
Definition openlcb_buffer_fifo.c:175
openlcb_msg_t * OpenLcbBufferFifo_push(openlcb_msg_t *new_msg)
Adds a message pointer to the tail of the FIFO.
Definition openlcb_buffer_fifo.c:98
uint16_t OpenLcbBufferFifo_get_allocated_count(void)
Returns the number of messages currently held in the FIFO.
Definition openlcb_buffer_fifo.c:240
void OpenLcbBufferFifo_initialize(void)
Initializes the FIFO to an empty state.
Definition openlcb_buffer_fifo.c:71
bool OpenLcbBufferFifo_is_empty(void)
Returns true if the FIFO contains no messages.
Definition openlcb_buffer_fifo.c:153
Core type definitions, structures, and configuration constants for the OpenLCB library.
Core OpenLCB message structure.
Definition openlcb_types.h:480

Copyright (c) 2026 Jim Kueneman all rights reserved. See the License