From: Gerhard Sittig Date: Fri, 18 Oct 2019 23:14:29 +0000 (+0200) Subject: input/csv: update developer comments and TODO list X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=cb3b80512e7c7cf44797f4a38998fda0a8fc93f5;p=libsigrok.git input/csv: update developer comments and TODO list Mention the required synchronization of default option values and format match logic in a prominent location where options are discussed. Update the TODO list for the CSV input module. Mixed signal handling got fixed by rearranging channel creation. Samplerate can get determined from timestamp columns already. The double data type for analog data remains. --- diff --git a/src/input/csv.c b/src/input/csv.c index dabd52c8..d2d86a32 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -127,27 +127,18 @@ * and equidistant rows, there is no fancy support for textual unit * suffixes nor gaps in the stream of samples nor other non-linearity, * just '-' ignore the column if the format is not supported). + * + * IMPORTANT! Make sure the .format_match() logic matches the default + * values for the input module's options. Ideally the format match test + * shall pass for all input data that is supported by default. */ /* * TODO * - * - Extend support for analog input data. - * - Determine why analog samples of 'double' data type get scrambled - * in sigrok-cli screen output. Is analog.encoding->unitsize not - * handled properly? A sigrok-cli or libsigrok (src/output) issue? - * - Reconsider the channel creation after format processing. Current - * logic may "bleed" channel names into the analog group when logic - * channels' columns follow analog columns (seen with "-,2a,x8"). - * Trying to sort it out, a naive change used to map logic channels' - * data to incorrect bitmap positions. The whole channel numbering - * needs reconsideration. Probably it's easiest to first create _all_ - * logic channels so that they have adjacent numbers starting at 0 - * (addressing logic bits), then all analog channels (again adjacent) - * to simplify the calculation of their index in the sample set as - * well as their sdi channel index from the "analog column index". - * - Optionally get sample rate from timestamp column. Just best-effort - * approach, not necessarily reliable. Users can always specify rates. + * - Unbreak analog data when submitted in the 'double' data type. This + * was observed with sigrok-cli screen output. Is analog.encoding->unitsize + * not handled appropriately? Is it a sigrok-cli or libsigrok issue? * - Add a test suite for input modules in general, and CSV in specific? * Becomes more important with the multitude of options and their * interaction. Could cover edge cases (BOM presence, line termination