Check buffer data type in send_waveform#895
Closed
cyclic-pentane wants to merge 1 commit intoEttusResearch:masterfrom
Closed
Check buffer data type in send_waveform#895cyclic-pentane wants to merge 1 commit intoEttusResearch:masterfrom
cyclic-pentane wants to merge 1 commit intoEttusResearch:masterfrom
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
mbr0wn
requested changes
Feb 20, 2026
| """ | ||
|
|
||
| # Check if waveform_proto has the correct data type | ||
| if waveform_proto.dtype != np.complex64: |
Contributor
There was a problem hiding this comment.
@cyclic-pentane If the user specified a custom streamer, the correct type might be different than fc32 (e.g., it could be sc16). This check is sensible, but it has to pull the correct data type out of the streamer.
Contributor
There was a problem hiding this comment.
...a quick glance at the code didn't immediately give me a good suggestion how to do this, tbh.
Contributor
|
Until we have a good way of ensuring the user really wanted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Details
Description
Previously, the function
MultiUSRP.send_waveformdid not check the data type of the provided buffer, which made the SDR transmit garbage if e.g.np.complex128buffers were passed. This PR adds in a simple type check.Related Issue
n/a
Which devices/areas does this affect?
All of them as far as I can tell.
Testing Done
Tried passing a
np.complex64buffer tosend_waveform, which still works. Then, I tried passing anp.complex128one, which makesuhdcomplain.Checklist
MPM compat, noc_shell, specific RFNoC block, ...)