+ if (analog.num_samples == 0) {
+ /* No data available, we have to acquire data first. */
+ g_snprintf(command, sizeof(command), "ARM;WAIT;*OPC;C%d:WAVEFORM?", ch->index + 1);
+ sr_scpi_send(sdi->conn, command);
+ return TRUE;
+ }
+
+ /*
+ * Send "frame begin" packet upon reception of data for the
+ * first enabled channel.
+ */
+ if (devc->current_channel == devc->enabled_channels) {
+ packet.type = SR_DF_FRAME_BEGIN;
+ sr_session_send(sdi, &packet);
+ }
+