OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
openlcb_buffer_store.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_STORE__
42#define __OPENLCB_OPENLCB_BUFFER_STORE__
43
44#include <stdbool.h>
45#include <stdint.h>
46
47#include "openlcb_types.h"
48
49#ifdef __cplusplus
50 extern "C" {
51#endif /* __cplusplus */
52
59 extern void OpenLcbBufferStore_initialize(void);
60
69
76
83
86
89
92
95
98
101
104
107
110
111#ifdef __cplusplus
112}
113#endif /* __cplusplus */
114
115#endif /* __OPENLCB_OPENLCB_BUFFER_STORE__ */
uint16_t OpenLcbBufferStore_snip_messages_max_allocated(void)
Returns the peak number of SNIP messages allocated simultaneously.
Definition openlcb_buffer_store.c:363
void OpenLcbBufferStore_inc_reference_count(openlcb_msg_t *msg)
Increments the reference count on an allocated buffer.
Definition openlcb_buffer_store.c:384
uint16_t OpenLcbBufferStore_stream_messages_max_allocated(void)
Returns the peak number of STREAM messages allocated simultaneously.
Definition openlcb_buffer_store.c:377
uint16_t OpenLcbBufferStore_basic_messages_max_allocated(void)
Returns the peak number of BASIC messages allocated simultaneously.
Definition openlcb_buffer_store.c:335
openlcb_msg_t * OpenLcbBufferStore_allocate_buffer(payload_type_enum payload_type)
Allocates a buffer from the specified pool.
Definition openlcb_buffer_store.c:205
uint16_t OpenLcbBufferStore_snip_messages_allocated(void)
Returns the number of SNIP messages currently allocated.
Definition openlcb_buffer_store.c:356
void OpenLcbBufferStore_free_buffer(openlcb_msg_t *msg)
Decrements the reference count; frees the buffer when it reaches zero.
Definition openlcb_buffer_store.c:277
uint16_t OpenLcbBufferStore_datagram_messages_allocated(void)
Returns the number of DATAGRAM messages currently allocated.
Definition openlcb_buffer_store.c:342
uint16_t OpenLcbBufferStore_stream_messages_allocated(void)
Returns the number of STREAM messages currently allocated.
Definition openlcb_buffer_store.c:370
uint16_t OpenLcbBufferStore_datagram_messages_max_allocated(void)
Returns the peak number of DATAGRAM messages allocated simultaneously.
Definition openlcb_buffer_store.c:349
void OpenLcbBufferStore_initialize(void)
Initializes the buffer store.
Definition openlcb_buffer_store.c:83
uint16_t OpenLcbBufferStore_basic_messages_allocated(void)
Returns the number of BASIC messages currently allocated.
Definition openlcb_buffer_store.c:328
void OpenLcbBufferStore_clear_max_allocated(void)
Resets all peak allocation counters to zero.
Definition openlcb_buffer_store.c:391
Core type definitions, structures, and configuration constants for the OpenLCB library.
payload_type_enum
Message buffer payload type identifier.
Definition openlcb_types.h:220
Core OpenLCB message structure.
Definition openlcb_types.h:480

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