This fixes parts of bug #259.
*
* @since 0.2.0
*/
-SR_API int sr_dev_probe_name_set(const struct sr_dev_inst *sdi,
+SR_API int sr_dev_channel_name_set(const struct sr_dev_inst *sdi,
int channelnum, const char *name)
{
GSList *l;
*
* @since 0.2.0
*/
-SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int channelnum,
+SR_API int sr_dev_channel_enable(const struct sr_dev_inst *sdi, int channelnum,
gboolean state)
{
GSList *l;
ch->enabled = state;
ret = SR_OK;
if (!state != !was_enabled && sdi->driver
- && sdi->driver->config_probe_set) {
- ret = sdi->driver->config_probe_set(
+ && sdi->driver->config_channel_set) {
+ ret = sdi->driver->config_channel_set(
sdi, ch, SR_CHANNEL_SET_ENABLED);
/* Roll back change if it wasn't applicable. */
if (ret == SR_ERR_ARG)
/* Set new trigger if it has changed. */
ch->trigger = g_strdup(trigger);
- if (sdi->driver && sdi->driver->config_probe_set) {
- ret = sdi->driver->config_probe_set(
+ if (sdi->driver && sdi->driver->config_channel_set) {
+ ret = sdi->driver->config_channel_set(
sdi, ch, SR_CHANNEL_SET_TRIGGER);
/* Roll back change if it wasn't applicable. */
if (ret == SR_ERR_ARG) {
*
* @since 0.2.0
*/
-SR_API int sr_filter_probes(unsigned int in_unitsize, unsigned int out_unitsize,
+SR_API int sr_filter_channels(unsigned int in_unitsize, unsigned int out_unitsize,
const GArray *probe_array, const uint8_t *data_in,
uint64_t length_in, uint8_t **data_out,
uint64_t *length_out)
return SR_OK;
}
-static int config_probe_set(const struct sr_dev_inst *sdi,
+static int config_channel_set(const struct sr_dev_inst *sdi,
struct sr_channel *ch, unsigned int changes)
{
uint64_t channel_bit;
.dev_clear = dev_clear,
.config_get = config_get,
.config_set = config_set,
- .config_probe_set = config_probe_set,
+ .config_channel_set = config_channel_set,
.config_commit = config_commit,
.config_list = config_list,
.dev_open = dev_open,
/*--- device.c --------------------------------------------------------------*/
-/** Values for the changes argument of sr_dev_driver.config_probe_set. */
+/** Values for the changes argument of sr_dev_driver.config_channel_set. */
enum {
/** The enabled state of the probe has been changed. */
SR_CHANNEL_SET_ENABLED = 1 << 0,
const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg);
/** Probe status change.
- * @see sr_dev_probe_enable(), sr_dev_trigger_set(). */
- int (*config_probe_set) (const struct sr_dev_inst *sdi,
+ * @see sr_dev_channel_enable(), sr_dev_trigger_set(). */
+ int (*config_channel_set) (const struct sr_dev_inst *sdi,
struct sr_channel *ch, unsigned int changes);
/** Apply configuration settings to the device hardware.
* @see sr_config_commit().*/
/*--- device.c --------------------------------------------------------------*/
-SR_API int sr_dev_probe_name_set(const struct sr_dev_inst *sdi,
+SR_API int sr_dev_channel_name_set(const struct sr_dev_inst *sdi,
int probenum, const char *name);
-SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int probenum,
+SR_API int sr_dev_channel_enable(const struct sr_dev_inst *sdi, int probenum,
gboolean state);
SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int probenum,
const char *trigger);
/*--- filter.c --------------------------------------------------------------*/
-SR_API int sr_filter_probes(unsigned int in_unitsize, unsigned int out_unitsize,
+SR_API int sr_filter_channels(unsigned int in_unitsize, unsigned int out_unitsize,
const GArray *probe_array, const uint8_t *data_in,
uint64_t length_in, uint8_t **data_out,
uint64_t *length_out);
enabled_channels++;
tmp_u64 = strtoul(keys[j]+5, NULL, 10);
/* sr_session_save() */
- sr_dev_probe_name_set(sdi, tmp_u64 - 1, val);
+ sr_dev_channel_name_set(sdi, tmp_u64 - 1, val);
} else if (!strncmp(keys[j], "trigger", 7)) {
channelnum = strtoul(keys[j]+7, NULL, 10);
sr_dev_trigger_set(sdi, channelnum, val);
/* Disable channels not specifically listed. */
if (total_channels)
for (p = enabled_channels; p < total_channels; p++)
- sr_dev_probe_enable(sdi, p, FALSE);
+ sr_dev_channel_enable(sdi, p, FALSE);
}
devcnt++;
}