]> sigrok.org Git - libsigrok.git/blobdiff - bindings/cxx/include/libsigrok/libsigrok.hpp
C++: Fix management of SessionDevice objects.
[libsigrok.git] / bindings / cxx / include / libsigrok / libsigrok.hpp
index 2deb6175b7ae526868ca7765868e128cd6e6fb2d..0bf19015b22bee0d0068983d7fcfacd0d9b86504 100644 (file)
@@ -354,6 +354,10 @@ public:
        string model();
        /** Version string for this device. */
        string version();
+       /** Serial number for this device. */
+       string serial_number();
+       /** Connection ID for this device. */
+       string connection_id();
        /** List of the channels available on this device. */
        vector<shared_ptr<Channel> > channels();
        /** Channel groups available on this device, indexed by name. */
@@ -664,8 +668,10 @@ protected:
        Session(shared_ptr<Context> context);
        Session(shared_ptr<Context> context, string filename);
        ~Session();
+       shared_ptr<Device> get_device(const struct sr_dev_inst *sdi);
        const shared_ptr<Context> _context;
-       map<const struct sr_dev_inst *, shared_ptr<Device> > _devices;
+       map<const struct sr_dev_inst *, SessionDevice *> _owned_devices;
+       map<const struct sr_dev_inst *, shared_ptr<Device> > _other_devices;
        vector<DatafeedCallbackData *> _datafeed_callbacks;
        map<shared_ptr<EventSource>, SourceCallbackData *> _source_callbacks;
        bool _saving;