OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
can_buffer_store.h
Go to the documentation of this file.
1
38#ifndef __DRIVERS_CANBUS_CAN_BUFFER_STORE__
39#define __DRIVERS_CANBUS_CAN_BUFFER_STORE__
40
41#include <stdbool.h>
42#include <stdint.h>
43
44#include "can_types.h"
45
46#ifdef __cplusplus
47extern "C"
48{
49#endif /* __cplusplus */
50
59 extern void CanBufferStore_initialize(void);
60
75
86 extern void CanBufferStore_free_buffer(can_msg_t *msg);
87
89 extern uint16_t CanBufferStore_messages_allocated(void);
90
92 extern uint16_t CanBufferStore_messages_max_allocated(void);
93
95 extern void CanBufferStore_clear_max_allocated(void);
96
97#ifdef __cplusplus
98}
99#endif /* __cplusplus */
100
101#endif /* __DRIVERS_CANBUS_CAN_BUFFER_STORE__ */
uint16_t CanBufferStore_messages_allocated(void)
Returns the number of can_msg_t buffers currently allocated.
Definition can_buffer_store.c:154
void CanBufferStore_initialize(void)
Clears all buffers and resets telemetry counters.
Definition can_buffer_store.c:69
uint16_t CanBufferStore_messages_max_allocated(void)
Returns the peak allocation count since last reset.
Definition can_buffer_store.c:161
void CanBufferStore_clear_max_allocated(void)
Resets the peak counter without affecting current allocations.
Definition can_buffer_store.c:168
void CanBufferStore_free_buffer(can_msg_t *msg)
Returns a can_msg_t buffer to the pool.
Definition can_buffer_store.c:140
can_msg_t * CanBufferStore_allocate_buffer(void)
Allocates one can_msg_t buffer from the pool.
Definition can_buffer_store.c:101
Type definitions and constants for the CAN transport layer.
Definition can_types.h:118

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