You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add select <query> to the remote control TCP interface, where <query> is an LSL resolver predicate such as name='BioSemi' or type='EEG'.
This allows remote clients to select a subset of streams before starting a recording.
Why The Supporting Changes Are Included
Remote start previously selected all streams before recording. That would override any stream subset selected through select <query>, so remote start now records the current selection instead.
Starting a recording refreshes the stream list. To keep TCP-selected streams stable across that refresh, the selected state is preserved before rebuilding the list, and stream matching now uses source_id when available with a fallback for streams that do not provide one.
The stream list is rebuilt from both refresh and remote-selection paths, so the list rebuild logic is shared rather than duplicated.
Remote responses were tightened because start can now fail for normal remote-control reasons, such as no streams being selected.
Compatibility Notes
Remote start no longer implicitly selects all streams. Clients that need the previous behavior should send select all before start.
A valid query that matches no streams returns WARNING no streams matched and leaves the current selection unchanged. Clients that need a deterministic subset should send select none before select <query>.
Command parsing is exact and case-sensitive.
Validation
Built the GUI target locally.
Ran TCP interface tests on the validation branch.
Ran a manual TCP smoke validation with synthetic LSL streams.
I recommend addressing two selection issues before merging. Both were reproduced using this PR's actual GUI code in an isolated offscreen Qt build at commit 0ae59bb79fc0098c1cd9ef416ee808f8d3f4d66b.
Stream matching can select unintended streams (src/mainwindow.h:30-34). When one stream has an empty source_id, StreamItem::matches() falls back to name/type/host/session even when the other stream has a nonempty source ID. I created two otherwise identical outlets, one with an empty ID and one with different-source, then ran the selection sequence corresponding to select none -> select source_id='different-source' -> refresh. The returned recording selection contained both streams. If either source ID is nonempty, require matching IDs rather than falling back across the empty/nonempty boundary. Please add a regression test verifying the actual selected stream identities after refresh.
Missing streams become selected again after select none (src/mainwindow.cpp:290-305). updateKnownStreamSelectionFromUi() saves only known-stream selection, while rebuildStreamList() unconditionally checks every missing-stream entry. In the reproduction, hasSelectedStreams() returned false after selectNoStreams(), then true after saving selection and rebuilding the list. Because a successful select <query> also rebuilds the list, select none -> select <query> restores unwanted missing streams to the selection; they can subsequently be watched and recorded when they appear. Preserve selection state for missing streams and ensure unchecked entries do not enter the recording watchlist.
Validation: the isolated GUI-code build passed, the two cases above reproduced, and malformed-query handling correctly returned InvalidQuery. The linked smoke script checks command responses but does not start a successful recording or verify its stream contents. Please include these selection regressions in checked-in tests, ideally also verifying the resulting XDF contains only the intended streams.
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
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.
Summary
Add
select <query>to the remote control TCP interface, where<query>is an LSL resolver predicate such asname='BioSemi'ortype='EEG'.This allows remote clients to select a subset of streams before starting a recording.
Why The Supporting Changes Are Included
Remote
startpreviously selected all streams before recording. That would override any stream subset selected throughselect <query>, so remotestartnow records the current selection instead.Starting a recording refreshes the stream list. To keep TCP-selected streams stable across that refresh, the selected state is preserved before rebuilding the list, and stream matching now uses
source_idwhen available with a fallback for streams that do not provide one.The stream list is rebuilt from both refresh and remote-selection paths, so the list rebuild logic is shared rather than duplicated.
Remote responses were tightened because
startcan now fail for normal remote-control reasons, such as no streams being selected.Compatibility Notes
Remote
startno longer implicitly selects all streams. Clients that need the previous behavior should sendselect allbeforestart.A valid query that matches no streams returns
WARNING no streams matchedand leaves the current selection unchanged. Clients that need a deterministic subset should sendselect nonebeforeselect <query>.Command parsing is exact and case-sensitive.
Validation
Smoke validation script:
https://gist.github.com/sena-neuro/ed12a2570c496ba0e43214fdf24029b4