feat: add TX writeStream with loopback buffer for TX→RX testing#3
Open
zsoerenm wants to merge 3 commits intoJuliaTelecom:mainfrom
Open
feat: add TX writeStream with loopback buffer for TX→RX testing#3zsoerenm wants to merge 3 commits intoJuliaTelecom:mainfrom
zsoerenm wants to merge 3 commits intoJuliaTelecom:mainfrom
Conversation
Adds full TX (transmit) support to the loopback driver with a shared ring buffer that allows data written to TX to appear on RX. This enables end-to-end testing of SDR applications without hardware. Changes: - Add writeStream implementation that copies data to loopback buffer - Add loopback ring buffer with mutex/condvar synchronization - Modify acquireReadBuffer to read from loopback buffer when enabled - Fix readStream to copy data to user's output buffer - Set getFullDuplex to return true for simultaneous TX/RX - Bump CMake minimum version to 3.10 The loopback assumes CF32 format (8 bytes per complex sample). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
In loopback mode, _loopback_count is already decremented in acquireReadBuffer, so releaseReadBuffer should not decrement _buf_count. This was causing counter underflow which led to memory corruption. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously the loopback only supported CF32 (hardcoded 8 bytes/sample). Now it stores the format from setupStream and uses the correct bytes per sample for CS8 (2), CS12 (3), CS16 (4), and CF32 (8). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds full TX (transmit) support to the loopback driver with a shared ring buffer that allows data written to TX to appear on RX. This enables end-to-end testing of SDR applications without hardware.
Changes:
🤖 Generated with Claude Code
I confirmed it works with SoapySDR