Implements the standalone MS-initiated group attach/detach procedure so a UI
can change talkgroups at runtime instead of only using the config set, strictly
per ETSI TS 100 392-2 V3.10.1.
G2 (TX): on a TNMM-ATTACH DETACH GROUP IDENTITY request (Table 15.1), once
registered, build and send a U-ATTACH/DETACH GROUP IDENTITY PDU (cl. 16.9.3.1)
over the acknowledged basic link: report = not-report-request, amendment vs
detach-all mode, one Group identity uplink per GSSI (class of usage per
cl. 16.10.6 Table 16.32, or detachment reason per cl. 16.10.21). Start T353
(cl. 16.11.1.3, 10 s). Single operation outstanding; rejected if not registered.
G3 (RX): on D-ATTACH/DETACH GROUP IDENTITY ACKNOWLEDGEMENT (cl. 16.9.2.2), stop
T353, reconcile the attached-group set from the SwMI-confirmed downlink elements
(detach-all replaces; amendment adds/removes), and push it to the MLE via
MLE-IDENTITIES so the MAC downlink filter matches (cl. 23.4.1.2.1). On T353
expiry the op is treated as failed (cl. 16.8.5).
G4 (confirm + UI): emit a TNMM-ATTACH DETACH GROUP IDENTITY confirm (Table 15.1,
GTSIs only per cl. 16.8.2) to the user application; document the request/confirm
JSON shapes and add a live talkgroup-switch example to the MS interface README +
reference client.
Tests: +7 mm_ms unit tests (unregistered reject, TX PDU round-trips through the
BS parser + T353 armed, ACK reconcile + MLE-IDENTITIES + confirm, amendment
detach, detach-all replace, second-op-while-pending reject, T353 expiry failure).
196 lib + all integration suites green; no BS air-interface change.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Per maintainer decision #4, land the MS external-interface artifacts in-repo
under a dedicated examples/ms-interface/ directory (the source of truth), not
example_config/:
- examples/ms-interface/README.md — the protocol/API documentation (message
catalog): Plane A TNMM-SAP (cl. 15.3) + Plane B management, the HYBRID apply
model, redact-on-wire / preserve-on-write secret handling, and a wscat quick
example. Shippable API docs, not a planning note.
- examples/ms-interface/reference-client.py — the runnable language-neutral
reference client (concise docstring pointing at the catalog).
Removes the interim example_config/ms-ui-reference-client.py. Deployment
artifacts (systemd unit + supervisor script) stay in example_config/. This
directly serves the "build different UIs on top of the stack" goal. Docs/sample
only; no code or wire-behaviour change. py_compile clean.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>