extern const struct agdmm_recv agdmm_recvs_u124x[];
extern const struct agdmm_recv agdmm_recvs_u124xc[];
extern const struct agdmm_recv agdmm_recvs_u125x[];
+extern const struct agdmm_recv agdmm_recvs_u127x[];
extern const struct agdmm_recv agdmm_recvs_u128x[];
/* This works on all the Agilent U12xxA series, although the
{ AGILENT_U1252, "U1252B", 3, agdmm_jobs_live, NULL, agdmm_recvs_u125x },
{ AGILENT_U1253, "U1253B", 3, agdmm_jobs_live, NULL, agdmm_recvs_u125x },
+ { AGILENT_U1271, "U1271A", 3, agdmm_jobs_live, NULL, agdmm_recvs_u127x },
+ { AGILENT_U1272, "U1272A", 3, agdmm_jobs_live, NULL, agdmm_recvs_u127x },
+ { AGILENT_U1273, "U1273A", 3, agdmm_jobs_live, NULL, agdmm_recvs_u127x },
+
{ KEYSIGHT_U1281, "U1281A", 3, agdmm_jobs_live, agdmm_jobs_log, agdmm_recvs_u128x },
{ KEYSIGHT_U1282, "U1282A", 3, agdmm_jobs_live, agdmm_jobs_log, agdmm_recvs_u128x },
ALL_ZERO
devc->cur_mqflags[i] = 0;
devc->cur_exponent[i] = 0;
devc->cur_digits[i] = 3 - resolution;
+ } else if (!strcmp(mstr, "MA")) {
+ devc->cur_mq[i] = SR_MQ_CURRENT;
+ devc->cur_unit[i] = SR_UNIT_AMPERE;
+ devc->cur_mqflags[i] = 0;
+ devc->cur_exponent[i] = -3;
+ devc->cur_digits[i] = 8 - resolution;
} else if (!strcmp(mstr, "UA")) {
devc->cur_mq[i] = SR_MQ_CURRENT;
devc->cur_unit[i] = SR_UNIT_AMPERE;
devc->cur_mqflags[i] = SR_MQFLAG_DIODE | SR_MQFLAG_DC;
devc->cur_exponent[i] = 0;
devc->cur_digits[i] = 3;
+ } else if (!strcmp(mstr, "TEMP")) {
+ devc->cur_mq[i] = SR_MQ_TEMPERATURE;
+ devc->cur_unit[i] = SR_UNIT_CELSIUS;
+ devc->cur_mqflags[i] = 0;
+ devc->cur_exponent[i] = 0;
+ devc->cur_digits[i] = 1;
} else if (!strcmp(mstr, "CAP")) {
devc->cur_mq[i] = SR_MQ_CAPACITANCE;
devc->cur_unit[i] = SR_UNIT_FARAD;
devc->cur_mqflags[i] |= SR_MQFLAG_RMS;
} else if (!strcmp(mstr, "DC")) {
devc->cur_mqflags[i] |= SR_MQFLAG_DC;
+ } else if (!strcmp(mstr, "ACDC")) {
+ devc->cur_mqflags[i] |= SR_MQFLAG_AC | SR_MQFLAG_DC | SR_MQFLAG_RMS;
} else {
sr_dbg("Unknown first argument '%s'.", mstr);
}
} else
devc->cur_mqflags[i] &= ~(SR_MQFLAG_AC | SR_MQFLAG_DC);
- return JOB_CONF;
+ struct sr_channel *prev_conf = devc->cur_conf;
+ devc->cur_conf = sr_next_enabled_channel(sdi, devc->cur_conf);
+ if (devc->cur_conf->index >= MIN(devc->profile->nb_channels, 2))
+ devc->cur_conf = sr_next_enabled_channel(sdi, devc->cur_conf);
+ if (devc->cur_conf->index > prev_conf->index)
+ return JOB_AGAIN;
+ else
+ return JOB_CONF;
}
static int recv_conf_u124x_5x(const struct sr_dev_inst *sdi, GMatchInfo *match)
ALL_ZERO
};
+SR_PRIV const struct agdmm_recv agdmm_recvs_u127x[] = {
+ { "^\"(\\d\\d.{18}\\d)\"$", recv_stat_u123x },
+ { "^\\*([0-9])$", recv_switch },
+ { "^([-+][0-9]\\.[0-9]{8}E[-+][0-9]{2})$", recv_fetc },
+ { "^\"(V|MV|A|MA|UA|FREQ),(\\d),(AC|DC|ACDC)\"$", recv_conf_u123x },
+ { "^\"(RES|CAP),(\\d)\"$", recv_conf_u123x},
+ { "^\"(DIOD|TEMP)\"$", recv_conf_u123x },
+ ALL_ZERO
+};
+
SR_PRIV const struct agdmm_recv agdmm_recvs_u128x[] = {
{ "^\"(\\d\\d.{18}\\d)\"$", recv_stat_u128x },
{ "^\\*([0-9])$", recv_switch },