X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-cli.git;a=blobdiff_plain;f=sigrok-cli.h;h=6d635117f4eeee81ba085986ec0e99faece54b0a;hp=d231670d7babccb6bd80ac879b25d9b24cc3c85a;hb=37e4fcd41def785a6c9e658bfa28528216b03441;hpb=1e0f9ed9b98d05dad480098668882b554dbfd1d9 diff --git a/sigrok-cli.h b/sigrok-cli.h index d231670..6d63511 100644 --- a/sigrok-cli.h +++ b/sigrok-cli.h @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the sigrok-cli project. * * Copyright (C) 2011 Bert Vermeulen * @@ -20,15 +20,57 @@ #ifndef SIGROK_CLI_SIGROK_CLI_H #define SIGROK_CLI_SIGROK_CLI_H -/* sigrok-cli.c */ -int num_real_devs(void); +#include "config.h" +#ifdef HAVE_SRD +/* First, so we avoid a _POSIX_C_SOURCE warning. */ +#include +#endif +#include + +#define DEFAULT_OUTPUT_FORMAT "bits:width=64" + +/* main.c */ +int select_probes(struct sr_dev_inst *sdi); + +/* show.c */ +void show_version(void); +void show_dev_list(void); +void show_dev_detail(void); +void show_pd_detail(void); + +/* device.c */ +GSList *device_scan(void); +struct sr_probe_group *select_probe_group(struct sr_dev_inst *sdi); + +/* session.c */ +int setup_output_format(void); +void datafeed_in(const struct sr_dev_inst *sdi, + const struct sr_datafeed_packet *packet, void *cb_data); +int opt_to_gvar(char *key, char *value, struct sr_config *src); +int set_dev_options(struct sr_dev_inst *sdi, GHashTable *args); +void run_session(void); + +/* input.c */ +void load_input_file(void); + +/* decode.c */ +#ifdef HAVE_SRD +int register_pds(const char *opt_pds, char *opt_pd_annotations); +int setup_pd_stack(char *opt_pds, char *opt_pd_stack, char *opt_pd_annotations); +int setup_pd_annotations(char *opt_pd_annotations); +int setup_pd_meta(char *opt_pd_meta); +int setup_pd_binary(char *opt_pd_binary); +void show_pd_annotations(struct srd_proto_data *pdata, void *cb_data); +void show_pd_meta(struct srd_proto_data *pdata, void *cb_data); +void show_pd_binary(struct srd_proto_data *pdata, void *cb_data); +void map_pd_probes(struct sr_dev_inst *sdi); +#endif /* parsers.c */ -char **parse_probestring(int max_probes, const char *probestring); -char **sr_parse_triggerstring(struct sr_dev *dev, const char *triggerstring); -GHashTable *parse_generic_arg(const char *arg); -struct sr_dev *parse_devstring(const char *devstring); -uint64_t sr_parse_timestring(const char *timestring); +struct sr_probe *find_probe(GSList *probelist, const char *probename); +GSList *parse_probestring(struct sr_dev_inst *sdi, const char *probestring); +GHashTable *parse_generic_arg(const char *arg, gboolean sep_first); +int canon_cmp(const char *str1, const char *str2); /* anykey.c */ void add_anykey(void);