From a1f7c854c502cca8fe7e5576b9a01ad1086f9170 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Mon, 17 Aug 2015 01:43:22 +0200 Subject: [PATCH] Add SR_T_MQLIST. This type consists of an array, with each item a two-member tuple, representing an MQ/MQflags pair: the first item is the MQ (type G_VARIANT_TYPE_UINT32), and the second is the MQ flags value (G_VARIANT_TYPE_UINT64). A GVariant of type SR_T_MQLIST can thus always represent more than one MQ/MQflag pair. --- include/libsigrok/libsigrok.h | 1 + src/hwdriver.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/libsigrok/libsigrok.h b/include/libsigrok/libsigrok.h index dc041322..0abf412f 100644 --- a/include/libsigrok/libsigrok.h +++ b/include/libsigrok/libsigrok.h @@ -149,6 +149,7 @@ enum sr_datatype { SR_T_UINT64_RANGE, SR_T_DOUBLE_RANGE, SR_T_INT32, + SR_T_MQLIST, }; /** Value for sr_datafeed_packet.type. */ diff --git a/src/hwdriver.c b/src/hwdriver.c index 37bab711..7c904547 100644 --- a/src/hwdriver.c +++ b/src/hwdriver.c @@ -295,6 +295,8 @@ SR_PRIV const GVariantType *sr_variant_type_get(int datatype) return G_VARIANT_TYPE_TUPLE; case SR_T_KEYVALUE: return G_VARIANT_TYPE_DICTIONARY; + case SR_T_MQLIST: + return G_VARIANT_TYPE_ARRAY; default: return NULL; }