To start, try looking at what the SPI protocol decoder emits via OUTPUT_PYTHON. OUTPUT_PYTHON is a way for decoders to pass a Python data structure up to another stacked decoder.
The SPI decoder lists its OUTPUT_PYTHON format in the source code: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blob;f=decoders/spi/pd.py;h=fd9a78fd7d87c3a9568c519676ffc695c9687fbf;hb=HEAD#l27 There are several examples in sigrok's decoders that use OUTPUT_PYTHON from SPI, such as rgb_led_spi, spiflash, etc. They are providing a higher-level interpretation of SPI signal packets. You can write your own decoder stacked on top of SPI by declaring inputs = ['spi'] Then it receives pre-parsed SPI data, in the form of Python tuples and lists, which you can process however you need. Commonly your decoder emits timeline annotations back to sigrok but there is also a way for your decoder to output raw data with OUTPUT_BINARY that you can pipe to an intermediate file or another process doing your own visualization. https://sigrok.org/wiki/Protocol_decoder_output#Binary_output In regards to automation, sigrok-cli can capture, decode, and output from the command line without manually using PulseView. On Sun, Jun 12, 2022 at 8:03 AM David Grant <dav...@aercoustics.com> wrote: > Hi, > > I'm very novice so please excuse me if this is a silly question. > > From Python I want to be able to access the SPI data which my DSLogic Plus > is capturing via Pulseview. I want to apply some signal processing in > Python and perform my own visualization of the captured data and have this > be automated (not require manual export from Pulseview). > > I was hopeful this would be easy since the DSLogic Plus is already > supported but reviewing the development documentation I am unsure where to > start. > > Can anyone give me some starting suggestions? Is there any example code > for a project that has similar goals? > > Regards, > David > _______________________________________________ > sigrok-devel mailing list > sigrok-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sigrok-devel >
_______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel