This version (07 Mar 2017 08:38) was approved by Michael Hennerich.The Previously approved version (06 Mar 2017 22:56) is available.Diff

IIO Oscilliscope Internals

Making your own plugin for the IIO Oscilloscope.

libiio connect your C code to the IIO device (backed by the IIO device driver), but it does not automatically connect your code to a GTK widget.

That is the responsibility of iio_widget.c and iio_widget.h, which are exclusively part of the IIO oscilloscope project.

Those functions are called in the plugin file, normally in the init function. Calling these functions (with the right parameters) ensures that libiio will connect with the GTK widget.

The init function is called during the plugin load via the osc_plugin struct.

OSC Plugins are dynamically loaded (DL) libraries (.so or .dll). During OSC start-up each file under the plugin folder is accessed using the dlopen() API. Using dlsym(lib, “plugin”) the symbol to the osc_plugin structure is obtained. So each and every plugin is probed, weather or not the init() function is called depends on the return value of the identify() function call which takes place prior in time. Identify() is typically used to check the presence of a number of IIO devices required to a specific plugin to operate.

If you have any more detailed questions about how to write your own plugins for your own IIO devices, please ask on ADI's EngineerZone.

resources/tools-software/linux-software/iio_scope/internals.txt · Last modified: 07 Mar 2017 08:38 by Michael Hennerich