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

Add support for the signal scan, scan results, and transmit endpoints #11

Open
mr-ransel opened this issue Jul 16, 2023 · 1 comment
Open

Comments

@mr-ransel
Copy link

Bond's local API supports triggering scanning on demand for OOK signals as well as transmitting arbitrary data over OOK or (I think) GFSK.

I'm looking to build out support for these in the library and already got started on a PR, but before I submit it, I could use some feedback on different contracts:

Options:

  • Just separate async functions for begin scan, check current scan status, and get scan result data (this is the most flexible, but most annoying to use and wrap)
  • 1 function for "scan for signals (optional frequency specification), and async keep polling for the scan to complete, and then surface the resulting data" (this is easiest to use with a single call to gather signal data)
  • Hybrid approach: Separate functions for each endpoint/behavior, but create a helper/utility function that wraps them up into a single async call.

Any of these options would also include a dedicated endpoint for the transmit signal endpoint.

Any preferences on these 3 options?

@mr-ransel
Copy link
Author

I'll just open a PR sample with method 2, and if we'd rather decompose it, I can update it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant