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

Feature suggestion: libuhd providing Asio style "sockets" #648

Open
pfeatherstone opened this issue Dec 16, 2022 · 1 comment
Open

Feature suggestion: libuhd providing Asio style "sockets" #648

pfeatherstone opened this issue Dec 16, 2022 · 1 comment

Comments

@pfeatherstone
Copy link

Wouldn't it be cool if libuhd provided an Asio API for both TX and RX streaming. Meaning you could have function like:

  • device.async_connect()
  • device.async_write()
  • device.async_read()
  • device.async_set_freq()
  • ...

Where device is an Asio object that both controls a usrp device and satisfies the requirements of an Asio "socket".
I imagine those async functions would themselves be composed operations a bit like how http::async_read() and http:async_write() are composed functions in boost::Beast. But the threading would be down to the user to manage, just like all Asio applications. More importantly, setting up logical loops would be quite easy and nice, following the Asio state-machine style of coding, which is fantastic.

@pfeatherstone
Copy link
Author

To be honest, it would be cool if libiio was integrated into Asio, then libuhd could wrap asio-libiio. FYI. I'm not going to submit a PR. Just throwing ideas.

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

No branches or pull requests

2 participants