101 if (src[i] ==
'\0') {
127 if (ring ==
nullptr) {
161 if (out ==
nullptr) {
167 if (name[n] ==
'\0') {
178 if (line ==
nullptr) {
181 if (line[j] ==
'\0') {
198 if (line ==
nullptr) {
212 return s_rings[(uint32_t)ch].count;
220 return s_rings[(uint32_t)ch].total;
229 if (back >= ring->
count) {
235 return ring->
lines[idx];
static const char *const s_k_channel_names[k_board_console_ch_count]
Tab captions, indexed by board_console_ch_t (also the ALL prefix).
static void internal_format_all_line(board_console_ch_t ch, const char *line, char *out)
Build the "<NAME> <line>" form an ALL-ring entry stores.
const char * board_console_line(board_console_ch_t ch, uint32_t back)
Fetch a retained line by age (0 = newest) from a channel.
static console_ring_t s_rings[k_board_console_ch_count]
One ring per channel, including the aggregate ALL ring at index 0.
uint32_t board_console_count(board_console_ch_t ch)
Count of lines currently retained in a channel ring.
void board_console_reset(void)
Clear every channel ring (called on a warm reboot).
const char * board_console_name(board_console_ch_t ch)
Short display name for a channel (the tab caption).
void board_console_push(board_console_ch_t ch, const char *line)
Append one completed line to a channel ring and the ALL ring.
static void internal_slot_copy(char *dst, const char *src)
Copy a bounded, NUL-terminated string into a ring slot.
static void internal_ring_push(console_ring_t *ring, const char *line)
Append one already-formed line to a single ring.
uint32_t board_console_total(board_console_ch_t ch)
Monotonic count of lines ever pushed to a channel.
Multi-channel console log store backing the board view's tabbed console.
@ k_board_console_line_cap
Max chars stored per line (with NUL).
@ k_board_console_ring_depth
Recent lines retained per channel.
board_console_ch_t
Console channels the board view exposes as tabs.
@ k_board_console_ch_all
Aggregate of all lanes (arrival order).
@ k_board_console_ch_count
Channel count (ring + tab array size).
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
One channel's scrollback ring.
uint32_t head
Next write slot (one past newest).
char lines[k_board_console_ring_depth][k_board_console_line_cap]
Row storage.
uint32_t total
Rows ever pushed (monotonic).
uint32_t count
Rows held (saturates at ring depth).