|
Envorimental Monitoring
|
Ring buffer control structure. More...
#include <ring_buffer.h>
Data Fields | |
| float * | buffer |
| uint16_t | head |
| uint16_t | tail |
| uint16_t | count |
| uint16_t | size |
Ring buffer control structure.
All fields should be treated as private; use the API functions below to interact with the buffer.
| float* buffer |
Pointer to the externally allocated storage array.
| uint16_t count |
Number of valid samples currently in the buffer.
| uint16_t head |
Write index — points to the next free slot.
| uint16_t size |
Total capacity of the buffer (number of floats).
| uint16_t tail |
Read index — points to the oldest sample.