From: Bert Vermeulen Date: Sat, 8 Sep 2012 00:31:08 +0000 (+0200) Subject: sr: add recv/cleanup calls to output module API X-Git-Tag: dsupstream~706 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f45b75901436310684b5fbb567269bc44d08c2d4;p=libsigrok.git sr: add recv/cleanup calls to output module API The new output module callbacks will be init, recv and cleanup. The existing data and event callbacks still work, but will be phased out as existing modules get converted. The recv() callback gets a copy of every packet on the session bus, and thus has visibility of all metadata, allowing it to properly output any acquired data. --- diff --git a/libsigrok.h b/libsigrok.h index 53905b6f..bdc07230 100644 --- a/libsigrok.h +++ b/libsigrok.h @@ -252,6 +252,9 @@ struct sr_output_format { uint64_t *length_out); int (*event) (struct sr_output *o, int event_type, uint8_t **data_out, uint64_t *length_out); + GString *(*recv) (struct sr_output *o, const struct sr_dev_inst *sdi, + struct sr_datafeed_packet *packet); + int (*cleanup) (struct sr_output *o); }; struct sr_datastore {