I've just pushed an all-singing, mostly dancing csv output module to
g...@github.com:mwm/libsigrok.git. This correctly handles multiple analog
values from the demo driver (which the old one didn't do) and implements
most of the features on the todo list. It also adds a few more features
that make it possible to recreate the gnuplot module output with it,
meaning you can now use gnuplot on analog values, etc. The complete options
list is at the end of the message. Please give it a try and let me know
what you think, if you have problems, or you think the defaults ought to be
adjusted.

Issues;

sigrok-cli  insists that all analog values be displayed, sending them to
the analog output module if the configured module doesn't generate any
output. The demo driver sends all channels, no matter what. This results in
analog values that the CSV module doesn't display being displayed via the
analog module. This strikes me as a bug in sigrok-cli, so I just nuked it
for now..

The demo driver has some quirks that don't interact well with analog
values. In particular, it seems to have a fencepost error, outputting one
last set of analog values after the number of samples you ask for via
--samples. It also sends all channels, not just disabled channels. This two
things interact with the way analog samples are handled in the output
module to create events it feels are worthy of a warning at the end of the
file. In particular, if you don't use the last analog value, or mix digital
and analog values, those last packets will generate warnings about short
packets. I'll be sending another bit of mail shortly about analog value
handling, frames, etc.

To me, the most interesting new feature is the "gnuplot" option. The
contributes scripts were interesting, but not really suited to interactive
use. This creates a gnuplot script that can be invoked from gnuplot via the
"call" command, passing it the name of the data file as a parameter. The
csv module sniffs the output data, and positions the resulting plots
accordingly. An options is included that scales the graphs of all the
channesl to the same peak-to-peak value. It doesn't set anything; the idea
is that the calling gnuplot script (or interactive session) will set
styles, linetypes, and terminal to get the output the user wants.


 * gnuplot: Write out a gnuplot intrerpreter script (.gpi file) to plot
 *          the datafile using the parameters given. It should be called
 *          from a gnuplot session with the data file name as a paramter
 *          after adjusting line styles, terminal, etc.
 *
 * scale:   The gnuplot graphs are scaled so they all have the same
 *          peak-to-peak distance. Defaults to TRUE.
 *
 * value:   The string used to separate values in ba record. Defaults to
','.
 *
 * record:  The string to use to separate records. Default is newline.
gnuplot
 *          files must use newline.
 *
 * frame:   The string to use when a frame ends. The default is a blank
line.
 *          This may confuse some csv parsers, but it makes gnuplot happy.
 *
 * comment: The string that starts a comment line. Defaults to ';'.
 *
 * header:  Print header comment with capture metadata.
 *
 * label:   Add a line of channel labels as the first line of output.
 *
 * time:    Whether or not the first column should include the time the
sample
 *          was taken. Defaults to TRUE.
 *
 * dedup:   Don't output duplicate rows. Defaults to TRUE. If time is off,
then
 *          this is forced to be off.
------------------------------------------------------------------------------
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to