Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liiio master merge to dev + dynamic/scan rework #793

Merged
merged 3 commits into from
Feb 25, 2022

Conversation

pcercuei
Copy link
Contributor

This PR merges the recent work done on the scan feature in the master branch (#791).

The merge commit rewrites a good part of the code, since the scan code had been updated heavily in the dev branch.

On top of the merge, two commits were added:

  • one commit that rework the handling of plug-ins, which makes it easier to use in other parts of the code;
  • one commit that makes scanning possible with plug-ins, and in the case where no backends list was provided, makes libiio scan on all available backends instead of having a hardcoded list.

@pcercuei pcercuei changed the base branch from master to dev February 18, 2022 12:15
@pcercuei pcercuei force-pushed the pcercuei/dev-rework-scan branch 2 times, most recently from 485687d to cbf83dc Compare February 18, 2022 13:28
@pcercuei
Copy link
Contributor Author

I'm not sure what's going on, it builds fine on Windows here. Looks like the CI doesn't even attempt to build the library, and jumps straight to building the C# bindings.

@rgetz
Copy link
Contributor

rgetz commented Feb 21, 2022

yeah, I dno't know why Windows doesn't build properly...

-Robin

@pcercuei pcercuei force-pushed the pcercuei/dev-rework-scan branch 6 times, most recently from f971a89 to 8632412 Compare February 24, 2022 14:48
Instead of using the 'struct iio_module' as an opaque pointer directly
to the underlying platform-specific type, make it a real object.

This has the benefit of providing a better API: one function to create
the iio_module, one to destroy it, and one function to get the
iio_backend from the iio_module.

The platform-specific functions are now called iio_dlopen, iio_dlclose,
and iio_dlsym, so that the old function names can be reused by the new
code.

Signed-off-by: Paul Cercueil <[email protected]>
@pcercuei pcercuei force-pushed the pcercuei/dev-rework-scan branch from 8632412 to b3bda0d Compare February 24, 2022 16:09
Since the latest merge of libiio master it was possible to specify the
list of backends to scan, but this only worked with the built-in
backends. With this commit, when a requested backend is not built-in, it
will be attempted to be loaded from the corresponding module.

Additionally, since commit 163f9a5 ("scan: Fix default backends list
containing disabled backends") we have a list of all the enabled
backends, built-in or modules; so all of our installed modules will be
scanned by default, and it makes no sense to call iio_dynamic_scan()
anymore.

Signed-off-by: Paul Cercueil <[email protected]>
@pcercuei pcercuei force-pushed the pcercuei/dev-rework-scan branch from b3bda0d to 2390a7e Compare February 24, 2022 16:15
@pcercuei
Copy link
Contributor Author

Finally building under the CI. I'll merge it tomorrow if nothing else comes up before that.

The iio_dynamic_scan() function and all its dependencies are not needed
anymore, and can be safely dropped.

Signed-off-by: Paul Cercueil <[email protected]>
@pcercuei pcercuei force-pushed the pcercuei/dev-rework-scan branch from 2390a7e to f8b7c61 Compare February 25, 2022 10:32
@pcercuei pcercuei merged commit 46f760f into dev Feb 25, 2022
@pcercuei pcercuei deleted the pcercuei/dev-rework-scan branch February 25, 2022 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants