Skip to content

arq/tnc: acknowledge every callsign MYCALL accepts, not just the primary - #158

Open
rafael2k wants to merge 1 commit into
mercuryv2from
registered-secondaries
Open

arq/tnc: acknowledge every callsign MYCALL accepts, not just the primary#158
rafael2k wants to merge 1 commit into
mercuryv2from
registered-secondaries

Conversation

@rafael2k

@rafael2k rafael2k commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #155, from VARA's own documentation:

REGISTERED Call<cr>     Call sign registered in VARA

It is defined per call sign. MYCALL can carry secondaries and Mercury answers for all of them, so a host that registered three callsigns and got a single REGISTERED back had no reason to believe the other two were live.

Now one line per accepted callsign, primary first, in the order given:

MYCALL AAAA BBBB CCCC\r
OK\r
REGISTERED AAAA\r
REGISTERED BBBB\r
REGISTERED CCCC\r

Only the ones the ARQ layer actually took. Past CALLSIGN_MAX_SECONDARY it drops them, and acknowledging a callsign we will never answer is worse than staying quiet — the host would address a station that ignores it.

Tests: three callsigns produce three lines in order; six secondaries produce 1 + CALLSIGN_MAX_SECONDARY. The harness now records the whole queued sequence instead of only the last line, which is also what the existing ordering test really meant to assert (it was checking last_queued_line for the primary, which only held while the primary was the sole line).

docs/TNC.md updated with the multi-callsign form and the drop rule.

Not implemented here: VARA's LINK REGISTERED / LINK UNREGISTERED, which report the remote station's status during a link — a separate feature, happy to add it if wanted.

Build clean, unit suite green.

VARA's documentation defines the notification per call sign:

    REGISTERED Call<cr>    Call sign registered in VARA

MYCALL can carry secondaries, and Mercury answers for all of them, so a host
that registered three callsigns and got one REGISTERED back had no reason to
believe the other two were live.  Emit one line per accepted callsign, primary
first, in the order given.

Only for the ones the ARQ layer actually took: past CALLSIGN_MAX_SECONDARY it
drops them, and acknowledging a callsign we will never answer is worse than
staying quiet -- the host would address a station that ignores it.

Tests cover both: three callsigns produce three lines in order, and a MYCALL
with six secondaries produces 1 + CALLSIGN_MAX_SECONDARY.  The harness now
records the whole queued sequence rather than just the last line, which is
also what the existing ordering test really meant to assert.

Not implemented here: VARA's LINK REGISTERED / LINK UNREGISTERED, which report
the REMOTE station's status during a link -- a separate feature.

Co-Authored-By: Claude Opus 5 <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.

1 participant