#define PULSEVIEW_PV_DEVICES_DEVICE_HPP
#include <memory>
-
+#include <string>
namespace sigrok {
+class ConfigKey;
class Device;
class Session;
} // namespace sigrok
namespace pv {
+
+class DeviceManager;
+
namespace devices {
class Device
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.
+ */
+ virtual std::string full_name() const = 0;
+
+ /**
+ * Builds the display name. It only contains fields as required.
+ * @param device_manager a reference to the device manager is needed
+ * so that other similarly titled devices can be detected.
+ */
+ virtual std::string display_name(
+ const DeviceManager &device_manager) const = 0;
+
virtual void create() = 0;
+ virtual void start();
+
virtual void run();
virtual void stop();