projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CMakeLists.txt: Set CMake policy CMP0054 to NEW.
[pulseview.git]
/
pv
/
devicemanager.hpp
diff --git
a/pv/devicemanager.hpp
b/pv/devicemanager.hpp
index 8bceed34ff409d7a1a7769d0ad2c9c7fcf6a1f4f..92ed7dea5f85329567ca525ca2e955285df69212 100644
(file)
--- a/
pv/devicemanager.hpp
+++ b/
pv/devicemanager.hpp
@@
-14,8
+14,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PULSEVIEW_PV_DEVICEMANAGER_HPP
*/
#ifndef PULSEVIEW_PV_DEVICEMANAGER_HPP
@@
-24,7
+23,16
@@
#include <list>
#include <map>
#include <memory>
#include <list>
#include <map>
#include <memory>
+#include <set>
#include <string>
#include <string>
+#include <vector>
+
+using std::list;
+using std::map;
+using std::set;
+using std::shared_ptr;
+using std::string;
+using std::vector;
namespace Glib {
class VariantBase;
namespace Glib {
class VariantBase;
@@
-36,6
+44,8
@@
class Context;
class Driver;
}
class Driver;
}
+using sigrok::ConfigKey;
+
namespace pv {
namespace devices {
namespace pv {
namespace devices {
@@
-48,46
+58,40
@@
class Session;
class DeviceManager
{
public:
class DeviceManager
{
public:
- DeviceManager(std::shared_ptr<sigrok::Context> context);
-
- ~DeviceManager();
-
- const std::shared_ptr<sigrok::Context>& context() const;
+ DeviceManager(shared_ptr<sigrok::Context> context,
+ std::string driver, bool do_scan);
-
std::shared_ptr<sigrok::Context> context()
;
+
~DeviceManager() = default
;
- const std::list< std::shared_ptr<devices::HardwareDevice> >&
- devices() const;
+ const shared_ptr<sigrok::Context>& context() const;
- std::list< std::shared_ptr<devices::HardwareDevice> > driver_scan(
- std::shared_ptr<sigrok::Driver> driver,
- std::map<const sigrok::ConfigKey *, Glib::VariantBase> drvopts);
+ shared_ptr<sigrok::Context> context();
- const
std::map<std::string, std::string> get_device_info(
-
const std::shared_ptr<devices::Device> device)
;
+ const
list< shared_ptr<devices::HardwareDevice> >& devices() const;
+
shared_ptr<devices::HardwareDevice> user_spec_device() const
;
- const std::shared_ptr<devices::HardwareDevice> find_device_from_info(
- const std::map<std::string, std::string> search_info);
+ list< shared_ptr<devices::HardwareDevice> > driver_scan(
+ shared_ptr<sigrok::Driver> driver,
+ map<const sigrok::ConfigKey *, Glib::VariantBase> drvopts);
- void build_display_name(std::shared_ptr<devices::Device> device);
+ const map<string, string> get_device_info(
+ const shared_ptr<devices::Device> device);
- const std::string get_display_name(
- std::shared_ptr<devices::Device> dev);
-
- const std::string get_full_name(std::shared_ptr<devices::Device> dev);
-
- void update_display_name(std::shared_ptr<devices::Device> dev);
+ const shared_ptr<devices::HardwareDevice> find_device_from_info(
+ const map<string, string> search_info);
private:
private:
- bool compare_devices(s
td::s
hared_ptr<devices::Device> a,
- s
td::s
hared_ptr<devices::Device> b);
+ bool compare_devices(shared_ptr<devices::Device> a,
+ shared_ptr<devices::Device> b);
-protected:
- std::shared_ptr<sigrok::Context> context_;
-
std::list< std::shared_ptr<devices::HardwareDevice> > devices_
;
+ static map<const ConfigKey *, Glib::VariantBase>
+ drive_scan_options(vector<string> user_spec,
+
set<const ConfigKey *> driver_opts)
;
- std::map< std::shared_ptr<devices::Device>, std::string > display_names_;
- std::map< std::shared_ptr<devices::Device>, std::string > full_names_;
+protected:
+ shared_ptr<sigrok::Context> context_;
+ list< shared_ptr<devices::HardwareDevice> > devices_;
+ shared_ptr<devices::HardwareDevice> user_spec_device_;
};
} // namespace pv
};
} // namespace pv