On Tue, Aug 2, 2016 at 3:24 AM <b...@biot.com> wrote: > On 08/02/2016 05:05 AM, Mike Meyer wrote: > > I've set about doing something about this. I've added analog output to > > gnuplot - mostly. The stream format can include frames that encompass > > multiple packets. I've written the code (well, cribbed it from > > output/csv.c) but can't test it - or at least can't find a way to test > it, > > as it seems that the only way to generate such a stream is from one of > the > > hardware drivers that does so. > > That's what the demo driver is for. It generates analog streams as well > (sine waves and such), and can be configured to some extent. >
Unfortunately, it doesn't generate frame markers. I think it should, but I could be confused about what they're for. > This being sigrok however, any input will do: by the time it reaches an > output module, it doesn't matter whether the analog stream came from > hardware or a .WAV file. > > If you're specifically looking for something that generates frame > markers, I think it's mostly only oscilloscope drivers that generate > those. But do you really need those for gnuplot output? That seems to me > like it should just generate a continuous stream. > I'm honestly not sure. The frame markers don't seem to be documented on the Wiki, so I'm cribbing from the csv output file. Which has code for handling them. Of course, I just tried writing two analog values out as a csv file, and it failed to write the second value, so maybe it's wrong. I'm thinking some kind of framing is needed for mixed signal devices, because you need multiple packets to build a sample across all the sensors. But I don't have documentation or working code that uses them, the code that generates them all seems to be mired in device logic, and I have no samples to use for testing. I think I'll rip all that code out of csv and gnuplot, which IO code that uses them (the analog output driver handles them by writing "FRAME-BEGIN" and "FRAME-END" to the output stream). If somebody needs them handled, then they can presumably provide samples that we can try and output. > The real goal is adding analog values to the protocol decoder API. > > The broad plan was always to have a better transform framework in > libsigrok, which was capable of doing analog -> logic conversion. But > this got bogged down in some very determined and complete lack of > action. I still think this is the best place to do it, but code wins. > Well, I want to be able to do waveform analysis in a decoder. That means I need some way of getting analog values out to them. I don't think that transform framework would help with that, as I just want the waveforms, not a transform of them. But I haven't even looked at the code to start planning how to do this, so if you think it would solve my problem, I'm certainly willing to consider it.
------------------------------------------------------------------------------
_______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel