projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #605 by closing current device when another is selected
[pulseview.git]
/
pv
/
devices
/
device.hpp
diff --git
a/pv/devices/device.hpp
b/pv/devices/device.hpp
index 7e0b58ad065600bdc993751f343ff8eb348d4de1..acc772ecc5eaab8aed2ccc746f0e9911cc42590b 100644
(file)
--- a/
pv/devices/device.hpp
+++ b/
pv/devices/device.hpp
@@
-25,6
+25,7
@@
#include <string>
namespace sigrok {
#include <string>
namespace sigrok {
+class ConfigKey;
class Device;
class Session;
} // namespace sigrok
class Device;
class Session;
} // namespace sigrok
@@
-47,6
+48,9
@@
public:
std::shared_ptr<sigrok::Device> device() const;
std::shared_ptr<sigrok::Device> device() const;
+ template<typename T>
+ T read_config(const sigrok::ConfigKey *key, const T default_value = 0);
+
/**
* Builds the full name. It only contains all the fields.
*/
/**
* 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 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();
virtual void run();