- case SR_CONF_OVER_VOLTAGE_PROTECTION_ENABLED:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ENABLED,
- ch->name) == SR_OK) {
- if (sr_scpi_get_string(scpi, NULL, &s) == SR_OK) {
- *data = g_variant_new_boolean(!strcmp(s, "ON"));
- ret = SR_OK;
- }
- }
- break;
- case SR_CONF_OVER_VOLTAGE_PROTECTION_ACTIVE:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_ACTIVE,
- ch->name) == SR_OK) {
- if (sr_scpi_get_string(scpi, NULL, &s) == SR_OK) {
- *data = g_variant_new_boolean(!strcmp(s, "YES"));
- ret = SR_OK;
- }
- }
- break;
- case SR_CONF_OVER_VOLTAGE_PROTECTION_THRESHOLD:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_OVER_VOLTAGE_PROTECTION_THRESHOLD,
- ch->name) == SR_OK) {
- if (sr_scpi_get_double(scpi, NULL, &d) == SR_OK) {
- *data = g_variant_new_double(d);
- ret = SR_OK;
- }
- }
- break;
- case SR_CONF_OVER_CURRENT_PROTECTION_ENABLED:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ENABLED,
- ch->name) == SR_OK) {
- if (sr_scpi_get_string(scpi, NULL, &s) == SR_OK) {
- *data = g_variant_new_boolean(!strcmp(s, "ON"));
- ret = SR_OK;
- }
- }
- break;
- case SR_CONF_OVER_CURRENT_PROTECTION_ACTIVE:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_OVER_CURRENT_PROTECTION_ACTIVE,
- ch->name) == SR_OK) {
- if (sr_scpi_get_string(scpi, NULL, &s) == SR_OK) {
- *data = g_variant_new_boolean(!strcmp(s, "YES"));
- ret = SR_OK;
- }
- }
- break;
- case SR_CONF_OVER_CURRENT_PROTECTION_THRESHOLD:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_OVER_CURRENT_PROTECTION_THRESHOLD,
- ch->name) == SR_OK) {
- if (sr_scpi_get_double(scpi, NULL, &d) == SR_OK) {
- *data = g_variant_new_double(d);
- ret = SR_OK;
- }
- }
- break;
- case SR_CONF_OUTPUT_VOLTAGE:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_MEAS_VOLTAGE, ch->name) == SR_OK) {
- if (sr_scpi_get_double(scpi, NULL, &d) == SR_OK) {
- *data = g_variant_new_double(d);
- ret = SR_OK;
- }
- }
- break;
- case SR_CONF_OUTPUT_VOLTAGE_MAX:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_VOLTAGE_MAX, ch->name) == SR_OK) {
- if (sr_scpi_get_double(scpi, NULL, &d) == SR_OK) {
- *data = g_variant_new_double(d);
- ret = SR_OK;
- }
- }
- break;
- case SR_CONF_OUTPUT_CURRENT:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_MEAS_CURRENT, ch->name) == SR_OK) {
- if (sr_scpi_get_double(scpi, NULL, &d) == SR_OK) {
- *data = g_variant_new_double(d);
- ret = SR_OK;
- }
- }
- break;
- case SR_CONF_OUTPUT_CURRENT_MAX:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_CURRENT_MAX, ch->name) == SR_OK) {
- if (sr_scpi_get_double(scpi, NULL, &d) == SR_OK) {
- *data = g_variant_new_double(d);
- ret = SR_OK;
- }
- }
- break;
- case SR_CONF_OUTPUT_ENABLED:
- ret = SR_ERR;
- if (scpi_cmd(sdi, SCPI_CMD_GET_OUTPUT_ENABLED, ch->name) == SR_OK) {
- if (sr_scpi_get_string(scpi, NULL, &s) == SR_OK) {
- *data = g_variant_new_boolean(!strcmp(s, "ON"));
- ret = SR_OK;
- }
- }
- break;