RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
Loading...
Searching...
No Matches
rmgui_chart_series_t Struct Reference

Strictly time-ordered samples in a caller-owned ring. More...

#include <chart_series.h>

Data Fields

rmgui_chart_sample_t * slots
size_t capacity
size_t head
size_t count
uint32_t last_ms

Detailed Description

Strictly time-ordered samples in a caller-owned ring.

Members are private; use the series functions to read or change them. head indexes the oldest sample. count <= capacity samples follow, wrapping around the ring. last_ms records the newest time and has no meaning while the count is zero. Zero initialization binds no slots, holds no samples and refuses every push.

Values are raw int32_t in caller-specified units and are never scaled. Times are uint32_t milliseconds relative to the caller's origin and may wrap. Time b is after a when (int32_t)(b - a) > 0. A window [t0, t1] is valid when (int32_t)(t1 - t0) > 0 and thus spans 1 through INT32_MAX milliseconds. A sample at t is inside that window when (uint32_t)(t - t0) <= (uint32_t)(t1 - t0).

Field Documentation

◆ slots

rmgui_chart_sample_t* rmgui_chart_series_t::slots

◆ capacity

size_t rmgui_chart_series_t::capacity

◆ head

size_t rmgui_chart_series_t::head

◆ count

size_t rmgui_chart_series_t::count

◆ last_ms

uint32_t rmgui_chart_series_t::last_ms

The documentation for this struct was generated from the following file: