Rename 'struct sr_probe' to 'struct sr_channel' everywhere.

This fixes parts of bug #259.
This commit is contained in:
Uwe Hermann 2014-03-20 21:58:57 +01:00
parent 53b4680fce
commit 91aea754aa
66 changed files with 124 additions and 124 deletions

View File

@ -196,7 +196,7 @@ class Device(object):
self._probes = {} self._probes = {}
probe_list = self.struct.probes probe_list = self.struct.probes
while (probe_list): while (probe_list):
probe_ptr = void_ptr_to_sr_probe_ptr(probe_list.data) probe_ptr = void_ptr_to_sr_channel_ptr(probe_list.data)
self._probes[probe_ptr.name] = Probe(self, probe_ptr) self._probes[probe_ptr.name] = Probe(self, probe_ptr)
probe_list = probe_list.next probe_list = probe_list.next
return self._probes return self._probes
@ -306,7 +306,7 @@ class ChannelGroup(object):
self._channels = [] self._channels = []
channel_list = self.struct.channels channel_list = self.struct.channels
while (channel_list): while (channel_list):
channel_ptr = void_ptr_to_sr_probe_ptr(channel_list.data) channel_ptr = void_ptr_to_sr_channel_ptr(channel_list.data)
self._channels.append(Probe(self, probe_ptr)) self._channels.append(Probe(self, probe_ptr))
channel_list = channel_list.next channel_list = channel_list.next
return self._channels return self._channels

View File

