]> sigrok.org Git - libsigrok.git/commitdiff
Replace 'probe group' with 'channel group' everywhere.
authorUwe Hermann <redacted>
Fri, 14 Mar 2014 20:09:37 +0000 (21:09 +0100)
committerUwe Hermann <redacted>
Tue, 25 Mar 2014 19:58:54 +0000 (20:58 +0100)
The name 'probe' (and thus 'probe group') is a relic from the times when
sigrok was mostly about logic analyzers. Nowadays we support a lot more
device types where 'probe' is not really a good term and 'channel' is
much better suited.

This fixes parts of bug #259.

49 files changed:
bindings/python/sigrok/core/classes.py
bindings/swig/libsigrok.i
device.c
error.c
hardware/agilent-dmm/api.c
hardware/alsa/api.c
hardware/appa-55ii/api.c
hardware/asix-sigma/asix-sigma.c
hardware/atten-pps3xxx/api.c
hardware/brymen-bm86x/api.c
hardware/brymen-dmm/api.c
hardware/cem-dt-885x/api.c
hardware/center-3xx/api.c
hardware/chronovu-la8/api.c
hardware/colead-slm/api.c
hardware/conrad-digi-35-cpu/api.c
hardware/demo/demo.c
hardware/fluke-dmm/api.c
hardware/fx2lafw/api.c
hardware/gmc-mh-1x-2x/api.c
hardware/gmc-mh-1x-2x/protocol.c
hardware/gmc-mh-1x-2x/protocol.h
hardware/hameg-hmo/api.c
hardware/hameg-hmo/protocol.c
hardware/hameg-hmo/protocol.h
hardware/hantek-dso/api.c
hardware/ikalogic-scanalogic2/api.c
hardware/ikalogic-scanaplus/api.c
hardware/kecheng-kc-330b/api.c
hardware/lascar-el-usb/api.c
hardware/link-mso19/api.c
hardware/mic-985xx/api.c
hardware/norma-dmm/api.c
hardware/openbench-logic-sniffer/api.c
hardware/rigol-ds/api.c
hardware/rigol-ds/protocol.h
hardware/saleae-logic16/api.c
hardware/serial-dmm/api.c
hardware/sysclk-lwla/api.c
hardware/teleinfo/api.c
hardware/tondaj-sl-814/api.c
hardware/uni-t-dmm/api.c
hardware/uni-t-ut32x/api.c
hardware/victor-dmm/api.c
hardware/zeroplus-logic-cube/api.c
hwdriver.c
libsigrok.h
proto.h
session_driver.c

index b5a64cfc2e13bf78f6e20b67a6b7037a4b7ff5d8..2dcd1d95a71812eaebe0c92c50a3f9f5b3de1d92 100644 (file)
@@ -26,7 +26,7 @@ import itertools
 
 __all__ = ['Error', 'Context', 'Driver', 'Device', 'Session', 'Packet', 'Log',
     'LogLevel', 'PacketType', 'Quantity', 'Unit', 'QuantityFlag', 'ConfigKey',
-    'ProbeType', 'Probe', 'ProbeGroup', 'InputFormat', 'OutputFormat',
+    'ProbeType', 'Probe', 'ChannelGroup', 'InputFormat', 'OutputFormat',
     'InputFile', 'Output']
 
 class Error(Exception):
@@ -174,7 +174,7 @@ class Device(object):
             device.struct = struct
             device.context = context
             device._probes = None
-            device._probe_groups = None
+            device._channel_groups = None
             context._devices[address] = device
         return context._devices[address]
 
@@ -202,17 +202,17 @@ class Device(object):
         return self._probes
 
     @property
-    def probe_groups(self):
-        if self._probe_groups is None:
-            self._probe_groups = {}
-            probe_group_list = self.struct.probe_groups
-            while (probe_group_list):
-                probe_group_ptr = void_ptr_to_sr_probe_group_ptr(
-                    probe_group_list.data)
-                self._probe_groups[probe_group_ptr.name] = ProbeGroup(self,
-                    probe_group_ptr)
-                probe_group_list = probe_group_list.next
-        return self._probe_groups
+    def channel_groups(self):
+        if self._channel_groups is None:
+            self._channel_groups = {}
+            channel_group_list = self.struct.channel_groups
+            while (channel_group_list):
+                channel_group_ptr = void_ptr_to_sr_channel_group_ptr(
+                    channel_group_list.data)
+                self._channel_groups[channel_group_ptr.name] = ChannelGroup(self,
+                    channel_group_ptr)
+                channel_group_list = channel_group_list.next
+        return self._channel_groups
 
 class HardwareDevice(Device):
 
@@ -262,15 +262,15 @@ class Probe(object):
     def name(self):
         return self.struct.name
 
-class ProbeGroup(object):
+class ChannelGroup(object):
 
     def __init__(self, device, struct):
         self.device = device
         self.struct = struct
-        self._probes = None
+        self._channels = None
 
     def __iter__(self):
-        return iter(self.probes)
+        return iter(self.channels)
 
     def __getattr__(self, name):
         key = config_key(name)
@@ -281,7 +281,7 @@ class ProbeGroup(object):
         except Error as error:
             if error.errno == SR_ERR_NA:
                 raise NotImplementedError(
-                    "Probe group does not implement %s" % name)
+                    "Channel group does not implement %s" % name)
             else:
                 raise AttributeError
         value = gvariant_ptr_ptr_value(data)
@@ -291,7 +291,7 @@ class ProbeGroup(object):
         try:
             key = config_key(name)
         except AttributeError:
-            super(ProbeGroup, self).__setattr__(name, value)
+            super(ChannelGroup, self).__setattr__(name, value)
             return
         check(sr_config_set(self.device.struct, self.struct,
             key.id, python_to_gvariant(value)))
@@ -301,15 +301,15 @@ class ProbeGroup(object):
         return self.struct.name
 
     @property
-    def probes(self):
-        if self._probes is None:
-            self._probes = []
-            probe_list = self.struct.probes
-            while (probe_list):
-                probe_ptr = void_ptr_to_sr_probe_ptr(probe_list.data)
-                self._probes.append(Probe(self, probe_ptr))
-                probe_list = probe_list.next
-        return self._probes
+    def channels(self):
+        if self._channels is None:
+            self._channels = []
+            channel_list = self.struct.channels
+            while (channel_list):
+                channel_ptr = void_ptr_to_sr_probe_ptr(channel_list.data)
+                self._channels.append(Probe(self, probe_ptr))
+                channel_list = channel_list.next
+        return self._channels
 
 class Session(object):
 
index d670efc8f83c139cb3fac27e999ef2123ef781c4..5b59148948cb817ac1a2d3047173f1132a50db89 100644 (file)
@@ -99,7 +99,7 @@ gchar *g_string_free(GString *string, gboolean free_segment);
 %pointer_cast(void *, struct sr_datafeed_logic *, void_ptr_to_sr_datafeed_logic_ptr)
 %pointer_cast(void *, struct sr_datafeed_analog *, void_ptr_to_sr_datafeed_analog_ptr)
 %pointer_cast(void *, struct sr_probe *, void_ptr_to_sr_probe_ptr)
-%pointer_cast(void *, struct sr_probe_group *, void_ptr_to_sr_probe_group_ptr)
+%pointer_cast(void *, struct sr_channel_group *, void_ptr_to_sr_channel_group_ptr)
 
 %extend sr_input_format {
         int call_format_match(const char *filename) {
index 212ddb7dc91c1f6289f4f09cc2753dd520fb8efa..c01bc92f09d0fd8f772c6ff6ee52016632ff1218 100644 (file)
--- a/device.c
+++ b/device.c
@@ -285,7 +285,7 @@ SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
        sdi->model = model ? g_strdup(model) : NULL;
        sdi->version = version ? g_strdup(version) : NULL;
        sdi->probes = NULL;
-       sdi->probe_groups = NULL;
+       sdi->channel_groups = NULL;
        sdi->conn = NULL;
        sdi->priv = NULL;
 
@@ -309,8 +309,8 @@ SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi)
        }
        g_slist_free(sdi->probes);
 
