* and sensors.
*/
bool supported_device = false;
- if ((sr_config_list(drivers[i], SR_CONF_DEVICE_OPTIONS,
- &gvar_opts, NULL) == SR_OK)) {
+ if ((sr_config_list(drivers[i], NULL, NULL,
+ SR_CONF_DEVICE_OPTIONS, &gvar_opts) == SR_OK)) {
hwopts = (const int32_t *)g_variant_get_fixed_array(gvar_opts,
&num_opts, sizeof(int32_t));
for (unsigned int j = 0; j < num_opts; j++)
unset_connection();
- if ((sr_config_list(driver, SR_CONF_SCAN_OPTIONS,
- &gvar_list, NULL) == SR_OK)) {
+ if ((sr_config_list(driver, NULL, NULL,
+ SR_CONF_SCAN_OPTIONS, &gvar_list) == SR_OK)) {
hwopts = (const int32_t *)g_variant_get_fixed_array(gvar_list,
&num_opts, sizeof(int32_t));
GVariant *gvar_opts, *gvar_list;
gsize num_opts;
- if ((sr_config_list(sdi->driver, SR_CONF_DEVICE_OPTIONS,
- &gvar_opts, sdi) != SR_OK))
+ if ((sr_config_list(sdi->driver, sdi, NULL, SR_CONF_DEVICE_OPTIONS,
+ &gvar_opts) != SR_OK))
/* Driver supports no device instance options. */
return;
const int key = info->key;
- if(sr_config_list(_sdi->driver, key, &gvar_list, _sdi) != SR_OK)
+ if (sr_config_list(_sdi->driver, _sdi, NULL, key, &gvar_list) != SR_OK)
gvar_list = NULL;
const QString name(info->name);
const struct sr_dev_inst *sdi, int key)
{
GVariant *data = NULL;
- if (sr_config_get(sdi->driver, key, &data, sdi) != SR_OK) {
+ if (sr_config_get(sdi->driver, sdi, NULL, key, &data) != SR_OK) {
qDebug() <<
"WARNING: Failed to get value of config id" << key;
return NULL;
void DeviceOptions::config_setter(
const struct sr_dev_inst *sdi, int key, GVariant* value)
{
- if (sr_config_set(sdi, key, value) != SR_OK)
+ if (sr_config_set(sdi, NULL, key, value) != SR_OK)
qDebug() << "WARNING: Failed to set value of sample rate";
}
// Read out the sample rate
if(sdi->driver)
{
- const int ret = sr_config_get(sdi->driver,
- SR_CONF_SAMPLERATE, &gvar, sdi);
+ const int ret = sr_config_get(sdi->driver, sdi, NULL,
+ SR_CONF_SAMPLERATE, &gvar);
if (ret != SR_OK) {
qDebug("Failed to get samplerate\n");
return;
}
// Set the sample limit
- if (sr_config_set(sdi, SR_CONF_LIMIT_SAMPLES,
+ if (sr_config_set(sdi, NULL, SR_CONF_LIMIT_SAMPLES,
g_variant_new_uint64(record_length)) != SR_OK) {
error_handler(tr("Failed to configure "
"time-based sample limit."));
if (!sdi)
return;
- if (sr_config_list(sdi->driver, SR_CONF_SAMPLERATE,
- &gvar_dict, sdi) != SR_OK)
+ if (sr_config_list(sdi->driver, sdi, NULL,
+ SR_CONF_SAMPLERATE, &gvar_dict) != SR_OK)
return;
_sample_rate_list_action->setVisible(false);
assert(sdi);
- if (sr_config_get(sdi->driver, SR_CONF_SAMPLERATE,
- &gvar, sdi) != SR_OK) {
+ if (sr_config_get(sdi->driver, sdi, NULL,
+ SR_CONF_SAMPLERATE, &gvar) != SR_OK) {
qDebug() <<
"WARNING: Failed to get value of sample rate";
return;
return;
// Set the samplerate
- if (sr_config_set(sdi, SR_CONF_SAMPLERATE,
+ if (sr_config_set(sdi, NULL, SR_CONF_SAMPLERATE,
g_variant_new_uint64(sample_rate)) != SR_OK) {
qDebug() << "Failed to configure samplerate.";
return;
// Add the trigger actions
const sr_dev_inst *const sdi = _session.get_device();
- if (sr_config_list(sdi->driver, SR_CONF_TRIGGER_TYPE,
- &gvar, sdi) == SR_OK)
+ if (sr_config_list(sdi->driver, sdi, NULL, SR_CONF_TRIGGER_TYPE,
+ &gvar) == SR_OK)
{
const char *const trig_types =
g_variant_get_string(gvar, NULL);