Skip to content

Plugins: the names of a call's patched talkgroups (CallInfo.patched, SDK 0.15.1) - #226

Merged
robotastic merged 4 commits into
mainfrom
patched-talkgroups-named
Nov 24, 2026
Merged

robotastic merged 4 commits into
mainfrom
patched-talkgroups-named

Conversation

@robotastic

Copy link
Copy Markdown
Contributor

Replaces #224 by @aknitt-rsos, whose commit is kept here. The idea is theirs and is unchanged; the shape of the field is different. (This is a new PR only because maintainer edits could not be pushed to the fork.)

What

Plugins are told the names of the talkgroups patched with a call.

  • CallInfo.patched: Vec<TalkgroupName { talkgroup, alpha_tag }> (SDK 0.15.1, additive). It lists the talkgroups patched with the call's own, each with its alpha tag. The call's own talkgroup is not in it: talkgroup_tag names that one. Empty when the call isn't patched.
  • Session::patched builds the list for plugins' events and for the dashboard's calls.
  • Test a_calls_patched_talkgroups_are_named in session.rs checks the plugin event, the dashboard's call and the JSON on the wire against each other.
  • Docs: docs/plugins/writing-plugins.md, docs/developer/architecture.html, CHANGELOG.

Why

A plugin that streams audio only (no call start packets) needs the names to label each transmission. Without this, a patched call can only be named by its own tag, or by the numbers of the patch.

Changes from #224

  • One typed list instead of patched_talkgroup_tags. Plugins: patched_talkgroup_tags on CallInfo (SDK 0.15.1) #224 added a list of tags matched to patched_talkgroups by index. This follows units / sources on the same struct, so a plugin doesn't pair two lists.
  • One builder. The dashboard already listed a call's patched talkgroups with their names from its own code. Both now come from Session::patched, and the special case for the call's own talkgroup is gone.
  • docs/plugins/simplestream.md is unchanged. Plugins: patched_talkgroup_tags on CallInfo (SDK 0.15.1) #224 described simplestream behaviour that isn't released; that belongs with the plugin's release.

For a plugin that wants the tags as one list, the call's own first:
std::iter::once(&call.talkgroup_tag).chain(call.patched.iter().map(|p| &p.alpha_tag))

Notes for review

🤖 Generated with Claude Code

aaknitt and others added 4 commits November 23, 2026 17:22
CallInfo.patched (Vec<TalkgroupName { talkgroup, alpha_tag }>) replaces the
index-matched patched_talkgroup_tags: the talkgroups patched with the call's
own, each with its name, as CallInfo.sources names units. Session::patched
builds it for plugins' events and the dashboard's calls alike, so the call's
own talkgroup needs no special case (talkgroup_tag names it).

The simplestream doc change waits for the plugin release that does it.

Co-Authored-By: Claude <noreply@anthropic.com>
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.

2 participants