rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
log_viewer_io_t Struct Reference

Data Fields

int(*) list (log_viewer_file_t *out, int max_entries, log_viewer_page_t *page, void *ctx)
bool(*) open (const char *name, log_source_t *src, void *ctx)
void(*) close (void *ctx)
const char *(*) volume (void *ctx)
bool(*) remove (const char *name, void *ctx)
void(*) folder (const char *dir, void *ctx)
unsigned(*) written (log_viewer_tab_t *tab, void *ctx)
card_state_t(*) card (void *ctx)
unsigned(*) mounts (void *ctx)
void * ctx

Field Documentation

◆ card

card_state_t(*) log_viewer_io_t::card(void *ctx)

What the slot holds, asked after a list() that found no volume: the empty list then says no card, a card neither FAT32 nor exFAT, or a card that cannot be read. May be NULL: no card.

◆ close

void(*) log_viewer_io_t::close(void *ctx)

Release whatever open() acquired.

◆ folder

void(*) log_viewer_io_t::folder(const char *dir, void *ctx)

Point the list(), open() and remove() that follow at folder dir of the volume, a path from its root ("" the root itself; log_viewer_tab_dir()). The screen calls it before each of them. May be NULL: a volume of one folder, which every tab lists.

◆ list

int(*) log_viewer_io_t::list(log_viewer_file_t *out, int max_entries, log_viewer_page_t *page, void *ctx)

Fill out with the page page asks for, at most max_entries entries in the order the browse list draws them (log_select_sort(): newest run at the top, as the pages run), set page's ahead and held, and return how many entries the volume holds, or -1 when there is no volume at all.

The count may be larger than max_entries: a card takes up to 999 runs, and the screen shows them a page at a time and says which part of the count it shows. log_select.h chooses the page while the directory is read. A page of NULL is the first page.

◆ mounts

unsigned(*) log_viewer_io_t::mounts(void *ctx)

A number that changes with every mount: another number is another volume, whatever its name. Two cards with one label are told apart by it. May be NULL: the name alone tells cards apart.

◆ open

bool(*) log_viewer_io_t::open(const char *name, log_source_t *src, void *ctx)

Open a listed name as a rewindable source; false if it fails to open.

◆ remove

bool(*) log_viewer_io_t::remove(const char *name, void *ctx)

Delete a listed name from the volume; false if it is refused or fails. May be NULL, and then the browse view offers no DELETE. The screen calls it only after the operator has confirmed that name on a second panel.

◆ volume

const char *(*) log_viewer_io_t::volume(void *ctx)

The card's name for the header: its volume label, or what the card says of itself when it has none. May be NULL, and then the header reads SD CARD.

◆ written

unsigned(*) log_viewer_io_t::written(log_viewer_tab_t *tab, void *ctx)

How many files the logger has created since the panel started, and in tab the tab of the last one. May be NULL: no file is written. LOGS opens on that tab when the count has moved since it last looked, so the run just recorded is on screen.


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