]> sigrok.org Git - libsigrokdecode.git/commit
Various Python decoder infrastructure improvements.
authorUwe Hermann <redacted>
Fri, 23 Apr 2010 23:04:20 +0000 (01:04 +0200)
committerUwe Hermann <redacted>
Fri, 23 Apr 2010 23:04:20 +0000 (01:04 +0200)
commit5c55017c401002c18b1d43dad61200df17ab3321
tree95700d32f0666f0817d78fa6b7aae5e5d04f6d80
parent31b82285e5ca1fbd6a33eaaaa95bf83862b69eb1
Various Python decoder infrastructure improvements.

 - Introduce 'struct sigrokdecode_decoder'.

 - Decoders are now handled via two C functions:
   - sigrokdecode_load_decoder(): Fills a 'struct sigrokdecode_decoder'.
   - sigrokdecode_run_decoder(): Runs a decoder function.

 - There are now two decoder API functions a script needs to implement:
   - register(): Returns a Python dict with certain metadata.
   - decode(): Runs the actual decoder code.

 - libsigrokdecode: Add and use some more #defines for errors:
   - SIGROKDECODE_ERR_ARGS
   - SIGROKDECODE_ERR_PYTHON

 - Various other smaller Python decode script infrastructure issues.
decode.c
scripts/i2c.py
scripts/transitioncounter.py
sigrokdecode.h