|
| static bool | starts_with (const char *s, const char *prefix, bool fold) |
| | Whether a name starts with a prefix.
|
| static bool | any_of (const char *s, const char *list) |
| | Whether a name equals one of a '|'-separated list.
|
| log_field_meta_t | log_field_meta (const char *name) |
| | Group and unit for a channel name.
|
| static int | numeric_column (const log_analysis_t *an, const char *name) |
| | The index of the numeric column named name, not the time axis.
|
| static bool | picked (const int *picks, int n, int c) |
| | Whether c is among the first n of picks.
|
| int | log_fields_picks (const log_analysis_t *an, int *out, int max) |
| | The columns LOGS plots in a file before the operator picks any.
|
What a column means, from what it is called.
A log names its columns but not their roles: "Time(ms)", "t", "timestamp" and "Zeit" are all the x-axis, and "V", "Volt" and "Spannung" are all a voltage. This maps a header name to a role and a unit by matching the names that actually appear in the field, case-folded, so the plot knows which column is time and what each trace is measured in without being told.
SPDX-License-Identifier: MIT
| int log_fields_picks |
( |
const log_analysis_t * | an, |
|
|
int * | out, |
|
|
int | max ) |
The columns LOGS plots in a file before the operator picks any.
In a file with a numeric pulse column, a SERVO run's, its pulse, angle, current and voltage first, each where it is numeric; then, and in any other file, the first numeric columns in file order. Never the time axis, and no column twice.
- Parameters
-
| an | The file's analysis. |
| out | Receives the column indices. |
| max | The most columns to pick. |
- Returns
- The number of columns picked; 0 with
an or out NULL.