Lay out a Cabrillo line the way a .udc file asks for it

`CabrilloString` names a field and a column width in turn. The line it makes
follows N1MM: the operator's callsign in the first 13 columns, then every
column padded to its width with one space after it, and a value longer than its
column cut rather than pushed sideways. The cut is new for every contest, not
just the user-defined ones — the columns are the sponsor's, not ours.

`CabrilloVersion` is read too, so a contest whose sponsor still asks for 2.0
gets it in the header.

A contest that lays out its own line can put the transmitter column where it
wants it, or leave it out, so the writer no longer adds one at the end.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
2026-08-31 10:38:39 +00:00
co-authored by Claude Opus 5
parent 5ab97251e1
commit cf5bdd6082
7 changed files with 187 additions and 18 deletions
+7 -1
View File
@@ -9,4 +9,10 @@ public sealed record CabrilloField(string Value, int Width);
/// goes: most put it first, Sweepstakes puts it last.
public sealed record CabrilloExchange(
IReadOnlyList<CabrilloField> Sent,
IReadOnlyList<CabrilloField> Received);
IReadOnlyList<CabrilloField> Received)
{
/// Whether the writer adds the transmitter column at the end of the line.
/// A user-defined contest that lays out its own line can put that column
/// where it wants it, or leave it out.
public bool AddsTransmitter { get; init; } = true;
}