summaryrefslogtreecommitdiff
path: root/libsigrokdecode-internal.h
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2013-10-30 16:30:05 +0100
committerBert Vermeulen <bert@biot.com>2013-10-30 22:41:22 +0100
commited41649709abc02362df526cbd725775000e8199 (patch)
tree1b84a158d78f272153aac98f87a83914e9d390bb /libsigrokdecode-internal.h
parent69075817a626982179e5739bf0eee5e47b8a5f9e (diff)
downloadlibsigrokdecode-ed41649709abc02362df526cbd725775000e8199.tar.gz
libsigrokdecode-ed41649709abc02362df526cbd725775000e8199.zip
Pass metadata to PDs only at runtime, not at decoder start
The SRD_CONF_NUM_PROBES metadata key was removed. It wasn't actually used for anything, since this is trivially available via the configured (or default) probe list. The SRD_CONF_UNITSIZE key was removed. The unit size is instead derived from the probe list: the number of probes packed into the least amount of space possible defines the unit size. PD changes: * The start() method no longer takes a 'metadata' parameter. * Metadata now comes in only via the metadata() method, which takes a key and value. The only key defined so far is SRD_CONF_SAMPLERATE, which is exported into the module namespace. API changes: * srd_session_send() now takes an end_samplenum parameter, and had its options rearranged. * srd_session_config_set() is now srd_session_metadata_set(). This keeps "config" options for a future feature to allow PDs or frontends to configure each other's options on the fly, up and down the stack.
Diffstat (limited to 'libsigrokdecode-internal.h')
-rw-r--r--libsigrokdecode-internal.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/libsigrokdecode-internal.h b/libsigrokdecode-internal.h
index 2951fa3..db25677 100644
--- a/libsigrokdecode-internal.h
+++ b/libsigrokdecode-internal.h
@@ -26,9 +26,6 @@
struct srd_session {
int session_id;
- uint64_t num_probes;
- uint64_t unitsize;
- uint64_t samplerate;
/* List of decoder instances. */
GSList *di_list;
@@ -42,10 +39,10 @@ struct srd_session {
SRD_PRIV int srd_decoder_searchpath_add(const char *path);
SRD_PRIV struct srd_decoder_inst *srd_inst_find_by_obj( const GSList *stack,
const PyObject *obj);
-SRD_PRIV int srd_inst_start(struct srd_decoder_inst *di, PyObject *args);
-SRD_PRIV int srd_inst_decode(uint64_t start_samplenum,
- const struct srd_decoder_inst *dec,
- const uint8_t *inbuf, uint64_t inbuflen);
+SRD_PRIV int srd_inst_start(struct srd_decoder_inst *di);
+SRD_PRIV int srd_inst_decode(const struct srd_decoder_inst *di,
+ uint64_t start_samplenum, uint64_t end_samplenum,
+ const uint8_t *inbuf, uint64_t inbuflen);
SRD_PRIV void srd_inst_free(struct srd_decoder_inst *di);
SRD_PRIV void srd_inst_free_all(struct srd_session *sess, GSList *stack);
SRD_PRIV struct srd_pd_callback *srd_pd_output_callback_find(struct srd_session *sess,