void device_probe_clear(struct sr_device *device, int probenum)
{
- struct probe *p;
+ struct sr_probe *p;
p = probe_find(device, probenum);
if (!p)
void device_probe_add(struct sr_device *device, char *name)
{
- struct probe *p;
+ struct sr_probe *p;
char probename[16];
int probenum;
probenum = g_slist_length(device->probes) + 1;
- p = g_malloc0(sizeof(struct probe));
+ p = g_malloc0(sizeof(struct sr_probe));
p->index = probenum;
p->enabled = TRUE;
if (name) {
device->probes = g_slist_append(device->probes, p);
}
-struct probe *probe_find(struct sr_device *device, int probenum)
+struct sr_probe *probe_find(struct sr_device *device, int probenum)
{
GSList *l;
- struct probe *p, *found_probe;
+ struct sr_probe *p, *found_probe;
found_probe = NULL;
for (l = device->probes; l; l = l->next) {
/* TODO: return SIGROK_ERR if probenum not found */
void device_probe_name(struct sr_device *device, int probenum, char *name)
{
- struct probe *p;
+ struct sr_probe *p;
p = probe_find(device, probenum);
if (!p)
/* TODO: return SIGROK_ERR if probenum not found */
void device_trigger_clear(struct sr_device *device)
{
- struct probe *p;
+ struct sr_probe *p;
unsigned int pnum;
if (!device->probes)
/* TODO: return SIGROK_ERR if probenum not found */
void device_trigger_set(struct sr_device *device, int probenum, char *trigger)
{
- struct probe *p;
+ struct sr_probe *p;
p = probe_find(device, probenum);
if (!p)
static int configure_probes(struct sr_device_instance *sdi, GSList *probes)
{
struct sigma *sigma = sdi->priv;
- struct probe *probe;
+ struct sr_probe *probe;
GSList *l;
int trigger_set = 0;
int probebit;
memset(&sigma->trigger, 0, sizeof(struct sigma_trigger));
for (l = probes; l; l = l->next) {
- probe = (struct probe *)l->data;
+ probe = (struct sr_probe *)l->data;
probebit = 1 << (probe->index - 1);
if (!probe->enabled || !probe->trigger)
static int configure_probes(GSList *probes)
{
- struct probe *probe;
+ struct sr_probe *probe;
GSList *l;
int probe_bit, stage, i;
char *tc;
num_stages = 0;
for (l = probes; l; l = l->next) {
- probe = (struct probe *)l->data;
+ probe = (struct sr_probe *)l->data;
if (!probe->enabled)
continue;
static int configure_probes(GSList *probes)
{
- struct probe *probe;
+ struct sr_probe *probe;
GSList *l;
int probe_bit, stage, i;
char *tc;
stage = -1;
for (l = probes; l; l = l->next) {
- probe = (struct probe *)l->data;
+ probe = (struct sr_probe *)l->data;
if (probe->enabled == FALSE)
continue;
probe_bit = 1 << (probe->index - 1);
static int configure_probes(GSList *probes)
{
- struct probe *probe;
+ struct sr_probe *probe;
GSList *l;
int probe_bit, stage, i;
char *tc;
stage = -1;
for (l = probes; l; l = l->next) {
- probe = (struct probe *)l->data;
+ probe = (struct sr_probe *)l->data;
if (probe->enabled == FALSE)
continue;
probe_bit = 1 << (probe->index - 1);
static int init(struct sr_output *o, int default_spl, enum outputmode mode)
{
struct context *ctx;
- struct probe *probe;
+ struct sr_probe *probe;
GSList *l;
uint64_t samplerate;
int num_probes;
static int init(struct sr_output *o)
{
struct context *ctx;
- struct probe *probe;
+ struct sr_probe *probe;
GSList *l;
uint64_t samplerate;
unsigned int i;
static int analog_init(struct sr_output *o)
{
struct context *ctx;
- struct probe *probe;
+ struct sr_probe *probe;
GSList *l;
uint64_t samplerate;
unsigned int i;
static int init(struct sr_output *o)
{
struct context *ctx;
- struct probe *probe;
+ struct sr_probe *probe;
GSList *l;
int num_enabled_probes;
static int init(struct sr_output *o)
{
struct context *ctx;
- struct probe *probe;
+ struct sr_probe *probe;
GSList *l;
int num_probes, i;
char *samplerate_s, *frequency_s, *timestamp;
int init(struct sr_output *o, int default_spl, enum outputmode mode)
{
struct context *ctx;
- struct probe *probe;
+ struct sr_probe *probe;
GSList *l;
uint64_t samplerate;
int num_probes;
struct zip_stat zs;
struct session *session;
struct sr_device *device;
- struct probe *probe;
+ struct sr_probe *probe;
int ret, err, probenum, devcnt, i, j;
uint64_t tmp_u64, total_probes, enabled_probes, p;
char **sections, **keys, *metafile, *val, c;
GSList *l, *p, *d;
FILE *meta;
struct sr_device *device;
- struct probe *probe;
+ struct sr_probe *probe;
struct datastore *ds;
struct zip *zipfile;
struct zip_source *versrc, *metasrc, *logicsrc;
void device_probe_clear(struct sr_device *device, int probenum);
void device_probe_add(struct sr_device *device, char *name);
-struct probe *probe_find(struct sr_device *device, int probenum);
+struct sr_probe *probe_find(struct sr_device *device, int probenum);
void device_probe_name(struct sr_device *device, int probenum, char *name);
void device_trigger_clear(struct sr_device *device);
struct sr_device_plugin *plugin;
/* A plugin may handle multiple devices of the same type */
int plugin_index;
- /* List of struct probe* */
+ /* List of struct sr_probe* */
GSList *probes;
/* Data acquired by this device, if any */
struct datastore *datastore;
SR_PROBE_TYPE_ANALOG,
};
-struct probe {
+struct sr_probe {
int index;
int type;
gboolean enabled;
char **sr_parse_triggerstring(struct sr_device *device, const char *triggerstring)
{
GSList *l;
- struct probe *probe;
+ struct sr_probe *probe;
int max_probes, probenum, i;
char **tokens, **triggerlist, *trigger, *tc, *trigger_types;
gboolean error;
/* Named probe */
probenum = 0;
for (l = device->probes; l; l = l->next) {
- probe = (struct probe *)l->data;
+ probe = (struct sr_probe *)l->data;
if (probe->enabled
&& !strncmp(probe->name, tokens[i],
strlen(probe->name))) {