set_device(shared_ptr<device::DevInst>(device::File::create(name)));
}
+void SigSession::set_default_device()
+{
+ shared_ptr<pv::device::DevInst> default_device;
+ const list< shared_ptr<device::Device> > &devices =
+ _device_manager.devices();
+
+ if (!devices.empty()) {
+ // Fall back to the first device in the list.
+ default_device = devices.front();
+
+ // Try and find the demo device and select that by default
+ BOOST_FOREACH (shared_ptr<pv::device::Device> dev, devices)
+ if (strcmp(dev->dev_inst()->driver->name,
+ "demo") == 0) {
+ default_device = dev;
+ break;
+ }
+ }
+
+ set_device(default_device);
+}
+
void SigSession::release_device(device::DevInst *dev_inst)
{
(void)dev_inst;
capture_state_changed(state);
}
-void SigSession::set_default_device()
-{
- shared_ptr<pv::device::DevInst> default_device;
- const list< shared_ptr<device::Device> > &devices =
- _device_manager.devices();
-
- if (!devices.empty()) {
- // Fall back to the first device in the list.
- default_device = devices.front();
-
- // Try and find the demo device and select that by default
- BOOST_FOREACH (shared_ptr<pv::device::Device> dev, devices)
- if (strcmp(dev->dev_inst()->driver->name,
- "demo") == 0) {
- default_device = dev;
- break;
- }
- }
-
- set_device(default_device);
-}
-
void SigSession::update_signals(shared_ptr<device::DevInst> dev_inst)
{
assert(dev_inst);
void set_file(const std::string &name)
throw(QString);
+ void set_default_device();
+
void release_device(device::DevInst *dev_inst);
capture_state get_capture_state() const;
void update_signals(boost::shared_ptr<device::DevInst> dev_inst);
- void set_default_device();
-
boost::shared_ptr<view::Signal> signal_from_probe(
const sr_probe *probe) const;