This is a very minimal example for writing your own quick-and-dirty decoder that you can use in PulseView.
This decoder displays annotations for a signal that's made up of 1 ms units. It annotates from one signal edge to another, without regard for time. If you want to handle the actual units of time, more logic is required and that's left as an exercise for the reader.
Decoders are written as Python modules, and you will need to place this __init__.py
file under a new decoder directory, depending on your OS:
- Windows:
%LOCALAPPDATA%\libsigrokdecode\decoders\toy\__init__.py
- Linux:
~/.local/share/libsigrokdecode/decoders/toy/__init__.py
Tested on PulseView 0.4.1, libsigrok 0.5.1.
A sample file containing a test signal has been included to try this decoder on.
Licensed under GPLv2+, not because I want to, but because the sigrok project requires it. If it were up to me, I'd probably use something more liberal like MIT or BSD, which I usually do.
You should refer to the following documentation to flesh it out:
Hi!! Thanks For sharing, I'm trying to install-it but it don't seams appear on PulseView Decoders. Can you help-me? I'm appreciate thanks