From: Bert Vermeulen Date: Sun, 16 Aug 2015 23:43:22 +0000 (+0200) Subject: Add SR_T_MQLIST. X-Git-Tag: libsigrok-0.4.0~389 X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;h=a1f7c854c502cca8fe7e5576b9a01ad1086f9170;p=libsigrok.git 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. --- 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; }