-static int event(struct sr_output *o, int event_type, uint8_t **data_out,
- uint64_t *length_out)
-{
- if (!o) {
- sr_err("%s: o was NULL", __func__);
- return SR_ERR_ARG;
- }
-
- if (!data_out) {
- sr_err("%s: data_out was NULL", __func__);
- return SR_ERR_ARG;
- }
-
- if (!length_out) {
- sr_err("%s: length_out was NULL", __func__);
- return SR_ERR_ARG;
- }
-
- switch (event_type) {
- case SR_DF_TRIGGER:
- /* TODO: Can a trigger mark be in a gnuplot data file? */
- break;
- case SR_DF_END:
- g_free(o->internal);
- o->internal = NULL;
- break;
- default:
- sr_err("%s: unsupported event type: %d", __func__, event_type);
- break;
- }
-
- *data_out = NULL;
- *length_out = 0;
-
- return SR_OK;
-}
-
-static int data(struct sr_output *o, const uint8_t *data_in,
- uint64_t length_in, uint8_t **data_out, uint64_t *length_out)
+static int receive(struct sr_output *o, const struct sr_dev_inst *sdi,
+ const struct sr_datafeed_packet *packet, GString **out)