-       if (sdi->probe_groups)
-               g_slist_free(sdi->probe_groups);
+       if (sdi->channel_groups)
+               g_slist_free(sdi->channel_groups);
 
        g_free(sdi->vendor);
        g_free(sdi->model);
diff --git a/error.c b/error.c
index a04a983fc8908313af6c13a9becd2b36745bf0de..f87797528088d4e946a5ae884352064843ce7a84 100644 (file)
--- a/error.c
+++ b/error.c
@@ -76,8 +76,8 @@ SR_API const char *sr_strerror(int error_code)
                return "device closed but should be open";
        case SR_ERR_TIMEOUT:
                return "timeout occurred";
-       case SR_ERR_PROBE_GROUP:
-               return "no probe group specified";
+       case SR_ERR_CHANNEL_GROUP:
+               return "no channel group specified";
        default:
                return "unknown error";
        }
@@ -127,8 +127,8 @@ SR_API const char *sr_strerror_name(int error_code)
                return "SR_ERR_DEV_CLOSED";
        case SR_ERR_TIMEOUT:
                return "SR_ERR_TIMEOUT";
-       case SR_ERR_PROBE_GROUP:
-               return "SR_PROBE_GROUP";
+       case SR_ERR_CHANNEL_GROUP:
+               return "SR_ERR_CHANNEL_GROUP";
        default:
                return "unknown error code";
        }
