summaryrefslogtreecommitdiff
path: root/sigrokdecode.h
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2012-01-17 03:37:34 +0100
committerBert Vermeulen <bert@biot.com>2012-01-17 03:37:34 +0100
commit0bdadba205a6d7688a2bb8d98ab342abe22acd6e (patch)
treed43f4b90827e99f3d6336952337744f55c351f1d /sigrokdecode.h
parent7b14cee1e2b43738a13108180dee73a08cbde87b (diff)
downloadlibsigrokdecode-0bdadba205a6d7688a2bb8d98ab342abe22acd6e.tar.gz
libsigrokdecode-0bdadba205a6d7688a2bb8d98ab342abe22acd6e.zip
SRD: support setting per-PD options
All decoder class options are automatically copied to a newly created instance with their default value, which can be overridden with the GHashTable passed to srd_instance_new(). Currently, only strings and integers are supported as option value types. The type is set by the default value in the decoder class, and enforced when overriding them. Integers can be specified in any format python allows: 10, 0x0a and so on.
Diffstat (limited to 'sigrokdecode.h')
-rw-r--r--sigrokdecode.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sigrokdecode.h b/sigrokdecode.h
index 1d8a79b..2649d86 100644
--- a/sigrokdecode.h
+++ b/sigrokdecode.h
@@ -163,12 +163,14 @@ typedef struct {
int srd_init(void);
int srd_exit(void);
int set_modulepath(void);
+int srd_instance_set_options(struct srd_decoder_instance *di,
+ GHashTable *options);
+int srd_instance_set_probes(struct srd_decoder_instance *di,
+ GHashTable *probes);
struct srd_decoder_instance *srd_instance_new(const char *id,
- const char *instance_id);
+ GHashTable *options);
int srd_instance_stack(struct srd_decoder_instance *di_from,
struct srd_decoder_instance *di_to);
-int srd_instance_set_probe(struct srd_decoder_instance *di,
- const char *probename, int num);
struct srd_decoder_instance *srd_instance_find(char *instance_id);
int srd_instance_start(struct srd_decoder_instance *di, PyObject *args);
int srd_instance_decode(uint64_t start_samplenum,