check(sr_dev_channel_enable(parent->structure, structure->index, value));
}
+unsigned int Channel::get_index()
+{
+ return structure->index;
+}
+
ChannelGroup::ChannelGroup(Device *device,
struct sr_channel_group *structure) :
StructureWrapper<Device, struct sr_channel_group>(structure),
bool get_enabled();
/** Set the enabled status of this channel. */
void set_enabled(bool value);
+ /** Get the index number of this channel. */
+ unsigned int get_index();
protected:
Channel(struct sr_channel *structure);
~Channel();
%attributestring(sigrok::Channel, std::string, name, get_name, set_name);
%attribute(sigrok::Channel, bool, enabled, get_enabled, set_enabled);
%attribute(sigrok::Channel, const sigrok::ChannelType *, type, get_type);
+%attribute(sigrok::Channel, unsigned int, index, get_index);
%attributestring(sigrok::ChannelGroup, std::string, name, get_name);
%attributeval(sigrok::ChannelGroup,