index 0c743b329ef8d58eea5af0d4a738b8e90acb52df..2c2a88bff6c62adee1e512c8138b534e3dbeddbe 100644 (file)
@@ -170,11 +170,11 @@ static int cleanup(void)
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -208,10 +208,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 0f54eb48cc228384f6257eeb73ef6a145d59478e..5538e4f05089f0861d0f664f0883c5470d0a0200 100644 (file)
@@ -129,11 +129,11 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (id) {
        case SR_CONF_SAMPLERATE:
@@ -148,11 +148,11 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -174,14 +174,14 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        GVariant *gvar;
        GVariantBuilder gvb;
        int i;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
index 73c71af30517185afce75935af5d20cd6694a1f0..af22cb5c0e490bab3e9a49c62d8916825780b67e 100644 (file)
@@ -138,11 +138,11 @@ static int cleanup(void)
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc = sdi->priv;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_LIMIT_SAMPLES:
@@ -162,13 +162,13 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        const char *tmp_str;
        unsigned int i;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -206,10 +206,10 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index a7a1d46a1d66da61df5a032f68bae31a1585fb39..3909638fbdc65e76e9f4a850da06909d149008b6 100644 (file)
@@ -745,11 +745,11 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (id) {
        case SR_CONF_SAMPLERATE:
@@ -767,12 +767,12 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        int ret;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -801,13 +801,13 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        GVariant *gvar;
        GVariantBuilder gvb;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
index c7e976011a0c1f878e8da708407bd40cfc481ae7..ec344f3b6b205229459ede365e7b2b68713e7c2e 100644 (file)
@@ -88,7 +88,7 @@ static GSList *scan(GSList *options, int modelid)
        struct dev_context *devc;
        struct sr_config *src;
        struct sr_probe *probe;
-       struct sr_probe_group *pg;
+       struct sr_channel_group *pg;
        struct sr_serial_dev_inst *serial;
        GSList *l, *devices;
        struct pps_model *model;
@@ -169,11 +169,11 @@ static GSList *scan(GSList *options, int modelid)
                snprintf(channel, 10, "CH%d", i + 1);
                probe = sr_probe_new(i, SR_PROBE_ANALOG, TRUE, channel);
                sdi->probes = g_slist_append(sdi->probes, probe);
-               pg = g_malloc(sizeof(struct sr_probe_group));
+               pg = g_malloc(sizeof(struct sr_channel_group));
                pg->name = g_strdup(channel);
                pg->probes = g_slist_append(NULL, probe);
                pg->priv = NULL;
-               sdi->probe_groups = g_slist_append(sdi->probe_groups, pg);
+               sdi->channel_groups = g_slist_append(sdi->channel_groups, pg);
        }
 
        devc = g_malloc0(sizeof(struct dev_context));
@@ -206,7 +206,7 @@ static int cleanup(void)
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        struct sr_probe *probe;
@@ -218,8 +218,8 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
        devc = sdi->priv;
 
        ret = SR_OK;
-       if (!probe_group) {
-               /* No probe group: global options. */
+       if (!channel_group) {
+               /* No channel group: global options. */
                switch (key) {
                case SR_CONF_OUTPUT_CHANNEL:
                        *data = g_variant_new_string(channel_modes[devc->channel_mode]);
@@ -231,8 +231,8 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
                        return SR_ERR_NA;
                }
        } else {
-               /* We only ever have one channel per probe group in this driver. */
-               probe = probe_group->probes->data;
+               /* We only ever have one channel per channel group in this driver. */
+               probe = channel_group->probes->data;
                channel = probe->index;
 
                switch (key) {
@@ -275,7 +275,7 @@ static int find_str(const char *str, const char **strings, int array_size)
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        struct sr_probe *probe;
@@ -289,8 +289,8 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 
        ret = SR_OK;
        devc = sdi->priv;
-       if (!probe_group) {
-               /* No probe group: global options. */
+       if (!channel_group) {
+               /* No channel group: global options. */
                switch (key) {
                case SR_CONF_OUTPUT_CHANNEL:
                        sval = g_variant_get_string(data, NULL);
@@ -321,9 +321,9 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
                        return SR_ERR_NA;
                }
        } else {
-               /* Probe group specified: per-channel options. */
-               /* We only ever have one channel per probe group in this driver. */
-               probe = probe_group->probes->data;
+               /* Channel group specified: per-channel options. */
+               /* We only ever have one channel per channel group in this driver. */
+               probe = channel_group->probes->data;
                channel = probe->index;
 
                switch (key) {
@@ -359,7 +359,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        struct sr_probe *probe;
@@ -379,8 +379,8 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
        devc = sdi->priv;
 
        ret = SR_OK;
-       if (!probe_group) {
-               /* No probe group: global options. */
+       if (!channel_group) {
+               /* No channel group: global options. */
                switch (key) {
                case SR_CONF_DEVICE_OPTIONS:
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
@@ -399,11 +399,11 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
                        return SR_ERR_NA;
                }
        } else {
-               /* Probe group specified: per-channel options. */
+               /* Channel group specified: per-channel options. */
                if (!sdi)
                        return SR_ERR_ARG;
-               /* We only ever have one channel per probe group in this driver. */
-               probe = probe_group->probes->data;
+               /* We only ever have one channel per channel group in this driver. */
+               probe = channel_group->probes->data;
                channel = probe->index;
 
                switch (key) {
index 802d443abe8cc6f316e34cba8328e3202c75a85e..2a5d5feb50f8299957f936532f37b207fb7b75d4 100644 (file)
@@ -183,11 +183,11 @@ static int cleanup(void)
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc = sdi->priv;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_LIMIT_SAMPLES:
@@ -204,11 +204,11 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -235,10 +235,10 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index cd11cc5e25049353ec7ba724aaf29a8b8c572944..0b5a272db35943fc1d837f64b5e6e8ae906b3668 100644 (file)
@@ -150,12 +150,12 @@ static int cleanup(void)
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        int ret;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -181,10 +181,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 1e036355b01f5bfe448c52d14bf63c2f8d450cbd..3dbb9a3930274ac41976d50a4e165ed4f299c924 100644 (file)
@@ -166,14 +166,14 @@ static int cleanup(void)
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        GVariant *range[2];
        uint64_t low, high;
        int tmp, ret;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (!sdi)
                return SR_ERR_ARG;
@@ -238,7 +238,7 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        uint64_t tmp_u64, low, high;
@@ -246,7 +246,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
        int tmp, ret;
        const char *tmp_str;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -328,7 +328,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        GVariant *tuple, *range[2];
        GVariantBuilder gvb;
@@ -336,7 +336,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
        int ret;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        ret = SR_OK;
        switch (key) {
index b85273e51d2942ebde8aa034112a46d4fae77ed4..c7539da8525ad2a559d55bcf7ffd3026220b618f 100644 (file)
@@ -161,11 +161,11 @@ static int cleanup(int idx)
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -191,10 +191,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 0fc90353016c1ad54db726acd0d461bd40eaaf78..c14d63ad07c3bc0484650f8b9a21c3a87cd652f6 100644 (file)
@@ -263,11 +263,11 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (id) {
        case SR_CONF_SAMPLERATE:
@@ -287,11 +287,11 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -333,13 +333,13 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        GVariant *gvar, *grange[2];
        GVariantBuilder gvb;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
index b24198ccac4bc7f4b94d6f2a56c4771a6b3a25fe..c3046d4bf26fbbb0aa2d49f481b182736ae14325 100644 (file)
@@ -130,11 +130,11 @@ static int cleanup(void)
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -168,10 +168,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index bab100dc441b08ecb724315ddc7ac3883258e5d4..29a0f375c8a9f7d2609f2d2cd5e085a73dabd5dc 100644 (file)
@@ -122,12 +122,12 @@ static int cleanup(void)
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        int ret;
        double dblval;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -165,12 +165,12 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        int ret;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        ret = SR_OK;
        switch (key) {
index 329fd170e79cf62868c6fc97fc82f65cf1fa45f2..39c423021dc905708569a5d5f1952bcd8b079ece 100644 (file)
@@ -118,12 +118,12 @@ struct dev_context {
        /* Logic */
        int32_t num_logic_probes;
        unsigned int logic_unitsize;
-       /* There is only ever one logic probe group, so its pattern goes here. */
+       /* There is only ever one logic channel group, so its pattern goes here. */
        uint8_t logic_pattern;
        unsigned char logic_data[LOGIC_BUFSIZE];
        /* Analog */
        int32_t num_analog_probes;
-       GSList *analog_probe_groups;
+       GSList *analog_channel_groups;
 };
 
 static const int32_t scanopts[] = {
@@ -171,7 +171,7 @@ static int init(struct sr_context *sr_ctx)
        return std_init(sr_ctx, di, LOG_PREFIX);
 }
 
-static void generate_analog_pattern(const struct sr_probe_group *probe_group, uint64_t sample_rate)
+static void generate_analog_pattern(const struct sr_channel_group *channel_group, uint64_t sample_rate)
 {
        struct analog_gen *ag;
        double t, frequency;
@@ -179,12 +179,12 @@ static void generate_analog_pattern(const struct sr_probe_group *probe_group, ui
        unsigned int num_samples, i;
        int last_end;
 
-       ag = probe_group->priv;
+       ag = channel_group->priv;
        num_samples = ANALOG_BUFSIZE / sizeof(float);
 
-       sr_dbg("Generating %s pattern for probe group %s",
+       sr_dbg("Generating %s pattern for channel group %s",
               analog_pattern_str[ag->pattern],
-              probe_group->name);
+              channel_group->name);
 
        switch (ag->pattern) {
        case PATTERN_SQUARE:
@@ -257,7 +257,7 @@ static GSList *scan(GSList *options)
        struct dev_context *devc;
        struct sr_dev_inst *sdi;
        struct sr_probe *probe;
-       struct sr_probe_group *pg;
+       struct sr_channel_group *pg;
        struct sr_config *src;
        struct analog_gen *ag;
        GSList *devices, *l;
@@ -300,10 +300,10 @@ static GSList *scan(GSList *options)
        devc->logic_unitsize = (devc->num_logic_probes + 7) / 8;
        devc->logic_pattern = PATTERN_SIGROK;
        devc->num_analog_probes = num_analog_probes;
-       devc->analog_probe_groups = NULL;
+       devc->analog_channel_groups = NULL;
 
-       /* Logic probes, all in one probe group. */
-       if (!(pg = g_try_malloc(sizeof(struct sr_probe_group))))
+       /* Logic probes, all in one channel group. */
+       if (!(pg = g_try_malloc(sizeof(struct sr_channel_group))))
                return NULL;
        pg->name = g_strdup("Logic");
        pg->probes = NULL;
@@ -315,9 +315,9 @@ static GSList *scan(GSList *options)
                sdi->probes = g_slist_append(sdi->probes, probe);
                pg->probes = g_slist_append(pg->probes, probe);
        }
-       sdi->probe_groups = g_slist_append(NULL, pg);
+       sdi->channel_groups = g_slist_append(NULL, pg);
 
-       /* Analog probes, probe groups and pattern generators. */
+       /* Analog probes, channel groups and pattern generators. */
 
        pattern = 0;
        for (i = 0; i < num_analog_probes; i++) {
@@ -327,13 +327,13 @@ static GSList *scan(GSList *options)
                        return NULL;
                sdi->probes = g_slist_append(sdi->probes, probe);
 
-               /* Every analog probe gets its own probe group. */
-               if (!(pg = g_try_malloc(sizeof(struct sr_probe_group))))
+               /* Every analog probe gets its own channel group. */
+               if (!(pg = g_try_malloc(sizeof(struct sr_channel_group))))
                        return NULL;
                pg->name = g_strdup(probe_name);
                pg->probes = g_slist_append(NULL, probe);
 
-               /* Every probe group gets a generator struct. */
+               /* Every channel group gets a generator struct. */
                if (!(ag = g_try_malloc(sizeof(struct analog_gen))))
                        return NULL;
                ag->packet.probes = pg->probes;
@@ -344,8 +344,8 @@ static GSList *scan(GSList *options)
                ag->pattern = pattern;
                pg->priv = ag;
 
-               sdi->probe_groups = g_slist_append(sdi->probe_groups, pg);
-               devc->analog_probe_groups = g_slist_append(devc->analog_probe_groups, pg);
+               sdi->channel_groups = g_slist_append(sdi->channel_groups, pg);
+               devc->analog_channel_groups = g_slist_append(devc->analog_channel_groups, pg);
 
                if (++pattern == ARRAY_SIZE(analog_pattern_str))
                        pattern = 0;
@@ -383,7 +383,7 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        struct sr_probe *probe;
@@ -405,14 +405,14 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
                *data = g_variant_new_uint64(devc->limit_msec);
                break;
        case SR_CONF_PATTERN_MODE:
-               if (!probe_group)
-                       return SR_ERR_PROBE_GROUP;
-               probe = probe_group->probes->data;
+               if (!channel_group)
+                       return SR_ERR_CHANNEL_GROUP;
+               probe = channel_group->probes->data;
                if (probe->type == SR_PROBE_LOGIC) {
                        pattern = devc->logic_pattern;
                        *data = g_variant_new_string(logic_pattern_str[pattern]);
                } else if (probe->type == SR_PROBE_ANALOG) {
-                       ag = probe_group->priv;
+                       ag = channel_group->priv;
                        pattern = ag->pattern;
                        *data = g_variant_new_string(analog_pattern_str[pattern]);
                } else
@@ -432,7 +432,7 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        struct analog_gen *ag;
@@ -463,10 +463,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
                sr_dbg("Setting time limit to %" PRIu64"ms", devc->limit_msec);
                break;
        case SR_CONF_PATTERN_MODE:
-               if (!probe_group)
-                       return SR_ERR_PROBE_GROUP;
+               if (!channel_group)
+                       return SR_ERR_CHANNEL_GROUP;
                stropt = g_variant_get_string(data, NULL);
-               probe = probe_group->probes->data;
+               probe = channel_group->probes->data;
                pattern = -1;
                if (probe->type == SR_PROBE_LOGIC) {
                        for (i = 0; i < ARRAY_SIZE(logic_pattern_str); i++) {
@@ -495,10 +495,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
                        }
                        if (pattern == -1)
                                return SR_ERR_ARG;
-                       sr_dbg("Setting analog pattern for probe group %s to %s",
-                                       probe_group->name,
+                       sr_dbg("Setting analog pattern for channel group %s to %s",
+                                       channel_group->name,
                                        analog_pattern_str[pattern]);
-                       ag = probe_group->priv;
+                       ag = channel_group->priv;
                        ag->pattern = pattern;
                } else
                        return SR_ERR_BUG;
@@ -511,7 +511,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct sr_probe *probe;
        GVariant *gvar;
@@ -528,7 +528,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
        if (!sdi)
                return SR_ERR_ARG;
 
-       if (!probe_group) {
+       if (!channel_group) {
                switch (key) {
                case SR_CONF_DEVICE_OPTIONS:
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
@@ -545,7 +545,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
                        return SR_ERR_NA;
                }
        } else {
-               probe = probe_group->probes->data;
+               probe = channel_group->probes->data;
                switch (key) {
                case SR_CONF_DEVICE_OPTIONS:
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
@@ -617,7 +617,7 @@ static int prepare_data(int fd, int revents, void *cb_data)
        struct dev_context *devc;
        struct sr_datafeed_packet packet;
        struct sr_datafeed_logic logic;
-       struct sr_probe_group *pg;
+       struct sr_channel_group *pg;
        struct analog_gen *ag;
        GSList *l;
        uint64_t logic_todo, analog_todo, expected_samplenum, analog_samples, sending_now;
@@ -657,7 +657,7 @@ static int prepare_data(int fd, int revents, void *cb_data)
                /* Analog, one probe at a time */
                if (devc->num_analog_probes > 0 && analog_todo > 0) {
                        sending_now = 0;
-                       for (l = devc->analog_probe_groups; l; l = l->next) {
+                       for (l = devc->analog_channel_groups; l; l = l->next) {
                                pg = l->data;
                                ag = pg->priv;
                                packet.type = SR_DF_ANALOG;
@@ -669,7 +669,7 @@ static int prepare_data(int fd, int revents, void *cb_data)
                                 * help here as well */
 
                                analog_samples = MIN(analog_todo, ag->num_samples);
-                               /* Whichever probe group gets there first. */
+                               /* Whichever channel group gets there first. */
                                sending_now = MAX(sending_now, analog_samples);
                                ag->packet.num_samples = analog_samples;
                                sr_session_send(sdi, &packet);
@@ -714,7 +714,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
                return SR_ERR;
        }
 
-       for (l = devc->analog_probe_groups; l; l = l->next) {
+       for (l = devc->analog_channel_groups; l; l = l->next) {
                generate_analog_pattern(l->data, devc->cur_samplerate);
        }
 
index d9d3d9b83f34b65ff5a283ef6c05a03f7af50d9e..26d12669aa36df5db3c900e536938e6392c28266 100644 (file)
@@ -204,11 +204,11 @@ static int cleanup(void)
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -242,10 +242,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 4ba888c4e796764ae4802f03d9675357063d3e32..7b9c2226d51e9c524038577f44952565b4dfa39d 100644 (file)
@@ -347,13 +347,13 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        struct sr_usb_dev_inst *usb;
        char str[128];
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (id) {
        case SR_CONF_CONN:
@@ -381,12 +381,12 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        int ret;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR;
@@ -407,13 +407,13 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        GVariant *gvar;
        GVariantBuilder gvb;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index f2f6018d81fb8ecc9072773133f5fb17a8742de2..e79bdbcf550bf2ce237783d1c45e30a5cc2cd46f 100644 (file)
@@ -423,18 +423,18 @@ static int cleanup_2x_bd232(void)
 
 /** Get value of configuration item */
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                     const struct sr_probe_group *probe_group)
+                     const struct sr_channel_group *channel_group)
 {
        int ret;
        struct dev_context *devc;
 
        (void)sdi;
        (void)data;
-       (void)probe_group;
+       (void)channel_group;
 
        ret = SR_OK;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (!sdi || !(devc = sdi->priv))
                return SR_ERR_ARG;
@@ -460,10 +460,10 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 
 /** Implementation of config_list, auxiliary function for common parts, */
 static int config_list_common(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                             const struct sr_probe_group *probe_group)
+                             const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
@@ -479,10 +479,10 @@ static int config_list_common(int key, GVariant **data, const struct sr_dev_inst
 
 /** Implementation of config_list for Metrahit 1x/2x send mode */
 static int config_list_sm(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                         const struct sr_probe_group *probe_group)
+                         const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
@@ -490,7 +490,7 @@ static int config_list_sm(int key, GVariant **data, const struct sr_dev_inst *sd
                                                  hwcaps_sm, ARRAY_SIZE(hwcaps_sm), sizeof(int32_t));
                break;
        default:
-               return config_list_common(key, data, sdi, probe_group);
+               return config_list_common(key, data, sdi, channel_group);
        }
 
        return SR_OK;
@@ -498,10 +498,10 @@ static int config_list_sm(int key, GVariant **data, const struct sr_dev_inst *sd
 
 /** Implementation of config_list for Metrahit 2x bidirectional mode */
 static int config_list_bd(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                         const struct sr_probe_group *probe_group)
+                         const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
@@ -509,7 +509,7 @@ static int config_list_bd(int key, GVariant **data, const struct sr_dev_inst *sd
                                                  hwcaps_bd, ARRAY_SIZE(hwcaps_bd), sizeof(int32_t));
                break;
        default:
-               return config_list_common(key, data, sdi, probe_group);
+               return config_list_common(key, data, sdi, channel_group);
        }
 
        return SR_OK;
index d20c910b73070fe5e6878f434d64efc6cc62600a..551a92b01601ff3fb7281557832c50f729911765 100644 (file)
@@ -1492,13 +1492,13 @@ SR_PRIV const char *gmc_model_str(enum model mcode)
 /** @copydoc sr_dev_driver.config_set
  */
 SR_PRIV int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-                      const struct sr_probe_group *probe_group)
+                      const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        uint8_t params[9];
        uint8_t msg[42];
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
index 49fd73533e094f38eac915aef7cff529a6f50258..335b9372b2fb11e47cdfdd68f33d17adccd3d81b 100644 (file)
@@ -120,7 +120,7 @@ struct dev_context {
 
 /* Forward declarations */
 SR_PRIV int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group);
+               const struct sr_channel_group *channel_group);
 SR_PRIV void create_cmd_14(guchar addr, guchar func, guchar* params, guchar* buf);
 SR_PRIV void dump_msg14(guchar* buf, gboolean raw);
 SR_PRIV int gmc_decode_model_bd(uint8_t mcode);
index fb2548af524796e1a7246ef972a775b6fa4abfea..243b8d6d39b78935a55a0d2f73e30138400df2d1 100644 (file)
@@ -183,32 +183,32 @@ static int cleanup(void)
        return SR_OK;
 }
 
-static int check_probe_group(struct dev_context *devc,
-                            const struct sr_probe_group *probe_group)
+static int check_channel_group(struct dev_context *devc,
+                            const struct sr_channel_group *channel_group)
 {
        unsigned int i;
        struct scope_config *model;
 
        model = devc->model_config;
 
-       if (!probe_group)
+       if (!channel_group)
                return PG_NONE;
 
        for (i = 0; i < model->analog_channels; ++i)
-               if (probe_group == &devc->analog_groups[i])
+               if (channel_group == &devc->analog_groups[i])
                        return PG_ANALOG;
 
        for (i = 0; i < model->digital_pods; ++i)
-               if (probe_group == &devc->digital_groups[i])
+               if (channel_group == &devc->digital_groups[i])
                        return PG_DIGITAL;
 
-       sr_err("Invalid probe group specified.");
+       sr_err("Invalid channel group specified.");
 
        return PG_INVALID;
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                     const struct sr_probe_group *probe_group)
+                     const struct sr_channel_group *channel_group)
 {
        int ret, pg_type;
        unsigned int i;
@@ -219,7 +219,7 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
        if (!sdi || !(devc = sdi->priv))
                return SR_ERR_ARG;
 
-       if ((pg_type = check_probe_group(devc, probe_group)) == PG_INVALID)
+       if ((pg_type = check_channel_group(devc, channel_group)) == PG_INVALID)
                return SR_ERR;
 
        ret = SR_ERR_NA;
@@ -238,11 +238,11 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
                break;
        case SR_CONF_NUM_VDIV:
                if (pg_type == PG_NONE) {
-                       sr_err("No probe group specified.");
-                       return SR_ERR_PROBE_GROUP;
+                       sr_err("No channel group specified.");
+                       return SR_ERR_CHANNEL_GROUP;
                } else if (pg_type == PG_ANALOG) {
                        for (i = 0; i < model->analog_channels; ++i) {
-                               if (probe_group != &devc->analog_groups[i])
+                               if (channel_group != &devc->analog_groups[i])
                                        continue;
                                *data = g_variant_new_int32(model->num_ydivs);
                                ret = SR_OK;
@@ -286,11 +286,11 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
                break;
        case SR_CONF_COUPLING:
                if (pg_type == PG_NONE) {
-                       sr_err("No probe group specified.");
-                       return SR_ERR_PROBE_GROUP;
+                       sr_err("No channel group specified.");
+                       return SR_ERR_CHANNEL_GROUP;
                } else if (pg_type == PG_ANALOG) {
                        for (i = 0; i < model->analog_channels; ++i) {
-                               if (probe_group != &devc->analog_groups[i])
+                               if (channel_group != &devc->analog_groups[i])
                                        continue;
                                *data = g_variant_new_string((*model->coupling_options)[state->analog_channels[i].coupling]);
                                ret = SR_OK;
@@ -332,7 +332,7 @@ static GVariant *build_tuples(const uint64_t (*array)[][2], unsigned int n)
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-                     const struct sr_probe_group *probe_group)
+                     const struct sr_channel_group *channel_group)
 {
        int ret, pg_type;
        unsigned int i, j;
@@ -348,7 +348,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
        if (!sdi || !(devc = sdi->priv))
                return SR_ERR_ARG;
 
-       if ((pg_type = check_probe_group(devc, probe_group)) == PG_INVALID)
+       if ((pg_type = check_channel_group(devc, channel_group)) == PG_INVALID)
                return SR_ERR;
 
        model = devc->model_config;
@@ -378,8 +378,8 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
                break;
        case SR_CONF_VDIV:
                if (pg_type == PG_NONE) {
-                       sr_err("No probe group specified.");
-                       return SR_ERR_PROBE_GROUP;
+                       sr_err("No channel group specified.");
+                       return SR_ERR_CHANNEL_GROUP;
                }
 
                g_variant_get(data, "(tt)", &p, &q);
@@ -389,7 +389,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
                            q != (*model->vdivs)[i][1])
                                continue;
                        for (j = 1; j <= model->analog_channels; ++j) {
-                               if (probe_group != &devc->analog_groups[j - 1])
+                               if (channel_group != &devc->analog_groups[j - 1])
                                        continue;
                                state->analog_channels[j - 1].vdiv = i;
                                g_ascii_formatd(float_str, sizeof(float_str), "%E", (float) p / q);
@@ -461,8 +461,8 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
                break;
        case SR_CONF_COUPLING:
                if (pg_type == PG_NONE) {
-                       sr_err("No probe group specified.");
-                       return SR_ERR_PROBE_GROUP;
+                       sr_err("No channel group specified.");
+                       return SR_ERR_CHANNEL_GROUP;
                }
 
                tmp = g_variant_get_string(data, NULL);
@@ -471,7 +471,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
                        if (strcmp(tmp, (*model->coupling_options)[i]) != 0)
                                continue;
                        for (j = 1; j <= model->analog_channels; ++j) {
-                               if (probe_group != &devc->analog_groups[j - 1])
+                               if (channel_group != &devc->analog_groups[j - 1])
                                        continue;
                                state->analog_channels[j-1].coupling = i;
 
@@ -504,7 +504,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                      const struct sr_probe_group *probe_group)
+                      const struct sr_channel_group *channel_group)
 {
        int pg_type;
        struct dev_context *devc;
@@ -513,7 +513,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
        if (!sdi || !(devc = sdi->priv))
                return SR_ERR_ARG;
 
-       if ((pg_type = check_probe_group(devc, probe_group)) == PG_INVALID)
+       if ((pg_type = check_channel_group(devc, channel_group)) == PG_INVALID)
                return SR_ERR;
 
        model = devc->model_config;
@@ -535,7 +535,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
                break;
        case SR_CONF_COUPLING:
                if (pg_type == PG_NONE)
-                       return SR_ERR_PROBE_GROUP;
+                       return SR_ERR_CHANNEL_GROUP;
                *data = g_variant_new_strv(*model->coupling_options,
                           g_strv_length((char **)*model->coupling_options));
                break;
@@ -552,7 +552,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
                break;
        case SR_CONF_VDIV:
                if (pg_type == PG_NONE)
-                       return SR_ERR_PROBE_GROUP;
+                       return SR_ERR_CHANNEL_GROUP;
                *data = build_tuples(model->vdivs, model->num_vdivs);
                break;
        default:
index 60443b86b7504d15c1dedab857dac178b216cc89..263e4f9c08ccd7d7b257d59447b09fc130fd3d72 100644 (file)
@@ -604,11 +604,11 @@ SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi)
                return SR_ERR_NA;
        }
 
-       if (!(devc->analog_groups = g_try_malloc0(sizeof(struct sr_probe_group) *
+       if (!(devc->analog_groups = g_try_malloc0(sizeof(struct sr_channel_group) *
                                                  scope_models[model_index].analog_channels)))
                        return SR_ERR_MALLOC;
 
-       if (!(devc->digital_groups = g_try_malloc0(sizeof(struct sr_probe_group) *
+       if (!(devc->digital_groups = g_try_malloc0(sizeof(struct sr_channel_group) *
                                                   scope_models[model_index].digital_pods)))
                        return SR_ERR_MALLOC;
 
@@ -623,15 +623,15 @@ SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi)
                        (char *)(*scope_models[model_index].analog_names)[i];
                devc->analog_groups[i].probes = g_slist_append(NULL, probe);
 
-               sdi->probe_groups = g_slist_append(sdi->probe_groups,
+               sdi->channel_groups = g_slist_append(sdi->channel_groups,
                                                   &devc->analog_groups[i]);
        }
 
-       /* Add digital probe groups. */
+       /* Add digital channel groups. */
        for (i = 0; i < scope_models[model_index].digital_pods; ++i) {
                g_snprintf(tmp, 25, "POD%d", i);
                devc->digital_groups[i].name = g_strdup(tmp);
-               sdi->probe_groups = g_slist_append(sdi->probe_groups,
+               sdi->channel_groups = g_slist_append(sdi->channel_groups,
                                   &devc->digital_groups[i < 8 ? 0 : 1]);
        }
 
index e37a4d23466808915904d671bc738e7b16f9f163..932eaa4ad0e246dbd147dcbc440b29b9b281052a 100644 (file)
@@ -93,8 +93,8 @@ struct dev_context {
        void *model_config;
        void *model_state;
 
-       struct sr_probe_group *analog_groups;
-       struct sr_probe_group *digital_groups;
+       struct sr_channel_group *analog_groups;
+       struct sr_channel_group *digital_groups;
 
        GSList *enabled_probes;
        GSList *current_probe;
index 41c78290ef79b38a77341276de1292ca3cb93a3b..3553b574a0e29a61fe130be9a51de4eeb1736b1f 100644 (file)
@@ -423,12 +423,12 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct sr_usb_dev_inst *usb;
        char str[128];
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (id) {
        case SR_CONF_CONN:
@@ -456,7 +456,7 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        double tmp_double;
@@ -466,7 +466,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
        const char *tmp_str;
        char **targets;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -587,14 +587,14 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        GVariant *tuple, *rational[2];
        GVariantBuilder gvb;
        unsigned int i;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index b48edf254a5a5713c2c256d9da1971a064e40710..052369a720bd4b712aa343b890ebed28534b8eb1 100644 (file)
@@ -308,12 +308,12 @@ static int cleanup(void)
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        int ret;
 
-       (void)probe_group;
+       (void)channel_group;
 
        ret = SR_OK;
        devc = sdi->priv;
@@ -333,12 +333,12 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        uint64_t samplerate, limit_samples, capture_ratio;
        int ret;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -366,14 +366,14 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        GVariant *gvar, *grange[2];
        GVariantBuilder gvb;
        int ret;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        ret = SR_OK;
 
index ba5b1b1103c8cc9571f5266f9483d15171ad7cbb..a0efca8d3e22758e35ba4eb1ecfdeba7485a978c 100644 (file)
@@ -280,10 +280,10 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (id) {
        case SR_CONF_SAMPLERATE:
@@ -298,11 +298,11 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -335,13 +335,13 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        GVariant *gvar;
        GVariantBuilder gvb;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
index 75f323453257f9a486a008235aed33891905eaab..177884e5de5124b6600cb78ef9726c091beb9799 100644 (file)
@@ -249,13 +249,13 @@ static int cleanup(void)
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        GVariant *rational[2];
        const uint64_t *si;
 
-       (void)probe_group;
+       (void)channel_group;
 
        devc = sdi->priv;
        switch (key) {
@@ -298,7 +298,7 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        uint64_t p, q;
@@ -306,7 +306,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
        int tmp, ret;
        const char *tmp_str;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -378,14 +378,14 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        GVariant *tuple, *rational[2];
        GVariantBuilder gvb;
        unsigned int i;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
index 96695c27062944ee11a813d5ec8d7bb768f5c0dc..6014a8f6916b45c428ba18c2c56e3d800d89b974 100644 (file)
@@ -159,14 +159,14 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        struct sr_usb_dev_inst *usb;
        int ret;
        char str[128];
 
-       (void)probe_group;
+       (void)channel_group;
 
        devc = sdi->priv;
        switch (id) {
@@ -195,12 +195,12 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        int ret;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -235,10 +235,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 654f876ed853ec454376be525cff2f58f8bfa507..a657e27008b398a4a61331962bb8ebffe72b4d33 100644 (file)
@@ -276,11 +276,11 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (id) {
        case SR_CONF_SAMPLERATE:
@@ -298,7 +298,7 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        int ret;
        struct dev_context *devc;
@@ -307,7 +307,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
        int trigger_pos;
        double pos;
 
-       (void)probe_group;
+       (void)channel_group;
        devc = sdi->priv;
 
        if (sdi->status != SR_ST_ACTIVE)
@@ -369,12 +369,12 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        GVariant *gvar;
        GVariantBuilder gvb;
 
-       (void)probe_group;
+       (void)channel_group;
        (void)sdi;
 
        switch (key) {
index 641ca33016bd3904cede5da09fdeaa6031faa0b6..5a75be7a8d9ba2b4e35c7c924fd52b8da928a699 100644 (file)
@@ -163,11 +163,11 @@ static int cleanup(int idx)
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -193,10 +193,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 9736eb27b735b7f9cc22d696f01d142ad2d276d8..92b60cbff9ba488d4544d93d5fd3ad563a3c3668 100644 (file)
@@ -185,11 +185,11 @@ static int cleanup(void)
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -223,10 +223,10 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index af38e4ff8449be2cda322a5f409bbefda988f70e..468b55d69abbcb5336e53f5eadf704385a1169fe 100644 (file)
@@ -213,11 +213,11 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (!sdi)
                return SR_ERR_ARG;
@@ -252,7 +252,7 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        uint16_t flag;
@@ -260,7 +260,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
        int ret;
        const char *stropt;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -349,14 +349,14 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        GVariant *gvar, *grange[2];
        GVariantBuilder gvb;
        int num_channels, i;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 1c0d9c4666014ddba9c3010f62a1d5487686cc5b..1ce9c6cd721779d90a2347c37501d997a93c4516 100644 (file)
@@ -339,7 +339,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
                sdi->probes = g_slist_append(sdi->probes, probe);
                devc->analog_groups[i].name = channel_name;
                devc->analog_groups[i].probes = g_slist_append(NULL, probe);
-               sdi->probe_groups = g_slist_append(sdi->probe_groups,
+               sdi->channel_groups = g_slist_append(sdi->channel_groups,
                                &devc->analog_groups[i]);
        }
 
@@ -356,7 +356,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
                                        devc->digital_group.probes, probe);
                }
                devc->digital_group.name = "LA";
-               sdi->probe_groups = g_slist_append(sdi->probe_groups,
+               sdi->channel_groups = g_slist_append(sdi->channel_groups,
                                &devc->digital_group);
        }
 
@@ -477,7 +477,7 @@ static int digital_frame_size(const struct sr_dev_inst *sdi)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        struct sr_probe *probe;
@@ -491,14 +491,14 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
        if (!sdi || !(devc = sdi->priv))
                return SR_ERR_ARG;
 
-       /* If a probe group is specified, it must be a valid one. */
-       if (probe_group && !g_slist_find(sdi->probe_groups, probe_group)) {
-               sr_err("Invalid probe group specified.");
+       /* If a channel group is specified, it must be a valid one. */
+       if (channel_group && !g_slist_find(sdi->channel_groups, channel_group)) {
+               sr_err("Invalid channel group specified.");
                return SR_ERR;
        }
 
-       if (probe_group) {
-               probe = g_slist_nth_data(probe_group->probes, 0);
+       if (channel_group) {
+               probe = g_slist_nth_data(channel_group->probes, 0);
                if (!probe)
                        return SR_ERR;
                if (probe->type == SR_PROBE_ANALOG) {
@@ -588,7 +588,7 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        uint64_t p, q;
@@ -604,9 +604,9 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
 
-       /* If a probe group is specified, it must be a valid one. */
-       if (probe_group && !g_slist_find(sdi->probe_groups, probe_group)) {
-               sr_err("Invalid probe group specified.");
+       /* If a channel group is specified, it must be a valid one. */
+       if (channel_group && !g_slist_find(sdi->channel_groups, channel_group)) {
+               sr_err("Invalid channel group specified.");
                return SR_ERR;
        }
 
@@ -676,13 +676,13 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
                        ret = SR_ERR_ARG;
                break;
        case SR_CONF_VDIV:
-               if (!probe_group) {
-                       sr_err("No probe group specified.");
-                       return SR_ERR_PROBE_GROUP;
+               if (!channel_group) {
+                       sr_err("No channel group specified.");
+                       return SR_ERR_CHANNEL_GROUP;
                }
                g_variant_get(data, "(tt)", &p, &q);
                for (i = 0; i < 2; i++) {
-                       if (probe_group == &devc->analog_groups[i]) {
+                       if (channel_group == &devc->analog_groups[i]) {
                                for (j = 0; j < ARRAY_SIZE(vdivs); j++) {
                                        if (vdivs[j][0] != p || vdivs[j][1] != q)
                                                continue;
@@ -697,13 +697,13 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
                }
                return SR_ERR_NA;
        case SR_CONF_COUPLING:
-               if (!probe_group) {
-                       sr_err("No probe group specified.");
-                       return SR_ERR_PROBE_GROUP;
+               if (!channel_group) {
+                       sr_err("No channel group specified.");
+                       return SR_ERR_CHANNEL_GROUP;
                }
                tmp_str = g_variant_get_string(data, NULL);
                for (i = 0; i < 2; i++) {
-                       if (probe_group == &devc->analog_groups[i]) {
+                       if (channel_group == &devc->analog_groups[i]) {
                                for (j = 0; j < ARRAY_SIZE(coupling); j++) {
                                        if (!strcmp(tmp_str, coupling[j])) {
                                                g_free(devc->coupling[i]);
@@ -738,7 +738,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        GVariant *tuple, *rational[2];
        GVariantBuilder gvb;
@@ -752,7 +752,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
                                hwopts, ARRAY_SIZE(hwopts), sizeof(int32_t));
                return SR_OK;
-       } else if (key == SR_CONF_DEVICE_OPTIONS && probe_group == NULL) {
+       } else if (key == SR_CONF_DEVICE_OPTIONS && channel_group == NULL) {
                *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
                        hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
                return SR_OK;
@@ -762,28 +762,28 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
        if (!sdi || !(devc = sdi->priv))
                return SR_ERR_ARG;
 
-       /* If a probe group is specified, it must be a valid one. */
-       if (probe_group) {
-               if (probe_group != &devc->analog_groups[0]
-                               && probe_group != &devc->analog_groups[1]) {
-                       sr_err("Invalid probe group specified.");
+       /* If a channel group is specified, it must be a valid one. */
+       if (channel_group) {
+               if (channel_group != &devc->analog_groups[0]
+                               && channel_group != &devc->analog_groups[1]) {
+                       sr_err("Invalid channel group specified.");
                        return SR_ERR;
                }
        }
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
-               if (!probe_group) {
-                       sr_err("No probe group specified.");
-                       return SR_ERR_PROBE_GROUP;
+               if (!channel_group) {
+                       sr_err("No channel group specified.");
+                       return SR_ERR_CHANNEL_GROUP;
                }
-               if (probe_group == &devc->digital_group) {
+               if (channel_group == &devc->digital_group) {
                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
                                NULL, 0, sizeof(int32_t));
                        return SR_OK;
                } else {
                        for (i = 0; i < 2; i++) {
-                               if (probe_group == &devc->analog_groups[i]) {
+                               if (channel_group == &devc->analog_groups[i]) {
                                        *data = g_variant_new_fixed_array(G_VARIANT_TYPE_INT32,
                                                analog_hwcaps, ARRAY_SIZE(analog_hwcaps), sizeof(int32_t));
                                        return SR_OK;
@@ -793,9 +793,9 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
                }
                break;
        case SR_CONF_COUPLING:
-               if (!probe_group) {
-                       sr_err("No probe group specified.");
-                       return SR_ERR_PROBE_GROUP;
+               if (!channel_group) {
+                       sr_err("No channel group specified.");
+                       return SR_ERR_CHANNEL_GROUP;
                }
                *data = g_variant_new_strv(coupling, ARRAY_SIZE(coupling));
                break;
@@ -803,9 +803,9 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
                if (!devc)
                        /* Can't know this until we have the exact model. */
                        return SR_ERR_ARG;
-               if (!probe_group) {
-                       sr_err("No probe group specified.");
-                       return SR_ERR_PROBE_GROUP;
+               if (!channel_group) {
+                       sr_err("No channel group specified.");
+                       return SR_ERR_CHANNEL_GROUP;
                }
                g_variant_builder_init(&gvb, G_VARIANT_TYPE_ARRAY);
                for (i = 0; i < NUM_VDIV; i++) {
index 2fe8d8653e99a80008f1a23a9f527a3600790de3..a53903e04854bf32c3c24c2c4caa175214681ce2 100644 (file)
@@ -97,9 +97,9 @@ struct dev_context {
        const uint64_t (*vdivs)[2];
        uint64_t num_vdivs;
 
-       /* Probe groups */
-       struct sr_probe_group analog_groups[MAX_ANALOG_PROBES];
-       struct sr_probe_group digital_group;
+       /* Channel groups */
+       struct sr_channel_group analog_groups[MAX_ANALOG_PROBES];
+       struct sr_channel_group digital_group;
 
        /* Acquisition settings */
        GSList *enabled_analog_probes;
index 96de1bdf48ebadee9262e9dd12407963eaccae9a..d0a63dc95cb2a9f8455ef56946e386807c27aa96 100644 (file)
@@ -428,7 +428,7 @@ static int cleanup(void)
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        struct sr_usb_dev_inst *usb;
@@ -437,7 +437,7 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
        int ret;
        unsigned int i;
 
-       (void)probe_group;
+       (void)channel_group;
 
        ret = SR_OK;
        switch (key) {
@@ -482,14 +482,14 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        gdouble low, high;
        int ret;
        unsigned int i;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -525,7 +525,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        GVariant *gvar, *range[2];
        GVariantBuilder gvb;
@@ -533,7 +533,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
        unsigned int i;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        ret = SR_OK;
        switch (key) {
index 93487920a7c5fc299ec87b9a091d121d52206d27..cddc11b8dcd785f65a16e24f088b8e735ee91da0 100644 (file)
@@ -460,11 +460,11 @@ static int cleanup(int dmm)
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -493,10 +493,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 8e0a9634b5b8c81a4a5f559b87f1c8fef1b87a2b..1ff49bf4b7f97d884298da91b395dc705c21b868 100644 (file)
@@ -265,12 +265,12 @@ static int cleanup(void)
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                     const struct sr_probe_group *probe_group)
+                     const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        size_t idx;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (!sdi)
                return SR_ERR_ARG;
@@ -337,13 +337,13 @@ static int lookup_index(GVariant *value, const char *const *table, int len)
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-                     const struct sr_probe_group *probe_group)
+                     const struct sr_channel_group *channel_group)
 {
        uint64_t value;
        struct dev_context *devc;
        int idx;
 
-       (void)probe_group;
+       (void)channel_group;
 
        devc = sdi->priv;
        if (!devc)
@@ -477,13 +477,13 @@ static int config_commit(const struct sr_dev_inst *sdi)
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-                      const struct sr_probe_group *probe_group)
+                      const struct sr_channel_group *channel_group)
 {
        GVariant *gvar;
        GVariantBuilder gvb;
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index c29b561e4c09babed3b1cc06989cc1916baf24e8..024f611a8c4f04d19ab02cef1c7596dda35e5bc4 100644 (file)
@@ -178,11 +178,11 @@ static int cleanup(void)
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -209,10 +209,10 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 2d89e89b56fc5dc78cfb0091b5f13f27d2808594..0eb14b06144eb2aa105a3fa8d493c7c3a34fdc19 100644 (file)
@@ -129,11 +129,11 @@ static int cleanup(void)
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -154,10 +154,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 1eccfdc5de5b53f1b4778b13949ec53556e85842..a91af6cc02da640a232f7f037bf8bed59d6e399b 100644 (file)
@@ -272,11 +272,11 @@ static int cleanup(int dmm)
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        devc = sdi->priv;
 
@@ -307,10 +307,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index 4fd89f44e03b2d4ce104edfbe0cee8059ee537fa..caea61f7b71218be8bfa099333cf8543d297507a 100644 (file)
@@ -200,11 +200,11 @@ static int cleanup(void)
 }
 
 static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        devc = sdi->priv;
        switch (key) {
@@ -225,13 +225,13 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        int ret;
        const char *tmp_str;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -266,11 +266,11 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
 
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
index e32bb699a58fbd162cfb136f5d66b47182690ca0..4c7cdc2029ba5b1e652d5a1088eccf0744b40966 100644 (file)
@@ -202,12 +202,12 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct sr_usb_dev_inst *usb;
        char str[128];
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (id) {
        case SR_CONF_CONN:
@@ -225,13 +225,13 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        gint64 now;
        int ret;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -264,10 +264,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_SCAN_OPTIONS:
index f2e6724d4e36fed12603e31f730454cc92cb9440..177c18416bfc3f77826deed17e659732ed4ecfd4 100644 (file)
@@ -467,11 +467,11 @@ static int cleanup(void)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (id) {
        case SR_CONF_SAMPLERATE:
@@ -508,12 +508,12 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        gdouble low, high;
 
-       (void)probe_group;
+       (void)channel_group;
 
        if (sdi->status != SR_ST_ACTIVE)
                return SR_ERR_DEV_CLOSED;
@@ -541,7 +541,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct dev_context *devc;
        GVariant *gvar, *grange[2];
@@ -549,7 +549,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
        double v;
        GVariant *range[2];
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS:
index 5deef6bb2d917a7128802e615c9700bfaefa52a9..f508a4696d5b2cace3e6751e86e02540b83251e7 100644 (file)
@@ -587,7 +587,7 @@ SR_PRIV void sr_config_free(struct sr_config *src)
  * @param[in] sdi (optional) If the key is specific to a device, this must
  *            contain a pointer to the struct sr_dev_inst to be checked.
  *            Otherwise it must be NULL.
- * @param[in] probe_group The probe group on the device for which to list the
+ * @param[in] channel_group The channel group on the device for which to list the
  *                    values, or NULL.
  * @param[in] key The configuration key (SR_CONF_*).
  * @param[in,out] data Pointer to a GVariant where the value will be stored.
@@ -604,7 +604,7 @@ SR_PRIV void sr_config_free(struct sr_config *src)
  */
 SR_API int sr_config_get(const struct sr_dev_driver *driver,
                const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group,
+               const struct sr_channel_group *channel_group,
                int key, GVariant **data)
 {
        int ret;
@@ -615,7 +615,7 @@ SR_API int sr_config_get(const struct sr_dev_driver *driver,
        if (!driver->config_get)
                return SR_ERR_ARG;
 
-       if ((ret = driver->config_get(key, data, sdi, probe_group)) == SR_OK) {
+       if ((ret = driver->config_get(key, data, sdi, channel_group)) == SR_OK) {
                /* Got a floating reference from the driver. Sink it here,
                 * caller will need to unref when done with it. */
                g_variant_ref_sink(*data);
@@ -628,7 +628,7 @@ SR_API int sr_config_get(const struct sr_dev_driver *driver,
  * Set value of a configuration key in a device instance.
  *
  * @param[in] sdi The device instance.
- * @param[in] probe_group The probe group on the device for which to list the
+ * @param[in] channel_group The channel group on the device for which to list the
  *                    values, or NULL.
  * @param[in] key The configuration key (SR_CONF_*).
  * @param data The new value for the key, as a GVariant with GVariantType
@@ -642,7 +642,7 @@ SR_API int sr_config_get(const struct sr_dev_driver *driver,
  *          that it's not applicable.
  */
 SR_API int sr_config_set(const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group,
+               const struct sr_channel_group *channel_group,
                int key, GVariant *data)
 {
        int ret;
@@ -654,7 +654,7 @@ SR_API int sr_config_set(const struct sr_dev_inst *sdi,
        else if (!sdi->driver->config_set)
                ret = SR_ERR_ARG;
        else
-               ret = sdi->driver->config_set(key, data, sdi, probe_group);
+               ret = sdi->driver->config_set(key, data, sdi, channel_group);
 
        g_variant_unref(data);
 
@@ -688,7 +688,7 @@ SR_API int sr_config_commit(const struct sr_dev_inst *sdi)
  * @param[in] driver The sr_dev_driver struct to query.
  * @param[in] sdi (optional) If the key is specific to a device, this must
  *            contain a pointer to the struct sr_dev_inst to be checked.
- * @param[in] probe_group The probe group on the device for which to list the
+ * @param[in] channel_group The channel group on the device for which to list the
  *                    values, or NULL.
  * @param[in] key The configuration key (SR_CONF_*).
  * @param[in,out] data A pointer to a GVariant where the list will be stored.
@@ -705,7 +705,7 @@ SR_API int sr_config_commit(const struct sr_dev_inst *sdi)
  */
 SR_API int sr_config_list(const struct sr_dev_driver *driver,
                const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group,
+               const struct sr_channel_group *channel_group,
                int key, GVariant **data)
 {
        int ret;
@@ -714,7 +714,7 @@ SR_API int sr_config_list(const struct sr_dev_driver *driver,
                ret = SR_ERR;
        else if (!driver->config_list)
                ret = SR_ERR_ARG;
-       else if ((ret = driver->config_list(key, data, sdi, probe_group)) == SR_OK)
+       else if ((ret = driver->config_list(key, data, sdi, channel_group)) == SR_OK)
                g_variant_ref_sink(*data);
 
        return ret;
index 21468c875a2dac2828dc59a28e128d8ce0d63e7a..d389b97fdb707156f041f76051fd83265a1dd05a 100644 (file)
@@ -73,7 +73,7 @@ enum {
        SR_ERR_NA         = -6, /**< Not applicable. */
        SR_ERR_DEV_CLOSED = -7, /**< Device is closed, but needs to be open. */
        SR_ERR_TIMEOUT    = -8, /**< A timeout occurred. */
-       SR_ERR_PROBE_GROUP= -9, /**< A probe group must be specified. */
+       SR_ERR_PROBE_GROUP= -9, /**< A channel group must be specified. */
 
        /*
         * Note: When adding entries here, don't forget to also update the
@@ -620,8 +620,8 @@ struct sr_probe {
 };
 
 /** Structure for groups of probes that have common properties. */
-struct sr_probe_group {
-       /** Name of the probe group. */
+struct sr_channel_group {
+       /** Name of the channel group. */
        char *name;
        /** List of sr_probe structs of the probes belonging to this group. */
        GSList *probes;
@@ -921,8 +921,8 @@ struct sr_dev_inst {
        char *version;
        /** List of probes. */
        GSList *probes;
-       /** List of sr_probe_group structs */
-       GSList *probe_groups;
+       /** List of sr_channel_group structs */
+       GSList *channel_groups;
        /** Device instance connection data (used?) */
        void *conn;
        /** Device instance private data (used?) */
@@ -986,12 +986,12 @@ struct sr_dev_driver {
         */
        int (*config_get) (int id, GVariant **data,
                        const struct sr_dev_inst *sdi,
-                       const struct sr_probe_group *probe_group);
+                       const struct sr_channel_group *channel_group);
        /** Set value of a configuration key in driver or a given device instance.
         *  @see sr_config_set(). */
        int (*config_set) (int id, GVariant *data,
                        const struct sr_dev_inst *sdi,
-                       const struct sr_probe_group *probe_group);
+                       const struct sr_channel_group *channel_group);
        /** Probe status change.
         *  @see sr_dev_probe_enable(), sr_dev_trigger_set(). */
        int (*config_probe_set) (const struct sr_dev_inst *sdi,
@@ -1004,7 +1004,7 @@ struct sr_dev_driver {
         */
        int (*config_list) (int info_id, GVariant **data,
                        const struct sr_dev_inst *sdi,
-                       const struct sr_probe_group *probe_group);
+                       const struct sr_channel_group *channel_group);
 
        /* Device-specific */
        /** Open device */
diff --git a/proto.h b/proto.h
index 2b36264e8240066372bf29dc65b713f988e5174b..75ece6c89da1c19de327e563e7b3be6816e9943b 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -72,15 +72,15 @@ SR_API int sr_driver_init(struct sr_context *ctx,
 SR_API GSList *sr_driver_scan(struct sr_dev_driver *driver, GSList *options);
 SR_API int sr_config_get(const struct sr_dev_driver *driver,
                const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group,
+               const struct sr_channel_group *channel_group,
                int key, GVariant **data);
 SR_API int sr_config_set(const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group,
+               const struct sr_channel_group *channel_group,
                int key, GVariant *data);
 SR_API int sr_config_commit(const struct sr_dev_inst *sdi);
 SR_API int sr_config_list(const struct sr_dev_driver *driver,
                const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group,
+               const struct sr_channel_group *channel_group,
                int key, GVariant **data);
 SR_API const struct sr_config_info *sr_config_info_get(int key);
 SR_API const struct sr_config_info *sr_config_info_name_get(const char *optname);
index f333db1df1ae9eab6e280123d6d674e363426c28..f64d203d0888e4fc225e876fedb45110ded470e5 100644 (file)
@@ -211,11 +211,11 @@ static int dev_close(struct sr_dev_inst *sdi)
 }
 
 static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct session_vdev *vdev;
 
-       (void)probe_group;
+       (void)channel_group;
 
        switch (id) {
        case SR_CONF_SAMPLERATE:
@@ -233,11 +233,11 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
 }
 
 static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        struct session_vdev *vdev;
 
-       (void)probe_group;
+       (void)channel_group;
 
        vdev = sdi->priv;
 
@@ -270,10 +270,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
 }
 
 static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
-               const struct sr_probe_group *probe_group)
+               const struct sr_channel_group *channel_group)
 {
        (void)sdi;
-       (void)probe_group;
+       (void)channel_group;
 
        switch (key) {
        case SR_CONF_DEVICE_OPTIONS: