Device::Device(shared_ptr<sigrok::Configurable> configurable) :
configurable_(configurable)
{
- assert(configurable);
+ std::map< const ConfigKey*, std::set<Capability> > keys;
- for (auto entry : configurable->config_keys(ConfigKey::DEVICE_OPTIONS)) {
+ try {
+ keys = configurable->config_keys(ConfigKey::DEVICE_OPTIONS);
+ } catch (const Error) {
+ return;
+ }
+
+ for (auto entry : keys) {
auto key = entry.first;
auto capabilities = entry.second;
case SR_CONF_EXTERNAL_CLOCK:
case SR_CONF_RLE:
+ case SR_CONF_POWER_OFF:
bind_bool(name, get, set);
break;
bind_enum(name, key, capabilities, get, set, print_voltage_threshold);
break;
+ case SR_CONF_PROBE_FACTOR:
+ bind_int(name, "", pair<int64_t, int64_t>(1, 500), get, set);
+ break;
+
default:
break;
}