`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
19 lines
799 B
C#
19 lines
799 B
C#
namespace Nonemm.Contests;
|
|
|
|
/// One column of a Cabrillo QSO line. Sponsors read these by column, so each
|
|
/// carries the width it is padded to.
|
|
public sealed record CabrilloField(string Value, int Width);
|
|
|
|
/// The columns of one Cabrillo QSO line after the time, sent group first. The
|
|
/// callsign is one of the columns because sponsors do not agree on where it
|
|
/// goes: most put it first, Sweepstakes puts it last.
|
|
public sealed record CabrilloExchange(
|
|
IReadOnlyList<CabrilloField> Sent,
|
|
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;
|
|
}
|