Skip to content

Dedup stream-status helpers, annotate m_daxTxClientHandle, document TCI receiver-index policy (#2142)#2145

Merged
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-2142
Apr 30, 2026
Merged

Dedup stream-status helpers, annotate m_daxTxClientHandle, document TCI receiver-index policy (#2142)#2145
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-2142

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #2142

What was changed

Dedup stream-status helpers, annotate m_daxTxClientHandle, document TCI receiver-index policy (#2142)

Files modified

  • docs/tci-receivers.md
  • src/core/StreamStatus.h
  • src/core/TciProtocol.cpp
  • src/core/TciProtocol.h
  • src/core/TciServer.cpp
  • src/gui/MainWindow.cpp
  • src/models/RadioModel.cpp
  • src/models/RadioModel.h
 src/core/TciServer.cpp    | 54 ++++++++++++-----------------------------------
 src/gui/MainWindow.cpp    | 23 ++------------------
 src/models/RadioModel.cpp | 17 +++------------
 src/models/RadioModel.h   |  2 +-
 8 files changed, 104 insertions(+), 85 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)

…CI receiver-index policy (#2142)

- Lift parseStatusHandle() and streamStatusBelongsToUs() into shared
  StreamStatus.h; remove duplicate copies from MainWindow.cpp and
  TciServer.cpp.  Alias parseStreamToken() in RadioModel.cpp to call
  the shared parseStatusHandle().
- Move tciTrxForSlice() to TciProtocol as a public static method,
  unifying the two slightly different signatures from TciServer.cpp
  and TciProtocol.cpp.
- Annotate m_daxTxClientHandle as diagnostics-only (set but never
  consulted in routing logic).
- Add docs/tci-receivers.md documenting the contiguous 0..N-1
  receiver-index policy introduced in #2140.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — PR #2145

Clean deduplication PR. Three copies of parseStatusHandle / streamStatusBelongsToUs and two copies of tciTrxForSlice collapsed into shared locations. The new docs/tci-receivers.md is a welcome addition for the TCI receiver-index policy that was introduced in #2140.

Looks good

  • StreamStatus.h: The shared inline helpers in the AetherSDR namespace are a clean fit. The parse logic is identical to the three copies it replaces (verified against MainWindow.cpp:233, TciServer.cpp:52, RadioModel.cpp:89).
  • tciTrxForSlice promotion: Moving it from a file-local anonymous namespace in both TciProtocol.cpp and TciServer.cpp into TciProtocol::tciTrxForSlice (public static) is the right call — TciServer was already depending on the same logic and this makes the coupling explicit.
  • RadioModel.cpp: The parseStreamToken alias via inline forwarding to parseStatusHandle preserves the call site at line 126 without a noisy rename. Fine for this PR scope.
  • m_daxTxClientHandle annotation: Helpful clarification.
  • docs/tci-receivers.md: Good documentation of the contiguous indexing policy and the legacy fallback path.

Minor items (non-blocking)

  1. Missing space in call sites — Several TciServer.cpp call sites have TciProtocol::tciTrxForSlice(m_model,s) (no space after comma). The rest of the codebase consistently uses a space after commas in argument lists. Not a blocker but would be nice to fix if you're touching this again.

  2. parseStreamToken wrapper in RadioModel.cpp — The inline forwarding function passes text by value and then std::moves it into parseStatusHandle, which also takes by value. This is correct (move from the by-value parameter), but since parseStatusHandle already takes by value, a simpler alias or just renaming the call site to parseStatusHandle directly would be cleaner. Again, not a blocker — the current approach works fine and avoids a wider diff.

  3. parseStatusHandle returns 0 on failure — This is inherited behavior, not new to this PR, but worth noting: 0 is also a potentially valid stream handle (though unlikely in practice from FlexRadio firmware). The existing callers all treat 0 as "no match" so this is consistent, just something to be aware of.

No bugs, no null-pointer risks, no scope creep. All changes are within the stated issue scope (#2142). LGTM overall — thanks for the cleanup, @aethersdr-agent!

@ten9876 ten9876 merged commit 52cf723 into main Apr 30, 2026
5 checks passed
@ten9876 ten9876 deleted the aetherclaude/issue-2142 branch April 30, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DAX/TCI cleanup follow-up from #2140 review

1 participant