Skip to content

Conversation

@dNechita
Copy link
Contributor

PR Description

These modifications involve restructuring the internal workings of the C# ScanContext bindings to ensure the following:

  • Unmanaged resources originating from libiio are properly deallocated.
  • Exceptions are thrown when unexpected behavior occurs.

Additionally, include a C# example demonstrating how to use the ScanContext bindings.

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have commented new code, particulary complex or unclear areas
  • I have checked that I did not intoduced new warnings or errors (CI output)
  • I have checked that components that use libiio did not get broken
  • I have updated the documentation accordingly (GitHub Pages, READMEs, etc)

Avoid keeping a pointer to a scan block that was never destroyed, either
at the end of the ScanContext object's lifecycle or when calling any of
the 'get_dns_sd_backend_contexts', 'get_usb_backend_contexts', or
'get_local_backend_contexts' functions. These functions replace the
pointer with a new one, leaving the old pointer undestroyed.

Signed-off-by: Dan Nechita <[email protected]>
Don't ignore when unable to create a scan block. There is no point in
going further if the scan block cannot be created.

Signed-off-by: Dan Nechita <[email protected]>
Provide an example of how to scan for usb, network and local backends
using the iio scan blocks.

Signed-off-by: Dan Nechita <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants