PulseView  unreleased development snapshot
A Qt-based sigrok GUI
pv::DeviceManager Class Reference

#include <devicemanager.hpp>

Collaboration diagram for pv::DeviceManager:

Public Member Functions

 DeviceManager (shared_ptr< sigrok::Context > context, std::string driver, bool do_scan)
 
 ~DeviceManager ()=default
 
const shared_ptr< sigrok::Context > & context () const
 
shared_ptr< sigrok::Context > context ()
 
const list< shared_ptr< devices::HardwareDevice > > & devices () const
 
shared_ptr< devices::HardwareDeviceuser_spec_device () const
 
bool driver_supported (shared_ptr< sigrok::Driver > driver) const
 
list< shared_ptr< devices::HardwareDevice > > driver_scan (shared_ptr< sigrok::Driver > driver, map< const sigrok::ConfigKey *, Glib::VariantBase > drvopts)
 
const map< string, string > get_device_info (const shared_ptr< devices::Device > device)
 
const shared_ptr< devices::HardwareDevicefind_device_from_info (const map< string, string > search_info)
 

Protected Attributes

shared_ptr< sigrok::Context > context_
 
list< shared_ptr< devices::HardwareDevice > > devices_
 
shared_ptr< devices::HardwareDeviceuser_spec_device_
 

Private Member Functions

bool compare_devices (shared_ptr< devices::Device > a, shared_ptr< devices::Device > b)
 

Static Private Member Functions

static map< const ConfigKey *, Glib::VariantBase > drive_scan_options (vector< string > user_spec, set< const ConfigKey * > driver_opts)
 

Detailed Description

Definition at line 58 of file devicemanager.hpp.

Constructor & Destructor Documentation

pv::DeviceManager::DeviceManager ( shared_ptr< sigrok::Context >  context,
std::string  driver,
bool  do_scan 
)

Definition at line 60 of file devicemanager.cpp.

Here is the call graph for this function:

pv::DeviceManager::~DeviceManager ( )
default

Member Function Documentation

bool pv::DeviceManager::compare_devices ( shared_ptr< devices::Device a,
shared_ptr< devices::Device b 
)
private

Definition at line 354 of file devicemanager.cpp.

Here is the caller graph for this function:

const shared_ptr< sigrok::Context > & pv::DeviceManager::context ( ) const

Definition at line 152 of file devicemanager.cpp.

Here is the caller graph for this function:

shared_ptr< Context > pv::DeviceManager::context ( )

Definition at line 157 of file devicemanager.cpp.

const list< shared_ptr< devices::HardwareDevice > > & pv::DeviceManager::devices ( ) const

Definition at line 163 of file devicemanager.cpp.

Here is the caller graph for this function:

map< const ConfigKey *, Glib::VariantBase > pv::DeviceManager::drive_scan_options ( vector< string >  user_spec,
set< const ConfigKey * >  driver_opts 
)
staticprivate

Convert generic options to data types that are specific to Driver::scan().

Parameters
[in]user_specVector of tokenized words, string format.
[in]driver_optsDriver's scan options, result of Driver::scan_options().
Returns
Map of options suitable for Driver::scan().

Definition at line 186 of file devicemanager.cpp.

Here is the caller graph for this function:

list< shared_ptr< devices::HardwareDevice > > pv::DeviceManager::driver_scan ( shared_ptr< sigrok::Driver >  driver,
map< const sigrok::ConfigKey *, Glib::VariantBase >  drvopts 
)

Definition at line 241 of file devicemanager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

bool pv::DeviceManager::driver_supported ( shared_ptr< sigrok::Driver >  driver) const

Definition at line 227 of file devicemanager.cpp.

Here is the caller graph for this function:

const shared_ptr< devices::HardwareDevice > pv::DeviceManager::find_device_from_info ( const map< string, string >  search_info)

Definition at line 303 of file devicemanager.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

const map< string, string > pv::DeviceManager::get_device_info ( const shared_ptr< devices::Device device)

Definition at line 281 of file devicemanager.cpp.

Here is the caller graph for this function:

shared_ptr< devices::HardwareDevice > pv::DeviceManager::user_spec_device ( ) const

Get the device that was detected with user provided scan options.

Definition at line 172 of file devicemanager.cpp.

Here is the caller graph for this function:

Member Data Documentation

shared_ptr<sigrok::Context> pv::DeviceManager::context_
protected

Definition at line 94 of file devicemanager.hpp.

list< shared_ptr<devices::HardwareDevice> > pv::DeviceManager::devices_
protected

Definition at line 95 of file devicemanager.hpp.

shared_ptr<devices::HardwareDevice> pv::DeviceManager::user_spec_device_
protected

Definition at line 96 of file devicemanager.hpp.


The documentation for this class was generated from the following files: