X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdevices%2Fdevice.hpp;h=acc772ecc5eaab8aed2ccc746f0e9911cc42590b;hb=2b2d10621d5cfd4502fa7a0500170412a5b67941;hp=7e0b58ad065600bdc993751f343ff8eb348d4de1;hpb=b485408f20c39ae8d05372a5faffe15653c74705;p=pulseview.git diff --git a/pv/devices/device.hpp b/pv/devices/device.hpp index 7e0b58ad..acc772ec 100644 --- a/pv/devices/device.hpp +++ b/pv/devices/device.hpp @@ -25,6 +25,7 @@ #include namespace sigrok { +class ConfigKey; class Device; class Session; } // namespace sigrok @@ -47,6 +48,9 @@ public: std::shared_ptr device() const; + template + T read_config(const sigrok::ConfigKey *key, const T default_value = 0); + /** * Builds the full name. It only contains all the fields. */ @@ -60,7 +64,11 @@ public: virtual std::string display_name( const DeviceManager &device_manager) const = 0; - virtual void create() = 0; + virtual void open() = 0; + + virtual void close() = 0; + + virtual void start(); virtual void run();