]> sigrok.org Git - libsigrokdecode.git/blobdiff - libsigrokdecode.h.in
Use OUTPUT_BINARY with four classes.
[libsigrokdecode.git] / libsigrokdecode.h.in
index cec6def197b598680fef718619c49379869c66c7..b75942808e2421207df994e49014263d7a43dc34 100644 (file)
@@ -162,6 +162,7 @@ enum {
        SRD_OUTPUT_ANN,
        SRD_OUTPUT_PYTHON,
        SRD_OUTPUT_BINARY,
+       SRD_OUTPUT_META,
 };
 
 #define SRD_MAX_NUM_PROBES 64
@@ -201,6 +202,12 @@ struct srd_decoder {
         */
        GSList *annotations;
 
+       /**
+        * List of NULL-terminated char[], containing descriptions of the
+        * supported binary output.
+        */
+       GSList *binary;
+
        /** List of decoder options.  */
        GSList *options;
 
@@ -249,15 +256,27 @@ struct srd_pd_output {
        int output_type;
        struct srd_decoder_inst *di;
        char *proto_id;
+       /* Only used for OUTPUT_META. */
+       const GVariantType *meta_type;
+       char *meta_name;
+       char *meta_descr;
 };
 
 struct srd_proto_data {
        uint64_t start_sample;
        uint64_t end_sample;
        struct srd_pd_output *pdo;
-       int ann_format;
        void *data;
 };
+struct srd_proto_data_annotation {
+       int ann_format;
+       char **ann_text;
+};
+struct srd_proto_data_binary {
+       int bin_class;
+       uint64_t size;
+       const unsigned char *data;
+};
 
 typedef void (*srd_pd_output_callback_t)(struct srd_proto_data *pdata,
                                         void *cb_data);