libiio icon indicating copy to clipboard operation
libiio copied to clipboard

Better backend API

Open pcercuei opened this issue 1 year ago • 2 comments

Modify/add functions:

  • iio_context_add_device, which will create a iio_device and add it to the context;
  • iio_device_add_channel, which will create a iio_channel and add it to the device;
  • The functions iio_{context,device,channel}_add_attr to add attributes to contexts/devices/channels are now backend API
  • iio_create_context_from_backend now takes a few extra parameters that will be used to create the iio_context.

With these changes, the XML backend was updated to be fully implemented on top of the public API (be it iio.h or iio-backend.h) and does not use iio-private.h anymore.

In theory, the local backend could do that too but it's a lot more work (due to how it currently creates the context).

The code should be considered very experimental, it was not thoroughly tested.

pcercuei avatar Jan 31 '24 10:01 pcercuei

@pcercuei you may merge this

buha avatar Feb 05 '24 08:02 buha

Only people from ADI can merge 🙃

pcercuei avatar Feb 05 '24 09:02 pcercuei

Gentle ping.

pcercuei avatar Mar 08 '24 23:03 pcercuei