return s.str();
}
+bool Device::is_trigger_enabled() const
+{
+ assert(_sdi);
+ for (const GSList *l = _sdi->probes; l; l = l->next) {
+ const sr_probe *const p = (const sr_probe *)l->data;
+ assert(p);
+ if (p->trigger && p->trigger[0] != '\0')
+ return true;
+ }
+ return false;
+}
+
} // device
} // pv
std::string format_device_title() const;
+ bool is_trigger_enabled() const;
+
private:
sr_dev_inst *const _sdi;
};
return sample_limit;
}
+bool DevInst::is_trigger_enabled() const
+{
+ return false;
+}
+
} // device
} // pv
*/
uint64_t get_sample_limit();
+ virtual bool is_trigger_enabled() const;
+
signals:
void config_changed();
signals_changed();
}
-bool SigSession::is_trigger_enabled() const
-{
- assert(_dev_inst);
- assert(_dev_inst->dev_inst());
- for (const GSList *l = _dev_inst->dev_inst()->probes; l; l = l->next) {
- const sr_probe *const p = (const sr_probe *)l->data;
- assert(p);
- if (p->trigger && p->trigger[0] != '\0')
- return true;
- }
-
- return false;
-}
-
shared_ptr<view::Signal> SigSession::signal_from_probe(
const sr_probe *probe) const
{
return;
}
- set_capture_state(is_trigger_enabled() ? AwaitingTrigger : Running);
+ set_capture_state(dev_inst->is_trigger_enabled() ?
+ AwaitingTrigger : Running);
sr_session_run();
sr_session_destroy();
void update_signals(boost::shared_ptr<device::DevInst> dev_inst);
- bool is_trigger_enabled() const;
-
boost::shared_ptr<view::Signal> signal_from_probe(
const sr_probe *probe) const;