]> sigrok.org Git - sigrok-cli.git/blobdiff - options.c
decode: Optionally print sample numbers with protocol decoder annotations
[sigrok-cli.git] / options.c
index ca16e4c18a386f88981379b8853474d2aad93361..49e3edf349030bbeb63d7755bf4b2a6fe49ef679 100644 (file)
--- a/options.c
+++ b/options.c
@@ -38,6 +38,7 @@ gchar **opt_pds = NULL;
 gchar *opt_pd_annotations = NULL;
 gchar *opt_pd_meta = NULL;
 gchar *opt_pd_binary = NULL;
+gboolean opt_pd_samplenum = FALSE;
 #endif
 gchar *opt_input_format = NULL;
 gchar *opt_output_format = NULL;
@@ -134,6 +135,8 @@ static const GOptionEntry optargs[] = {
                        "Protocol decoder meta output to show", NULL},
        {"protocol-decoder-binary", 'B', 0, G_OPTION_ARG_CALLBACK, &check_opt_pd_binary,
                        "Protocol decoder binary output to show", NULL},
+       {"protocol-decoder-samplenum", 0, 0, G_OPTION_ARG_NONE, &opt_pd_samplenum,
+                       "Show sample numbers in protocol decoder output", NULL},
 #endif
        {"scan", 0, 0, G_OPTION_ARG_NONE, &opt_scan_devs,
                        "Scan for devices", NULL},