static void datafeed_in(const struct sr_dev_inst *sdi,
const struct sr_datafeed_packet *packet)
{
+ const struct sr_datafeed_meta *meta;
const struct sr_datafeed_logic *logic;
const struct sr_datafeed_analog *analog;
+ struct sr_config *src;
static struct sr_output *o = NULL;
static GArray *logic_probelist = NULL;
static uint64_t received_samples = 0;
uint64_t *samplerate, output_len, filter_out_len;
uint8_t *output_buf, *filter_out;
GString *out;
+ GSList *l;
/* If the first packet to come in isn't a header, don't even try. */
if (packet->type != SR_DF_HEADER && o == NULL)
o = NULL;
break;
+ case SR_DF_META:
+ g_debug("cli: received SR_DF_META");
+ meta = packet->payload;
+ for (l = meta->config; l; l = l->next) {
+ src = l->data;
+ switch (src->key) {
+ case SR_HWCAP_SAMPLERATE:
+ samplerate = (uint64_t *)src->value;
+ g_debug("cli: got samplerate %"PRIu64, *samplerate);
+ break;
+ default:
+ /* Unknown metadata is not an error. */
+ break;
+ }
+ }
+ break;
+
case SR_DF_TRIGGER:
g_debug("cli: received SR_DF_TRIGGER");
if (o->format->event)