- packet.type = SR_DF_HEADER;
- packet.payload = &header;
- header.feed_version = 1;
- gettimeofday(&header.starttime, NULL);
- sr_session_send(cb_data, &packet);
-
- /* Send metadata about the SR_DF_LOGIC packets to come. */
- packet.type = SR_DF_META_LOGIC;
- packet.payload = &meta;
- meta.samplerate = ctx->cur_samplerate;
- meta.num_probes = ctx->sample_wide ? 16 : 8;
- sr_session_send(cb_data, &packet);
-
- if ((ret = command_start_acquisition (ctx->usb->devhdl,
- ctx->cur_samplerate, ctx->sample_wide)) != SR_OK) {
- abort_acquisition(ctx);
+ /* Send header packet to the session bus. */
+ std_session_send_df_header(cb_data, DRIVER_LOG_DOMAIN);
+
+ if ((ret = command_start_acquisition(devc->usb->devhdl,
+ devc->cur_samplerate, devc->sample_wide)) != SR_OK) {
+ abort_acquisition(devc);