(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
const char *sval;
gboolean bval;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
ret = SR_OK;
devc = sdi->priv;
if (!cg) {
uint64_t samplerate;
int ret;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
switch (key) {
case SR_CONF_SAMPLERATE:
devc->cur_samplerate = g_variant_get_uint64(data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->sw_limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->sw_limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->sw_limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
switch (key) {
case SR_CONF_VOLTAGE:
dblval = g_variant_get_double(data);
devc = sdi->priv;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
ret = SR_OK;
switch (key) {
case SR_CONF_SAMPLERATE:
if (!sdi)
return SR_ERR_ARG;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR;
-
devc = sdi->priv;
ret = SR_OK;
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
if (!sdi)
return SR_ERR_ARG;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR;
-
devc = sdi->priv;
ret = SR_OK;
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
if (!sdi)
return SR_ERR_ARG;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
unsigned int i;
const char *tmp_str;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
ret = SR_OK;
devc = sdi->priv;
if (!cg) {
unsigned int i;
const char *tmp_str;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
ret = SR_OK;
devc = sdi->priv;
if (!cg) {
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
if (cg) /* sr_config_set will validate cg using config_list */
ch = ((struct sr_channel *)cg->channels->data)->index;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
ret = SR_OK;
switch (key) {
case SR_CONF_LIMIT_FRAMES:
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
switch (key) {
case SR_CONF_LIMIT_SAMPLES:
limit_samples = g_variant_get_uint64(data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
switch (key) {
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
switch (key) {
devc = sdi->priv;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
switch (key) {
case SR_CONF_SAMPLERATE:
return lls_set_samplerate(sdi, g_variant_get_uint64(data));
devc = sdi->priv;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
switch (key) {
case SR_CONF_SAMPLERATE:
// FIXME
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
modbus = sdi->conn;
devc = sdi->priv;
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->limits, key, data);
int idx;
gboolean found;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
/* Cannot change settings while acquisition active, would cause a mess with commands.
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
devc = sdi->priv;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
/* If a channel group is specified, it must be a valid one. */
if (cg && !g_slist_find(sdi->channel_groups, cg)) {
sr_err("Invalid channel group specified.");
if (!sdi)
return SR_ERR_ARG;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
switch (key) {
case SR_CONF_OUTPUT_FREQUENCY:
value_f = g_variant_get_double(data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
devc = sdi->priv;
ret = SR_OK;
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
ret = SR_OK;
if (!sdi)
return SR_ERR_ARG;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
if (cg)
/* Channel group specified. */
select_channel(sdi, cg->channels->data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->sw_limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
return sr_sw_limits_config_set(&devc->sw_limits, key, data);
}
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
return sr_sw_limits_config_set(&devc->limits, key, data);
(void)cg;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
switch (key) {
ret = SR_ERR;
else if (!sdi->driver->config_set)
ret = SR_ERR_ARG;
- else if (check_key(sdi->driver, sdi, cg, key, SR_CONF_SET, data) != SR_OK)
+ else if (sdi->status != SR_ST_ACTIVE) {
+ sr_err("%s: Device instance not active, can't set config.",
+ sdi->driver->name);
+ ret = SR_ERR_DEV_CLOSED;
+ } else if (check_key(sdi->driver, sdi, cg, key, SR_CONF_SET, data) != SR_OK)
return SR_ERR_ARG;
else if ((ret = sr_variant_type_check(key, data)) == SR_OK) {
log_key(sdi, cg, key, SR_CONF_SET, data);