@ -98,7 +98,7 @@ gchar *g_string_free(GString *string, gboolean free_segment);
%pointer_cast(gpointer, struct sr_dev_inst *, gpointer_to_sr_dev_inst_ptr); %pointer_cast(gpointer, struct sr_dev_inst *, gpointer_to_sr_dev_inst_ptr);
%pointer_cast(void *, struct sr_datafeed_logic *, void_ptr_to_sr_datafeed_logic_ptr) %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_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_channel *, void_ptr_to_sr_channel_ptr)
%pointer_cast(void *, struct sr_channel_group *, void_ptr_to_sr_channel_group_ptr) %pointer_cast(void *, struct sr_channel_group *, void_ptr_to_sr_channel_group_ptr)
%extend sr_input_format { %extend sr_input_format {

View File

@ -40,20 +40,20 @@
*/ */
/** @private /** @private
* Allocate and initialize new struct sr_probe * Allocate and initialize new struct sr_channel
* @param[in] index @copydoc sr_probe::index * @param[in] index @copydoc sr_channel::index
* @param[in] type @copydoc sr_probe::type * @param[in] type @copydoc sr_channel::type
* @param[in] enabled @copydoc sr_probe::enabled * @param[in] enabled @copydoc sr_channel::enabled
* @param[in] name @copydoc sr_probe::name * @param[in] name @copydoc sr_channel::name
* *
* @return NULL (failure) or new struct sr_probe*. * @return NULL (failure) or new struct sr_channel*.
*/ */
SR_PRIV struct sr_probe *sr_probe_new(int index, int type, SR_PRIV struct sr_channel *sr_probe_new(int index, int type,
gboolean enabled, const char *name) gboolean enabled, const char *name)
{ {
struct sr_probe *probe; struct sr_channel *probe;
if (!(probe = g_try_malloc0(sizeof(struct sr_probe)))) { if (!(probe = g_try_malloc0(sizeof(struct sr_channel)))) {
sr_err("Probe malloc failed."); sr_err("Probe malloc failed.");
return NULL; return NULL;
} }
@ -87,7 +87,7 @@ SR_API int sr_dev_probe_name_set(const struct sr_dev_inst *sdi,
int probenum, const char *name) int probenum, const char *name)
{ {
GSList *l; GSList *l;
struct sr_probe *probe; struct sr_channel *probe;
int ret; int ret;
if (!sdi) { if (!sdi) {
@ -126,7 +126,7 @@ SR_API int sr_dev_probe_enable(const struct sr_dev_inst *sdi, int probenum,
gboolean state) gboolean state)
{ {
GSList *l; GSList *l;
struct sr_probe *probe; struct sr_channel *probe;
int ret; int ret;
gboolean was_enabled; gboolean was_enabled;
@ -175,7 +175,7 @@ SR_API int sr_dev_trigger_set(const struct sr_dev_inst *sdi, int probenum,
const char *trigger) const char *trigger)
{ {
GSList *l; GSList *l;
struct sr_probe *probe; struct sr_channel *probe;
char *old_trigger; char *old_trigger;
int ret; int ret;
@ -298,7 +298,7 @@ SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
*/ */
SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi) SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi)
{ {
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
for (l = sdi->probes; l; l = l->next) { for (l = sdi->probes; l; l = l->next) {

View File

@ -72,7 +72,7 @@ static GSList *scan(GSList *options)
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_config *src; struct sr_config *src;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *l, *devices; GSList *l, *devices;
int len, i; int len, i;

View File

@ -63,7 +63,7 @@ static void alsa_scan_handle_dev(GSList **devices,
struct drv_context *drvc = NULL; struct drv_context *drvc = NULL;
struct sr_dev_inst *sdi = NULL; struct sr_dev_inst *sdi = NULL;
struct dev_context *devc = NULL; struct dev_context *devc = NULL;
struct sr_probe *probe; struct sr_channel *probe;
int ret; int ret;
unsigned int i, offset, channels, minrate, maxrate, rate; unsigned int i, offset, channels, minrate, maxrate, rate;
uint64_t hwrates[ARRAY_SIZE(rates)]; uint64_t hwrates[ARRAY_SIZE(rates)];

View File

@ -52,7 +52,7 @@ static GSList *scan(GSList *options)
struct dev_context *devc; struct dev_context *devc;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_config *src; struct sr_config *src;
GSList *devices, *l; GSList *devices, *l;
const char *conn, *serialcomm; const char *conn, *serialcomm;

View File

@ -92,7 +92,7 @@ static void appa_55ii_live_data(struct sr_dev_inst *sdi, const uint8_t *buf)
struct dev_context *devc; struct dev_context *devc;
struct sr_datafeed_packet packet; struct sr_datafeed_packet packet;
struct sr_datafeed_analog analog; struct sr_datafeed_analog analog;
struct sr_probe *probe; struct sr_channel *probe;
float values[APPA_55II_NUM_PROBES], *val_ptr; float values[APPA_55II_NUM_PROBES], *val_ptr;
int i; int i;
@ -138,7 +138,7 @@ static void appa_55ii_log_data_parse(struct sr_dev_inst *sdi)
struct dev_context *devc; struct dev_context *devc;
struct sr_datafeed_packet packet; struct sr_datafeed_packet packet;
struct sr_datafeed_analog analog; struct sr_datafeed_analog analog;
struct sr_probe *probe; struct sr_channel *probe;
float values[APPA_55II_NUM_PROBES], *val_ptr; float values[APPA_55II_NUM_PROBES], *val_ptr;
const uint8_t *buf; const uint8_t *buf;
int16_t temp; int16_t temp;

View File

@ -402,7 +402,7 @@ static int init(struct sr_context *sr_ctx)
static GSList *scan(GSList *options) static GSList *scan(GSList *options)
{ {
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
GSList *devices; GSList *devices;
@ -654,7 +654,7 @@ static int set_samplerate(const struct sr_dev_inst *sdi, uint64_t samplerate)
static int configure_probes(const struct sr_dev_inst *sdi) static int configure_probes(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc = sdi->priv; struct dev_context *devc = sdi->priv;
const struct sr_probe *probe; const struct sr_channel *probe;
const GSList *l; const GSList *l;
int trigger_set = 0; int trigger_set = 0;
int probebit; int probebit;
@ -662,7 +662,7 @@ static int configure_probes(const struct sr_dev_inst *sdi)
memset(&devc->trigger, 0, sizeof(struct sigma_trigger)); memset(&devc->trigger, 0, sizeof(struct sigma_trigger));
for (l = sdi->probes; l; l = l->next) { for (l = sdi->probes; l; l = l->next) {
probe = (struct sr_probe *)l->data; probe = (struct sr_channel *)l->data;
probebit = 1 << (probe->index); probebit = 1 << (probe->index);
if (!probe->enabled || !probe->trigger) if (!probe->enabled || !probe->trigger)

View File

@ -87,7 +87,7 @@ static GSList *scan(GSList *options, int modelid)
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_config *src; struct sr_config *src;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_channel_group *cg; struct sr_channel_group *cg;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *l, *devices; GSList *l, *devices;
@ -209,7 +209,7 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg) const struct sr_channel_group *cg)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
int channel, ret; int channel, ret;
if (!sdi) if (!sdi)
@ -278,7 +278,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg) const struct sr_channel_group *cg)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
gdouble dval; gdouble dval;
int channel, ret, ival; int channel, ret, ival;
const char *sval; const char *sval;
@ -362,7 +362,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg) const struct sr_channel_group *cg)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
GVariant *gvar; GVariant *gvar;
GVariantBuilder gvb; GVariantBuilder gvb;
int channel, ret, i; int channel, ret, i;

View File

@ -48,7 +48,7 @@ static GSList *scan(GSList *options)
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_usb_dev_inst *usb; struct sr_usb_dev_inst *usb;
struct sr_config *src; struct sr_config *src;
struct sr_probe *probe; struct sr_channel *probe;
const char *conn; const char *conn;
drvc = di->priv; drvc = di->priv;

View File

@ -44,7 +44,7 @@ static GSList *brymen_scan(const char *conn, const char *serialcomm)
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct dev_context *devc; struct dev_context *devc;
struct drv_context *drvc; struct drv_context *drvc;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *devices; GSList *devices;
int ret; int ret;

View File

@ -79,7 +79,7 @@ static GSList *scan(GSList *options)
struct sr_config *src; struct sr_config *src;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l, *devices; GSList *l, *devices;
gint64 start; gint64 start;
const char *conn; const char *conn;

View File

@ -71,7 +71,7 @@ static GSList *center_scan(const char *conn, const char *serialcomm, int idx)
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *devices; GSList *devices;

View File

@ -79,7 +79,7 @@ static int init(struct sr_context *sr_ctx)
static GSList *scan(GSList *options) static GSList *scan(GSList *options)
{ {
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
GSList *devices; GSList *devices;

View File

@ -287,7 +287,7 @@ SR_PRIV int la8_reset(struct dev_context *devc)
SR_PRIV int configure_probes(const struct sr_dev_inst *sdi) SR_PRIV int configure_probes(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
const struct sr_probe *probe; const struct sr_channel *probe;
const GSList *l; const GSList *l;
uint8_t probe_bit; uint8_t probe_bit;
char *tc; char *tc;
@ -297,7 +297,7 @@ SR_PRIV int configure_probes(const struct sr_dev_inst *sdi)
devc->trigger_mask = 0; /* Default to "don't care" for all probes. */ devc->trigger_mask = 0; /* Default to "don't care" for all probes. */
for (l = sdi->probes; l; l = l->next) { for (l = sdi->probes; l; l = l->next) {
probe = (struct sr_probe *)l->data; probe = (struct sr_channel *)l->data;
if (!probe) { if (!probe) {
sr_err("%s: probe was NULL.", __func__); sr_err("%s: probe was NULL.", __func__);

View File

@ -56,7 +56,7 @@ static GSList *scan(GSList *options)
struct dev_context *devc; struct dev_context *devc;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_config *src; struct sr_config *src;
struct sr_probe *probe; struct sr_channel *probe;
GSList *devices, *l; GSList *devices, *l;
const char *conn, *serialcomm; const char *conn, *serialcomm;

View File

@ -52,7 +52,7 @@ static GSList *scan(GSList *options)
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct drv_context *drvc; struct drv_context *drvc;
struct sr_config *src; struct sr_config *src;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *l, *devices; GSList *l, *devices;
const char *conn, *serialcomm; const char *conn, *serialcomm;

View File

@ -255,7 +255,7 @@ static GSList *scan(GSList *options)
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_channel_group *cg; struct sr_channel_group *cg;
struct sr_config *src; struct sr_config *src;
struct analog_gen *ag; struct analog_gen *ag;
@ -385,7 +385,7 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg) const struct sr_channel_group *cg)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
struct analog_gen *ag; struct analog_gen *ag;
int pattern; int pattern;
@ -435,7 +435,7 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi,
{ {
struct dev_context *devc; struct dev_context *devc;
struct analog_gen *ag; struct analog_gen *ag;
struct sr_probe *probe; struct sr_channel *probe;
int pattern, ret; int pattern, ret;
unsigned int i; unsigned int i;
const char *stropt; const char *stropt;
@ -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, static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg) const struct sr_channel_group *cg)
{ {
struct sr_probe *probe; struct sr_channel *probe;
GVariant *gvar; GVariant *gvar;
GVariantBuilder gvb; GVariantBuilder gvb;

View File

@ -69,7 +69,7 @@ static GSList *fluke_scan(const char *conn, const char *serialcomm)
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *devices; GSList *devices;
int retry, len, i, s; int retry, len, i, s;

View File

@ -126,7 +126,7 @@ static GSList *scan(GSList *options)
struct dev_context *devc; struct dev_context *devc;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_usb_dev_inst *usb; struct sr_usb_dev_inst *usb;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_config *src; struct sr_config *src;
const struct fx2lafw_profile *prof; const struct fx2lafw_profile *prof;
GSList *l, *devices, *conn_devices; GSList *l, *devices, *conn_devices;

View File

@ -295,7 +295,7 @@ SR_PRIV int fx2lafw_dev_open(struct sr_dev_inst *sdi, struct sr_dev_driver *di)
SR_PRIV int fx2lafw_configure_probes(const struct sr_dev_inst *sdi) SR_PRIV int fx2lafw_configure_probes(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
int probe_bit, stage, i; int probe_bit, stage, i;
char *tc; char *tc;
@ -308,7 +308,7 @@ SR_PRIV int fx2lafw_configure_probes(const struct sr_dev_inst *sdi)
stage = -1; stage = -1;
for (l = sdi->probes; l; l = l->next) { for (l = sdi->probes; l; l = l->next) {
probe = (struct sr_probe *)l->data; probe = (struct sr_channel *)l->data;
if (probe->enabled == FALSE) if (probe->enabled == FALSE)
continue; continue;

View File

@ -162,7 +162,7 @@ static GSList *scan_1x_2x_rs232(GSList *options)
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_config *src; struct sr_config *src;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *l, *devices; GSList *l, *devices;
const char *conn, *serialcomm; const char *conn, *serialcomm;
@ -259,7 +259,7 @@ static GSList *scan_2x_bd232(GSList *options)
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_config *src; struct sr_config *src;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *l, *devices; GSList *l, *devices;
const char *conn, *serialcomm; const char *conn, *serialcomm;

View File

@ -565,7 +565,7 @@ static int config_list(int key, GVariant **data, const struct sr_dev_inst *sdi,
SR_PRIV int hmo_request_data(const struct sr_dev_inst *sdi) SR_PRIV int hmo_request_data(const struct sr_dev_inst *sdi)
{ {
char command[MAX_COMMAND_SIZE]; char command[MAX_COMMAND_SIZE];
struct sr_probe *probe; struct sr_channel *probe;
struct dev_context *devc; struct dev_context *devc;
struct scope_config *model; struct scope_config *model;
@ -596,7 +596,7 @@ SR_PRIV int hmo_request_data(const struct sr_dev_inst *sdi)
static int hmo_check_probes(GSList *probes) static int hmo_check_probes(GSList *probes)
{ {
GSList *l; GSList *l;
struct sr_probe *probe; struct sr_channel *probe;
gboolean enabled_pod1, enabled_pod2, enabled_chan3, enabled_chan4; gboolean enabled_pod1, enabled_pod2, enabled_chan3, enabled_chan4;
enabled_pod1 = enabled_pod2 = enabled_chan3 = enabled_chan4 = FALSE; enabled_pod1 = enabled_pod2 = enabled_chan3 = enabled_chan4 = FALSE;
@ -636,7 +636,7 @@ static int hmo_setup_probes(const struct sr_dev_inst *sdi)
char command[MAX_COMMAND_SIZE]; char command[MAX_COMMAND_SIZE];
struct scope_state *state; struct scope_state *state;
struct scope_config *model; struct scope_config *model;
struct sr_probe *probe; struct sr_channel *probe;
struct dev_context *devc; struct dev_context *devc;
struct sr_scpi_dev_inst *scpi; struct sr_scpi_dev_inst *scpi;
@ -712,7 +712,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
{ {
GSList *l; GSList *l;
gboolean digital_added; gboolean digital_added;
struct sr_probe *probe; struct sr_channel *probe;
struct dev_context *devc; struct dev_context *devc;
struct sr_scpi_dev_inst *scpi; struct sr_scpi_dev_inst *scpi;

View File

@ -581,7 +581,7 @@ SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi)
char tmp[25]; char tmp[25];
int model_index; int model_index;
unsigned int i, j; unsigned int i, j;
struct sr_probe *probe; struct sr_channel *probe;
struct dev_context *devc; struct dev_context *devc;
devc = sdi->priv; devc = sdi->priv;
@ -657,7 +657,7 @@ SR_PRIV int hmo_init_device(struct sr_dev_inst *sdi)
SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data) SR_PRIV int hmo_receive_data(int fd, int revents, void *cb_data)
{ {
struct sr_probe *probe; struct sr_channel *probe;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct dev_context *devc; struct dev_context *devc;
struct sr_datafeed_packet packet; struct sr_datafeed_packet packet;

View File

@ -160,7 +160,7 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data);
static struct sr_dev_inst *dso_dev_new(int index, const struct dso_profile *prof) static struct sr_dev_inst *dso_dev_new(int index, const struct dso_profile *prof)
{ {
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
int i; int i;
@ -213,7 +213,7 @@ static struct sr_dev_inst *dso_dev_new(int index, const struct dso_profile *prof
static int configure_probes(const struct sr_dev_inst *sdi) static int configure_probes(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
const GSList *l; const GSList *l;
int p; int p;

View File

@ -59,7 +59,7 @@ static GSList *scan(GSList *options)
GSList *usb_devices, *devices, *l; GSList *usb_devices, *devices, *l;
struct drv_context *drvc; struct drv_context *drvc;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
struct dev_context *devc; struct dev_context *devc;
struct sr_usb_dev_inst *usb; struct sr_usb_dev_inst *usb;
struct device_info dev_info; struct device_info dev_info;

View File

@ -482,7 +482,7 @@ SR_PRIV int sl2_set_limit_samples(const struct sr_dev_inst *sdi,
SR_PRIV void sl2_configure_trigger(const struct sr_dev_inst *sdi) SR_PRIV void sl2_configure_trigger(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
uint8_t trigger_type; uint8_t trigger_type;
int probe_index, num_triggers_anyedge; int probe_index, num_triggers_anyedge;
char *trigger; char *trigger;

View File

@ -152,7 +152,7 @@ struct dev_context {
void *cb_data; void *cb_data;
/* Array to provide an index based access to all probes. */ /* Array to provide an index based access to all probes. */
const struct sr_probe *probes[NUM_PROBES]; const struct sr_channel *probes[NUM_PROBES];
struct libusb_transfer *xfer_in, *xfer_out; struct libusb_transfer *xfer_in, *xfer_out;

View File

@ -74,7 +74,7 @@ static int init(struct sr_context *sr_ctx)
static GSList *scan(GSList *options) static GSList *scan(GSList *options)
{ {
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
GSList *devices; GSList *devices;

View File

@ -112,7 +112,7 @@ static GSList *scan(GSList *options)
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
GSList *usb_devices, *devices, *l; GSList *usb_devices, *devices, *l;
char *model; char *model;

View File

@ -293,7 +293,7 @@ static struct sr_dev_inst *lascar_identify(unsigned char *config)
struct dev_context *devc; struct dev_context *devc;
const struct elusb_profile *profile; const struct elusb_profile *profile;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
int modelid, i; int modelid, i;
char firmware[5]; char firmware[5];
@ -398,7 +398,7 @@ static void lascar_el_usb_dispatch(struct sr_dev_inst *sdi, unsigned char *buf,
struct dev_context *devc; struct dev_context *devc;
struct sr_datafeed_packet packet; struct sr_datafeed_packet packet;
struct sr_datafeed_analog analog; struct sr_datafeed_analog analog;
struct sr_probe *probe; struct sr_channel *probe;
float *temp, *rh; float *temp, *rh;
uint16_t s; uint16_t s;
int samples, samples_left, i, j; int samples, samples_left, i, j;

View File

@ -217,7 +217,7 @@ static GSList *scan(GSList *options)
sdi->priv = devc; sdi->priv = devc;
for (i = 0; i < NUM_PROBES; i++) { for (i = 0; i < NUM_PROBES; i++) {
struct sr_probe *probe; struct sr_channel *probe;
ptype = (i == 0) ? SR_PROBE_ANALOG : SR_PROBE_LOGIC; ptype = (i == 0) ? SR_PROBE_ANALOG : SR_PROBE_LOGIC;
if (!(probe = sr_probe_new(i, ptype, TRUE, if (!(probe = sr_probe_new(i, ptype, TRUE,
mso19_probe_names[i]))) mso19_probe_names[i])))

View File

@ -438,7 +438,7 @@ SR_PRIV int mso_receive_data(int fd, int revents, void *cb_data)
SR_PRIV int mso_configure_probes(const struct sr_dev_inst *sdi) SR_PRIV int mso_configure_probes(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
char *tc; char *tc;
@ -453,7 +453,7 @@ SR_PRIV int mso_configure_probes(const struct sr_dev_inst *sdi)
devc->use_trigger = FALSE; devc->use_trigger = FALSE;
for (l = sdi->probes; l; l = l->next) { for (l = sdi->probes; l; l = l->next) {
probe = (struct sr_probe *)l->data; probe = (struct sr_channel *)l->data;
if (probe->enabled == FALSE) if (probe->enabled == FALSE)
continue; continue;

View File

@ -66,7 +66,7 @@ static GSList *mic_scan(const char *conn, const char *serialcomm, int idx)
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *devices; GSList *devices;

View File

@ -49,7 +49,7 @@ static GSList *scan(GSList *options)
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_config *src; struct sr_config *src;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *l, *devices; GSList *l, *devices;
int len, cnt; int len, cnt;

View File

@ -90,7 +90,7 @@ static GSList *scan(GSList *options)
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GPollFD probefd; GPollFD probefd;
GSList *l, *devices; GSList *l, *devices;

View File

@ -57,7 +57,7 @@ SR_PRIV int send_longcommand(struct sr_serial_dev_inst *serial,
SR_PRIV int ols_configure_probes(const struct sr_dev_inst *sdi) SR_PRIV int ols_configure_probes(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
const struct sr_probe *probe; const struct sr_channel *probe;
const GSList *l; const GSList *l;
int probe_bit, stage, i; int probe_bit, stage, i;
char *tc; char *tc;
@ -72,7 +72,7 @@ SR_PRIV int ols_configure_probes(const struct sr_dev_inst *sdi)
devc->num_stages = 0; devc->num_stages = 0;
for (l = sdi->probes; l; l = l->next) { for (l = sdi->probes; l; l = l->next) {
probe = (const struct sr_probe *)l->data; probe = (const struct sr_channel *)l->data;
if (!probe->enabled) if (!probe->enabled)
continue; continue;
@ -134,7 +134,7 @@ SR_PRIV struct sr_dev_inst *get_metadata(struct sr_serial_dev_inst *serial)
{ {
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
uint32_t tmp_int, ui; uint32_t tmp_int, ui;
uint8_t key, type, token; uint8_t key, type, token;
GString *tmp_str, *devname, *version; GString *tmp_str, *devname, *version;

View File

@ -260,7 +260,7 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi)
struct dev_context *devc; struct dev_context *devc;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_scpi_hw_info *hw_info; struct sr_scpi_hw_info *hw_info;
struct sr_probe *probe; struct sr_channel *probe;
long n[3]; long n[3];
unsigned int i; unsigned int i;
const struct rigol_ds_model *model = NULL; const struct rigol_ds_model *model = NULL;
@ -439,7 +439,7 @@ static int cleanup(void)
static int analog_frame_size(const struct sr_dev_inst *sdi) static int analog_frame_size(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc = sdi->priv; struct dev_context *devc = sdi->priv;
struct sr_probe *probe; struct sr_channel *probe;
int analog_probes = 0; int analog_probes = 0;
GSList *l; GSList *l;
@ -480,7 +480,7 @@ static int config_get(int id, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_channel_group *cg) const struct sr_channel_group *cg)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
const char *tmp_str; const char *tmp_str;
uint64_t samplerate; uint64_t samplerate;
int analog_channel = -1; int analog_channel = -1;
@ -865,7 +865,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
{ {
struct sr_scpi_dev_inst *scpi; struct sr_scpi_dev_inst *scpi;
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_datafeed_packet packet; struct sr_datafeed_packet packet;
GSList *l; GSList *l;

View File

@ -207,7 +207,7 @@ static int rigol_ds_stop_wait(const struct sr_dev_inst *sdi)
static int rigol_ds_check_stop(const struct sr_dev_inst *sdi) static int rigol_ds_check_stop(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
int tmp; int tmp;
if (!(devc = sdi->priv)) if (!(devc = sdi->priv))
@ -376,7 +376,7 @@ SR_PRIV int rigol_ds_capture_start(const struct sr_dev_inst *sdi)
SR_PRIV int rigol_ds_channel_start(const struct sr_dev_inst *sdi) SR_PRIV int rigol_ds_channel_start(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
if (!(devc = sdi->priv)) if (!(devc = sdi->priv))
return SR_ERR; return SR_ERR;
@ -483,7 +483,7 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
struct sr_datafeed_logic logic; struct sr_datafeed_logic logic;
double vdiv, offset; double vdiv, offset;
int len, i, vref; int len, i, vref;
struct sr_probe *probe; struct sr_channel *probe;
gsize expected_data_bytes; gsize expected_data_bytes;
(void)fd; (void)fd;

View File

@ -136,7 +136,7 @@ static GSList *scan(GSList *options)
struct dev_context *devc; struct dev_context *devc;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_usb_dev_inst *usb; struct sr_usb_dev_inst *usb;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_config *src; struct sr_config *src;
GSList *l, *devices, *conn_devices; GSList *l, *devices, *conn_devices;
struct libusb_device_descriptor des; struct libusb_device_descriptor des;
@ -624,7 +624,7 @@ static unsigned int get_timeout(struct dev_context *devc)
static int configure_probes(const struct sr_dev_inst *sdi) static int configure_probes(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
uint16_t probe_bit; uint16_t probe_bit;
@ -633,7 +633,7 @@ static int configure_probes(const struct sr_dev_inst *sdi)
devc->cur_channels = 0; devc->cur_channels = 0;
devc->num_channels = 0; devc->num_channels = 0;
for (l = sdi->probes; l; l = l->next) { for (l = sdi->probes; l; l = l->next) {
probe = (struct sr_probe *)l->data; probe = (struct sr_channel *)l->data;
if (probe->enabled == FALSE) if (probe->enabled == FALSE)
continue; continue;

View File

@ -337,7 +337,7 @@ static GSList *sdmm_scan(const char *conn, const char *serialcomm, int dmm)
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
GSList *devices; GSList *devices;
int dropped, ret; int dropped, ret;

View File

@ -75,7 +75,7 @@ static int init(struct sr_context *sr_ctx)
static GSList *gen_probe_list(int num_probes) static GSList *gen_probe_list(int num_probes)
{ {
GSList *list; GSList *list;
struct sr_probe *probe; struct sr_channel *probe;
int i; int i;
char name[8]; char name[8];
@ -402,7 +402,7 @@ static int config_set(int key, GVariant *data, const struct sr_dev_inst *sdi,
} }
static int config_probe_set(const struct sr_dev_inst *sdi, static int config_probe_set(const struct sr_dev_inst *sdi,
struct sr_probe *probe, unsigned int changes) struct sr_channel *probe, unsigned int changes)
{ {
uint64_t probe_bit; uint64_t probe_bit;
uint64_t trigger_mask; uint64_t trigger_mask;

View File

@ -49,7 +49,7 @@ static GSList *scan(GSList *options)
struct dev_context *devc; struct dev_context *devc;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
GSList *devices = NULL, *l; GSList *devices = NULL, *l;
const char *conn = NULL, *serialcomm = NULL; const char *conn = NULL, *serialcomm = NULL;
uint8_t buf[292]; uint8_t buf[292];

View File

@ -41,12 +41,12 @@ static gboolean teleinfo_control_check(char *label, char *data, char control)
static gint teleinfo_probe_compare(gconstpointer a, gconstpointer b) static gint teleinfo_probe_compare(gconstpointer a, gconstpointer b)
{ {
const struct sr_probe *probe = a; const struct sr_channel *probe = a;
const char *name = b; const char *name = b;
return strcmp(probe->name, name); return strcmp(probe->name, name);
} }
static struct sr_probe *teleinfo_find_probe(struct sr_dev_inst *sdi, static struct sr_channel *teleinfo_find_probe(struct sr_dev_inst *sdi,
const char *name) const char *name)
{ {
GSList *elem = g_slist_find_custom(sdi->probes, name, GSList *elem = g_slist_find_custom(sdi->probes, name,
@ -60,7 +60,7 @@ static void teleinfo_send_value(struct sr_dev_inst *sdi, const char *probe_name,
struct dev_context *devc; struct dev_context *devc;
struct sr_datafeed_packet packet; struct sr_datafeed_packet packet;
struct sr_datafeed_analog analog; struct sr_datafeed_analog analog;
struct sr_probe *probe; struct sr_channel *probe;
devc = sdi->priv; devc = sdi->priv;
probe = teleinfo_find_probe(sdi, probe_name); probe = teleinfo_find_probe(sdi, probe_name);

View File

@ -51,7 +51,7 @@ static GSList *scan(GSList *options)
struct dev_context *devc; struct dev_context *devc;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_config *src; struct sr_config *src;
struct sr_probe *probe; struct sr_channel *probe;
GSList *devices, *l; GSList *devices, *l;
const char *conn, *serialcomm; const char *conn, *serialcomm;
struct sr_serial_dev_inst *serial; struct sr_serial_dev_inst *serial;

View File

@ -181,7 +181,7 @@ static GSList *scan(GSList *options, int dmm)
struct drv_context *drvc; struct drv_context *drvc;
struct sr_usb_dev_inst *usb; struct sr_usb_dev_inst *usb;
struct sr_config *src; struct sr_config *src;
struct sr_probe *probe; struct sr_channel *probe;
const char *conn; const char *conn;
drvc = udmms[dmm].di->priv; drvc = udmms[dmm].di->priv;

View File

@ -53,7 +53,7 @@ static GSList *scan(GSList *options)
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
struct sr_config *src; struct sr_config *src;
GSList *usb_devices, *devices, *l; GSList *usb_devices, *devices, *l;
int i; int i;

View File

@ -56,7 +56,7 @@ static GSList *scan(GSList *options)
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
struct libusb_device_descriptor des; struct libusb_device_descriptor des;
libusb_device **devlist; libusb_device **devlist;
GSList *devices; GSList *devices;

View File

@ -127,7 +127,7 @@ static int dev_close(struct sr_dev_inst *sdi);
static int configure_probes(const struct sr_dev_inst *sdi) static int configure_probes(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
const struct sr_probe *probe; const struct sr_channel *probe;
const GSList *l; const GSList *l;
int probe_bit, stage, i; int probe_bit, stage, i;
char *tc; char *tc;
@ -143,7 +143,7 @@ static int configure_probes(const struct sr_dev_inst *sdi)
stage = -1; stage = -1;
for (l = sdi->probes; l; l = l->next) { for (l = sdi->probes; l; l = l->next) {
probe = (struct sr_probe *)l->data; probe = (struct sr_channel *)l->data;
if (probe->enabled == FALSE) if (probe->enabled == FALSE)
continue; continue;
probe_bit = 1 << (probe->index); probe_bit = 1 << (probe->index);
@ -170,7 +170,7 @@ static int configure_probes(const struct sr_dev_inst *sdi)
{ {
struct dev_context *devc; struct dev_context *devc;
const GSList *l; const GSList *l;
const struct sr_probe *probe; const struct sr_channel *probe;
char *tc; char *tc;
int type; int type;
@ -178,7 +178,7 @@ static int configure_probes(const struct sr_dev_inst *sdi)
devc = sdi->priv; devc = sdi->priv;
for (l = sdi->probes; l; l = l->next) { for (l = sdi->probes; l; l = l->next) {
probe = (struct sr_probe *)l->data; probe = (struct sr_channel *)l->data;
if (probe->enabled == FALSE) if (probe->enabled == FALSE)
continue; continue;
@ -247,7 +247,7 @@ static int init(struct sr_context *sr_ctx)
static GSList *scan(GSList *options) static GSList *scan(GSList *options)
{ {
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
struct drv_context *drvc; struct drv_context *drvc;
struct dev_context *devc; struct dev_context *devc;
const struct zp_model *prof; const struct zp_model *prof;

View File

@ -45,7 +45,7 @@ static int format_match(const char *filename)
static int init(struct sr_input *in, const char *filename) static int init(struct sr_input *in, const char *filename)
{ {
struct sr_probe *probe; struct sr_channel *probe;
int num_probes, i; int num_probes, i;
char name[SR_MAX_PROBENAME_LEN + 1]; char name[SR_MAX_PROBENAME_LEN + 1];
char *param; char *param;

View File

@ -96,7 +96,7 @@ static int format_match(const char *filename)
static int init(struct sr_input *in, const char *filename) static int init(struct sr_input *in, const char *filename)
{ {
struct sr_probe *probe; struct sr_channel *probe;
int num_probes, i; int num_probes, i;
char name[SR_MAX_PROBENAME_LEN + 1]; char name[SR_MAX_PROBENAME_LEN + 1];
char *param; char *param;

View File

@ -432,7 +432,7 @@ static int init(struct sr_input *in, const char *filename)
GIOStatus status; GIOStatus status;
gsize i, term_pos; gsize i, term_pos;
char probe_name[SR_MAX_PROBENAME_LEN + 1]; char probe_name[SR_MAX_PROBENAME_LEN + 1];
struct sr_probe *probe; struct sr_channel *probe;
char **columns; char **columns;
gsize num_columns; gsize num_columns;
char *ptr; char *ptr;

View File

@ -287,7 +287,7 @@ static int format_match(const char *filename)
static int init(struct sr_input *in, const char *filename) static int init(struct sr_input *in, const char *filename)
{ {
struct sr_probe *probe; struct sr_channel *probe;
int num_probes, i; int num_probes, i;
char name[SR_MAX_PROBENAME_LEN + 1]; char name[SR_MAX_PROBENAME_LEN + 1];
char *param; char *param;

View File

@ -85,7 +85,7 @@ static int format_match(const char *filename)
static int init(struct sr_input *in, const char *filename) static int init(struct sr_input *in, const char *filename)
{ {
struct sr_probe *probe; struct sr_channel *probe;
struct context *ctx; struct context *ctx;
char buf[40], probename[8]; char buf[40], probename[8];
int i; int i;

View File

@ -232,7 +232,7 @@ enum {
SR_PROBE_SET_TRIGGER = 1 << 1, SR_PROBE_SET_TRIGGER = 1 << 1,
}; };
SR_PRIV struct sr_probe *sr_probe_new(int index, int type, SR_PRIV struct sr_channel *sr_probe_new(int index, int type,
gboolean enabled, const char *name); gboolean enabled, const char *name);
/* Generic device instances */ /* Generic device instances */

View File

@ -605,15 +605,15 @@ enum {
SR_PROBE_ANALOG, SR_PROBE_ANALOG,
}; };
/** Information on single probe. */ /** Information on single channel. */
struct sr_probe { struct sr_channel {
/** Number of probes, starting at 0. */ /** Number of channels, starting at 0. */
int index; int index;
/** Probe type (SR_PROBE_LOGIC, ...) */ /** Channel type (SR_PROBE_LOGIC, ...) */
int type; int type;
/** Is this probe enabled? */ /** Is this channel enabled? */
gboolean enabled; gboolean enabled;
/** Name of probe. */ /** Name of channel. */
char *name; char *name;
/** Trigger string, format like used by sigrok-cli */ /** Trigger string, format like used by sigrok-cli */
char *trigger; char *trigger;
@ -623,7 +623,7 @@ struct sr_probe {
struct sr_channel_group { struct sr_channel_group {
/** Name of the channel group. */ /** Name of the channel group. */
char *name; char *name;
/** List of sr_probe structs of the channels belonging to this group. */ /** List of sr_channel structs of the channels belonging to this group. */
GSList *channels; GSList *channels;
/** Private data for driver use. */ /** Private data for driver use. */
void *priv; void *priv;
@ -995,7 +995,7 @@ struct sr_dev_driver {
/** Probe status change. /** Probe status change.
* @see sr_dev_probe_enable(), sr_dev_trigger_set(). */ * @see sr_dev_probe_enable(), sr_dev_trigger_set(). */
int (*config_probe_set) (const struct sr_dev_inst *sdi, int (*config_probe_set) (const struct sr_dev_inst *sdi,
struct sr_probe *probe, unsigned int changes); struct sr_channel *probe, unsigned int changes);
/** Apply configuration settings to the device hardware. /** Apply configuration settings to the device hardware.
* @see sr_config_commit().*/ * @see sr_config_commit().*/
int (*config_commit) (const struct sr_dev_inst *sdi); int (*config_commit) (const struct sr_dev_inst *sdi);

View File

@ -34,7 +34,7 @@ struct context {
static int init(struct sr_output *o) static int init(struct sr_output *o)
{ {
struct context *ctx; struct context *ctx;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
sr_spew("Initializing output module."); sr_spew("Initializing output module.");
@ -210,7 +210,7 @@ static int receive(struct sr_output *o, const struct sr_dev_inst *sdi,
const struct sr_datafeed_packet *packet, GString **out) const struct sr_datafeed_packet *packet, GString **out)
{ {
const struct sr_datafeed_analog *analog; const struct sr_datafeed_analog *analog;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
const float *fdata; const float *fdata;
int i, p; int i, p;

View File

@ -84,7 +84,7 @@ static uint8_t samplerate_to_divcount(uint64_t samplerate)
static int init(struct sr_output *o) static int init(struct sr_output *o)
{ {
struct context *ctx; struct context *ctx;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
GVariant *gvar; GVariant *gvar;

View File

@ -50,7 +50,7 @@ struct context {
static int init(struct sr_output *o) static int init(struct sr_output *o)
{ {
struct context *ctx; struct context *ctx;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
GVariant *gvar; GVariant *gvar;
int num_probes; int num_probes;

View File

@ -51,7 +51,7 @@ static const char *gnuplot_header_comment = "\
static int init(struct sr_output *o) static int init(struct sr_output *o)
{ {
struct context *ctx; struct context *ctx;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
GVariant *gvar; GVariant *gvar;
uint64_t samplerate; uint64_t samplerate;

View File

@ -56,7 +56,7 @@ static int init(struct sr_output *o)
static GString *gen_header(const struct sr_dev_inst *sdi, struct context *ctx) static GString *gen_header(const struct sr_dev_inst *sdi, struct context *ctx)
{ {
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
GString *s; GString *s;
GVariant *gvar; GVariant *gvar;

View File

@ -74,7 +74,7 @@ SR_PRIV void flush_linebufs(struct context *ctx, uint8_t *outbuf)
SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode) SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode)
{ {
struct context *ctx; struct context *ctx;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
GVariant *gvar; GVariant *gvar;
uint64_t samplerate; uint64_t samplerate;

View File

@ -45,7 +45,7 @@ static const char *const vcd_header_comment =
static int init(struct sr_output *o) static int init(struct sr_output *o)
{ {
struct context *ctx; struct context *ctx;
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
GVariant *gvar; GVariant *gvar;
int num_probes, i; int num_probes, i;

View File

@ -113,7 +113,7 @@ SR_API int sr_session_load(const char *filename)
struct zip_file *zf; struct zip_file *zf;
struct zip_stat zs; struct zip_stat zs;
struct sr_dev_inst *sdi; struct sr_dev_inst *sdi;
struct sr_probe *probe; struct sr_channel *probe;
int ret, probenum, devcnt, i, j; int ret, probenum, devcnt, i, j;
uint64_t tmp_u64, total_probes, enabled_probes, p; uint64_t tmp_u64, total_probes, enabled_probes, p;
char **sections, **keys, *metafile, *val; char **sections, **keys, *metafile, *val;
@ -234,7 +234,7 @@ SR_API int sr_session_load(const char *filename)
SR_API int sr_session_save(const char *filename, const struct sr_dev_inst *sdi, SR_API int sr_session_save(const char *filename, const struct sr_dev_inst *sdi,
unsigned char *buf, int unitsize, int units) unsigned char *buf, int unitsize, int units)
{ {
struct sr_probe *probe; struct sr_channel *probe;
GSList *l; GSList *l;
GVariant *gvar; GVariant *gvar;
uint64_t samplerate; uint64_t samplerate;

View File

@ -381,7 +381,7 @@ SR_API char **sr_parse_triggerstring(const struct sr_dev_inst *sdi,
{ {
GSList *l; GSList *l;
GVariant *gvar; GVariant *gvar;
struct sr_probe *probe; struct sr_channel *probe;
int max_probes, probenum, i; int max_probes, probenum, i;
char **tokens, **triggerlist, *trigger, *tc; char **tokens, **triggerlist, *trigger, *tc;
const char *trigger_types; const char *trigger_types;
@ -406,7 +406,7 @@ SR_API char **sr_parse_triggerstring(const struct sr_dev_inst *sdi,
for (i = 0; tokens[i]; i++) { for (i = 0; tokens[i]; i++) {
probenum = -1; probenum = -1;
for (l = sdi->probes; l; l = l->next) { for (l = sdi->probes; l; l = l->next) {
probe = (struct sr_probe *)l->data; probe = (struct sr_channel *)l->data;
if (probe->enabled if (probe->enabled
&& !strncmp(probe->name, tokens[i], && !strncmp(probe->name, tokens[i],
strlen(probe->name))) { strlen(probe->name))) {

View File

@ -213,7 +213,7 @@ void srtest_buf_to_file(const char *filename, const uint8_t *buf, uint64_t len)
GArray *srtest_get_enabled_logic_probes(const struct sr_dev_inst *sdi) GArray *srtest_get_enabled_logic_probes(const struct sr_dev_inst *sdi)
{ {
struct sr_probe *probe; struct sr_channel *probe;
GArray *probes; GArray *probes;
GSList *l; GSList *l;