void Channel::set_name(string name)
{
- check(sr_dev_channel_name_set(_parent->_structure,
- _structure->index, name.c_str()));
+ check(sr_dev_channel_name_set(_structure, name.c_str()));
}
const ChannelType *Channel::type()
void Channel::set_enabled(bool value)
{
- check(sr_dev_channel_enable(_parent->_structure, _structure->index, value));
+ check(sr_dev_channel_enable(_structure, value));
}
unsigned int Channel::index()
return valid_string(sr_output_description_get(_structure));
}
+vector<string> OutputFormat::extensions()
+{
+ vector<string> exts;
+ for (const char *const *e = sr_output_extensions_get(_structure);
+ e && *e; e++)
+ exts.push_back(*e);
+ return exts;
+}
+
map<string, shared_ptr<Option>> OutputFormat::options()
{
const struct sr_option **options = sr_output_options_get(_structure);