waveform: Implement loading data into existing waveform #15
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.
What does this Pull Request accomplish?
Add
AnalogWaveform.load_data, which allows overwriting or reassigning the waveform data array.By default, this overwrites the waveform's data array (which might be backed by shared memory). If you specify
copy=False, it takes ownership of the passed-in array (this is zero copy, but doesn't reuse shared memory).You can specify an array subset using the
start_indexandsample_countparameters. I filed AB#3111366 - Consider removing start_index from AnalogWaveform API because I think we should revisit whether this is necessary once we have some run time with waveforms backed by shared memory.Why should this Pull Request be merged?
Closes AB#3106621 - Add load data into existing waveform
What testing has been done?
Ran unit tests.