Ria Composer Support #23

Merged
benchinnery merged 3 commits from zfp-oss into main 2026-04-17 10:11:56 -04:00
Owner

Adds SDR-to-SDR transmission support via a three-machine architecture (hub supervisor → Rx agent → Tx machine over SSH + ZMQ), along with a full test suite for the new remote control module.

ria_toolkit_oss/remote_control/ (new package)
remote_transmitter.py — Server-side ZMQ REP socket server that runs on the Tx machine. Accepts JSON-RPC commands (set_radio, init_tx, transmit, stop) and dispatches them to the appropriate SDR driver (PlutoSDR, USRP, HackRF, BladeRF) via dynamic import.
remote_transmitter_controller.py — Client-side controller that runs on the Rx machine. SSH-es into the Tx machine to start the ZMQ server, then sends commands over ZMQ. transmit_async() starts transmission in a background thread so the Rx machine can record concurrently.

orchestration/campaign.py
TransmitterConfig gains an sdr_remote: Optional[dict] field, parsed from the campaign config. Holds SSH credentials and SDR identifier for remote Tx machines.

orchestration/executor.py
CampaignExecutor now handles control_method: "sdr_remote" transmitters:
_init_remote_tx_controllers() — opens SSH + ZMQ connections and calls set_radio() for each remote Tx before the campaign loop starts.
_start_transmitter() — calls init_tx() then transmit_async(duration + 1s buffer) so the Tx is running before the Rx starts recording.
_stop_transmitter() — calls wait_transmit(timeout=duration + 10s) to synchronise after recording.
_close_remote_tx_controllers() — tears down all connections in the finally block, even if one fails.

Tests (tests/remote_control/, 88 tests)
test_remote_transmitter.py — all SDR aliases, guards, dispatcher, response envelope
test_remote_transmitter_controller.py — SSH/ZMQ setup, message format, error handling, transmit_async non-blocking guarantee, teardown
test_sdr_remote_integration.py — TransmitterConfig parsing, CampaignConfig round-trip (dict and YAML), executor init/start/stop/close for single and multiple controllers, mixed campaigns, exact timing buffers

All SDR driver patches use sys.modules injection so the tests run in any environment regardless of which hardware packages are installed. paramiko and zmq are lazy-imported at connection time rather than at module import time.

Adds SDR-to-SDR transmission support via a three-machine architecture (hub supervisor → Rx agent → Tx machine over SSH + ZMQ), along with a full test suite for the new remote control module. **ria_toolkit_oss/remote_control/ (new package)** remote_transmitter.py — Server-side ZMQ REP socket server that runs on the Tx machine. Accepts JSON-RPC commands (set_radio, init_tx, transmit, stop) and dispatches them to the appropriate SDR driver (PlutoSDR, USRP, HackRF, BladeRF) via dynamic import. remote_transmitter_controller.py — Client-side controller that runs on the Rx machine. SSH-es into the Tx machine to start the ZMQ server, then sends commands over ZMQ. transmit_async() starts transmission in a background thread so the Rx machine can record concurrently. **orchestration/campaign.py** TransmitterConfig gains an sdr_remote: Optional[dict] field, parsed from the campaign config. Holds SSH credentials and SDR identifier for remote Tx machines. **orchestration/executor.py** CampaignExecutor now handles control_method: "sdr_remote" transmitters: _init_remote_tx_controllers() — opens SSH + ZMQ connections and calls set_radio() for each remote Tx before the campaign loop starts. _start_transmitter() — calls init_tx() then transmit_async(duration + 1s buffer) so the Tx is running before the Rx starts recording. _stop_transmitter() — calls wait_transmit(timeout=duration + 10s) to synchronise after recording. _close_remote_tx_controllers() — tears down all connections in the finally block, even if one fails. **Tests (tests/remote_control/, 88 tests)** test_remote_transmitter.py — all SDR aliases, guards, dispatcher, response envelope test_remote_transmitter_controller.py — SSH/ZMQ setup, message format, error handling, transmit_async non-blocking guarantee, teardown test_sdr_remote_integration.py — TransmitterConfig parsing, CampaignConfig round-trip (dict and YAML), executor init/start/stop/close for single and multiple controllers, mixed campaigns, exact timing buffers All SDR driver patches use sys.modules injection so the tests run in any environment regardless of which hardware packages are installed. paramiko and zmq are lazy-imported at connection time rather than at module import time.
benchinnery added 1 commit 2026-04-17 09:44:25 -04:00
ria composer support
Some checks failed
Build Sphinx Docs Set / Build Docs (pull_request) Successful in 18s
Test with tox / Test with tox (3.10) (pull_request) Failing after 8m47s
Build Project / Build Project (3.10) (pull_request) Successful in 9m5s
Build Project / Build Project (3.12) (pull_request) Successful in 9m3s
Build Project / Build Project (3.11) (pull_request) Successful in 9m5s
Test with tox / Test with tox (3.11) (pull_request) Failing after 9m16s
Test with tox / Test with tox (3.12) (pull_request) Failing after 9m10s
efc0948110
benchinnery added 1 commit 2026-04-17 10:04:22 -04:00
test suite
Some checks failed
Build Sphinx Docs Set / Build Docs (pull_request) Successful in 18s
Test with tox / Test with tox (3.10) (pull_request) Failing after 1m51s
Test with tox / Test with tox (3.11) (pull_request) Failing after 2m43s
Test with tox / Test with tox (3.12) (pull_request) Failing after 2m45s
Build Project / Build Project (3.10) (pull_request) Successful in 4m2s
Build Project / Build Project (3.12) (pull_request) Successful in 3m48s
Build Project / Build Project (3.11) (pull_request) Successful in 4m40s
638fe5df1f
G gillian approved these changes 2026-04-17 10:05:35 -04:00
benchinnery requested review from gillian 2026-04-17 10:11:15 -04:00
benchinnery added 1 commit 2026-04-17 10:11:41 -04:00
Merge remote-tracking branch 'origin' into zfp-oss
Some checks failed
Build Project / Build Project (3.10) (pull_request) Successful in 7m23s
Test with tox / Test with tox (3.11) (pull_request) Failing after 7m15s
Test with tox / Test with tox (3.10) (pull_request) Failing after 7m21s
Build Sphinx Docs Set / Build Docs (pull_request) Successful in 7m32s
Build Project / Build Project (3.11) (pull_request) Successful in 8m53s
Build Project / Build Project (3.12) (pull_request) Successful in 9m3s
Test with tox / Test with tox (3.12) (pull_request) Failing after 2m23s
83515d6e3f
benchinnery merged commit 6fb73c1daa into main 2026-04-17 10:11:56 -04:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: qoherent/ria-toolkit-oss#23
No description provided.