Take serial numbers from a pool the whole entry shares

Each station worked out its next number as the highest in its log plus one,
so two operators typing at the same moment both sent the same number and
one of the two contacts was wrong in the sponsor's log.

SerialNumberPool holds the highest number taken per band, which is N1MM's
QSONumbers array. A number is taken at the first character of the callsign,
as N1MM takes it, and ReserveNr tells the other stations before the contact
is worked. A number at or below one this station has used is answered with
the whole pool, N1MM's QSONRS, and the station that is behind counts on from
there. The pool also goes out when a contest is opened and when the numbers
are started again.

Contest.NumbersByBand says whether the numbers run per band or as one
sequence for the station. CQ WPX runs one per band for a multi-two and a
multi-multi; every other contest here runs one sequence. The band index in
the message is N1MM's, so the array lines up with theirs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015NZkFxHde1iifAQemFTHxf
This commit is contained in:
2026-09-10 11:56:49 +00:00
co-authored by Claude Opus 5
parent 33c7631e17
commit 7ba0b44fc1
21 changed files with 677 additions and 40 deletions
+4 -17
View File
@@ -46,23 +46,10 @@ public sealed record BandChangeRules(
///
/// A station with a transmitter per band changes band by moving to another
/// radio, so nothing is counted for it.
public static BandChangeRules ForCategory(ContestEntry entry)
{
if (!entry.OperatorCategory.StartsWith("MULTI", StringComparison.OrdinalIgnoreCase))
{
return None;
}
// N1MM reads the number of transmitters off the operator category on
// Cabrillo 2.0 and off the transmitter category after it. Both are
// checked, so an entry written either way is read
bool one = Is(entry, "MULTI-ONE", "ONE");
bool two = Is(entry, "MULTI-TWO", "TWO");
return one || two ? None with { MinimumStay = MultiOneStay } : None;
}
private static bool Is(ContestEntry entry, string operatorCategory, string transmitterCategory) =>
entry.OperatorCategory.Equals(operatorCategory, StringComparison.OrdinalIgnoreCase)
|| entry.TransmitterCategory.Equals(transmitterCategory, StringComparison.OrdinalIgnoreCase);
public static BandChangeRules ForCategory(ContestEntry entry) =>
EntryCategories.IsMultiOne(entry) || EntryCategories.IsMultiTwo(entry)
? None with { MinimumStay = MultiOneStay }
: None;
public bool IsCounted => Max > 0;