struct sr_probe *probe;
int ret, err, probenum, devcnt, i, j;
uint64_t tmp_u64, total_probes, enabled_probes, p;
struct sr_probe *probe;
int ret, err, probenum, devcnt, i, j;
uint64_t tmp_u64, total_probes, enabled_probes, p;
enabled_probes = 0;
keys = g_key_file_get_keys(kf, sections[i], NULL, NULL);
for (j = 0; keys[j]; j++) {
val = g_key_file_get_string(kf, sections[i], keys[j], NULL);
if (!strcmp(keys[j], "capturefile")) {
enabled_probes = 0;
keys = g_key_file_get_keys(kf, sections[i], NULL, NULL);
for (j = 0; keys[j]; j++) {
val = g_key_file_get_string(kf, sections[i], keys[j], NULL);
if (!strcmp(keys[j], "capturefile")) {
- device->plugin->init((char *)filename);
- sr_session_device_add(device);
- device->plugin->set_configuration(devcnt, SR_HWCAP_CAPTUREFILE, val);
+ dev->plugin->init((char *)filename);
+ sr_session_dev_add(dev);
+ dev->plugin->set_configuration(devcnt, SR_HWCAP_CAPTUREFILE, val);
g_ptr_array_add(capturefiles, val);
} else if (!strcmp(keys[j], "samplerate")) {
sr_parse_sizestring(val, &tmp_u64);
g_ptr_array_add(capturefiles, val);
} else if (!strcmp(keys[j], "samplerate")) {
sr_parse_sizestring(val, &tmp_u64);
} else if (!strcmp(keys[j], "unitsize")) {
tmp_u64 = strtoull(val, NULL, 10);
} else if (!strcmp(keys[j], "unitsize")) {
tmp_u64 = strtoull(val, NULL, 10);
} else if (!strcmp(keys[j], "total probes")) {
total_probes = strtoull(val, NULL, 10);
} else if (!strcmp(keys[j], "total probes")) {
total_probes = strtoull(val, NULL, 10);
for (p = 0; p < total_probes; p++) {
snprintf(probename, SR_MAX_PROBENAME_LEN, "%" PRIu64, p);
for (p = 0; p < total_probes; p++) {
snprintf(probename, SR_MAX_PROBENAME_LEN, "%" PRIu64, p);
} else if (!strncmp(keys[j], "trigger", 7)) {
probenum = strtoul(keys[j]+7, NULL, 10);
} else if (!strncmp(keys[j], "trigger", 7)) {
probenum = strtoul(keys[j]+7, NULL, 10);
if (ds) {
/* metadata */
fprintf(meta, "capturefile = logic-%d\n", devcnt);
fprintf(meta, "unitsize = %d\n", ds->ds_unitsize);
if (ds) {
/* metadata */
fprintf(meta, "capturefile = logic-%d\n", devcnt);
fprintf(meta, "unitsize = %d\n", ds->ds_unitsize);
- fprintf(meta, "total probes = %d\n", g_slist_length(device->probes));
- if (sr_dev_has_hwcap(device, SR_HWCAP_SAMPLERATE)) {
- samplerate = *((uint64_t *) device->plugin->get_device_info(
- device->plugin_index, SR_DI_CUR_SAMPLERATE));
+ fprintf(meta, "total probes = %d\n", g_slist_length(dev->probes));
+ if (sr_dev_has_hwcap(dev, SR_HWCAP_SAMPLERATE)) {
+ samplerate = *((uint64_t *) dev->plugin->get_dev_info(
+ dev->plugin_index, SR_DI_CUR_SAMPLERATE));
s = sr_samplerate_string(samplerate);
fprintf(meta, "samplerate = %s\n", s);
g_free(s);
}
probecnt = 1;
s = sr_samplerate_string(samplerate);
fprintf(meta, "samplerate = %s\n", s);
g_free(s);
}
probecnt = 1;