]> sigrok.org Git - libsigrok.git/commitdiff
Add serial_num and connection_id fields to sr_dev_inst
authorSoeren Apel <redacted>
Tue, 23 Sep 2014 15:43:27 +0000 (17:43 +0200)
committerBert Vermeulen <redacted>
Tue, 23 Sep 2014 22:40:03 +0000 (00:40 +0200)
include/libsigrok/libsigrok.h
src/device.c

index 4f3510d8c6569f3b52e3aad2d37fd28c1cd6397b..655a4a0ad93a7cc54e4976c8904ba2ee1f27df18 100644 (file)
@@ -868,6 +868,10 @@ struct sr_dev_inst {
        char *model;
        /** Device version. */
        char *version;
+       /** Serial number. */
+       char *serial_num;
+       /** Connection string to uniquely identify devices. */
+       char *connection_id;
        /** List of channels. */
        GSList *channels;
        /** List of sr_channel_group structs */
index a331536c733b9c82fff8cede49025e45e30026de..054c7347f91308f22bb4422cf41e66f6e0910112 100644 (file)
@@ -230,6 +230,8 @@ SR_PRIV struct sr_dev_inst *sr_dev_inst_new(int index, int status,
        sdi->vendor = vendor ? g_strdup(vendor) : NULL;
        sdi->model = model ? g_strdup(model) : NULL;
        sdi->version = version ? g_strdup(version) : NULL;
+       sdi->serial_num = NULL;
+       sdi->connection_id = NULL;
        sdi->channels = NULL;
        sdi->channel_groups = NULL;
        sdi->session = NULL;
@@ -262,6 +264,8 @@ SR_PRIV void sr_dev_inst_free(struct sr_dev_inst *sdi)
        g_free(sdi->vendor);
        g_free(sdi->model);
        g_free(sdi->version);
+       g_free(sdi->serial_num);
+       g_free(sdi->connection_id);
        g_free(sdi);
 }