OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
openlcb_buffer_list.h
Go to the documentation of this file.
1
40// This is a guard condition so that contents of this file are not included
41// more than once.
42#ifndef __OPENLCB_OPENLCB_BUFFER_LIST__
43#define __OPENLCB_OPENLCB_BUFFER_LIST__
44
45#include <stdbool.h>
46#include <stdint.h>
47
48#include "openlcb_types.h"
49
50#ifdef __cplusplus
51extern "C"
52{
53#endif /* __cplusplus */
54
61 extern void OpenLcbBufferList_initialize(void);
62
71
81 extern openlcb_msg_t *OpenLcbBufferList_find(uint16_t source_alias, uint16_t dest_alias, uint16_t mti);
82
91
99 extern openlcb_msg_t *OpenLcbBufferList_index_of(uint16_t index);
100
102 extern bool OpenLcbBufferList_is_empty(void);
103
114 extern void OpenLcbBufferList_check_timeouts(uint8_t current_tick);
115
116#ifdef __cplusplus
117}
118#endif /* __cplusplus */
119
120#endif /* __OPENLCB_OPENLCB_BUFFER_LIST__ */
openlcb_msg_t * OpenLcbBufferList_index_of(uint16_t index)
Returns the message pointer at the given index.
Definition openlcb_buffer_list.c:176
void OpenLcbBufferList_check_timeouts(uint8_t current_tick)
Scans for stale in-progress buffers and frees them.
Definition openlcb_buffer_list.c:205
bool OpenLcbBufferList_is_empty(void)
Returns true if the list contains no messages.
Definition openlcb_buffer_list.c:189
openlcb_msg_t * OpenLcbBufferList_release(openlcb_msg_t *msg)
Removes a message from the list without freeing it.
Definition openlcb_buffer_list.c:151
openlcb_msg_t * OpenLcbBufferList_find(uint16_t source_alias, uint16_t dest_alias, uint16_t mti)
Finds a message matching source alias, dest alias, and MTI.
Definition openlcb_buffer_list.c:115
void OpenLcbBufferList_initialize(void)
Initializes the buffer list to an empty state.
Definition openlcb_buffer_list.c:59
openlcb_msg_t * OpenLcbBufferList_add(openlcb_msg_t *new_msg)
Inserts a message pointer into the first available slot.
Definition openlcb_buffer_list.c:82
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