+char *scope_get_data(struct scope *sc, char *source, int *len)
+{
+ char *data = NULL;
+ char cmd[128];
+
+ if ((data = malloc(DATASIZE)) == NULL) {
+ perror("malloc");
+ return NULL;
+ }
+
+ snprintf(cmd, sizeof(cmd), ":WAV:DATA? %s", source);
+ *len = sendscpi(sc, cmd, (unsigned char*)data, DATASIZE);
+
+ return data;
+}
+