summaryrefslogtreecommitdiff
path: root/sigrokdecode.h
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2011-01-15 01:44:41 +0100
committerUwe Hermann <uwe@hermann-uwe.de>2011-01-15 02:20:04 +0100
commit7c24d086f1c81fd23fd93e5702c6f46a36f3d3f6 (patch)
treea3ce527aa132c98e384622d978411dac7d9d30ab /sigrokdecode.h
parent9c93add5aeca95c568afab7fe249c0586d8dec6b (diff)
downloadlibsigrokdecode-7c24d086f1c81fd23fd93e5702c6f46a36f3d3f6.tar.gz
libsigrokdecode-7c24d086f1c81fd23fd93e5702c6f46a36f3d3f6.zip
CLI: Support for running protocol decoders.
Add a new -A | --list-protocol-decoders option to show the list of protocol decoders we could find. Add -a | --protocol-decoders to specify a list of decoders that shall be applied to the datastream. Currently only works for one decoder. Define DECODERS_DIR, which is the directory where the decoders will be installed upon 'make install', and where libsigrokdecode_init() will search for them. Thanks Olivier Fauchon <olivier@aixmarseille.com> for the initial patch, merged in slightly different form.
Diffstat (limited to 'sigrokdecode.h')
-rw-r--r--sigrokdecode.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sigrokdecode.h b/sigrokdecode.h
index 5112e09..ecd141a 100644
--- a/sigrokdecode.h
+++ b/sigrokdecode.h
@@ -47,6 +47,10 @@
#define SIGROKDECODE_ERR_MALLOC -2 /* Malloc/calloc/realloc error */
#define SIGROKDECODE_ERR_ARGS -3 /* Function argument error */
#define SIGROKDECODE_ERR_PYTHON -4 /* Python C API error */
+#define SIGROKDECODE_ERR_DECODERS_DIR -5 /* Protocol decoder path invalid */
+
+/* The list of loaded protocol decoders. */
+GSList *list_pds;
/* TODO: Documentation. */
struct sigrokdecode_decoder {