Add remote stream selection command#144
Open
sena-neuro wants to merge 2 commits into
Open
Conversation
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.
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