]> sigrok.org Git - libsigrok.git/blobdiff - bindings/cxx/classes.cpp
bindings: Add Channel::get_index() method.
[libsigrok.git] / bindings / cxx / classes.cpp
index 044e8c4565b706e997ea95a84c8f72caff9a4ec3..0d306a97848b444a04751a279a48188ea77cf913 100644 (file)
@@ -482,6 +482,11 @@ void Channel::set_enabled(bool value)
        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),