Read a QTC series out on RTTY
N1MM's Send All: the whole series as one message — the heading, every
line with the operator's spacing between them, then the ending, with
`{TX}` and `{RX}` around it so it keys the transmitter and drops it
again. The shape is N1MM's, from `QTCWindow.cs:3609`. A line is the three
fields joined with hyphens, which is how N1MM writes them, and Snd n
sends one line again for a station that missed it.
One message rather than a button per line because a series is close to a
minute of transmission at 45 baud: the type-ahead buffer holds it and
paces the engine.
Three settings with N1MM's names and defaults — `WAESendAllHeadingText`,
`WAESendAllEndingText` and `WAESQTCSpacing` — on the QTC window's setup
dialog. `{ENTERLF}` is new to the expander and stands for a carriage
return and a line feed; `{QTC}` is filled in by the window, which is the
only place that knows which series is going out.
The messages are tested as text. Nothing has gone on the air.
Left out: N1MM's four SSB recordings, which need a voice keyer, and its
RTTY messages for the station taking traffic down, which are typed into
the digital window's transmit pane here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PdAYHcdRktqKry7nk414TU
This commit is contained in:
@@ -100,6 +100,14 @@ public class MessageExpanderTests
|
||||
public void WithOneRadioTheOtherMacrosStandForNothing() =>
|
||||
Assert.Equal("", MessageExpander.Expand("{OTHERFREQ}{OTHERMHZ}{OTHERBAND}", Session()));
|
||||
|
||||
/// The two carriage return macros a digital message is written with. N1MM's
|
||||
/// own RTTY message defaults use `{ENTERLF}`.
|
||||
[Fact]
|
||||
public void TheCarriageReturnMacrosAreTheCharactersTheyStandFor()
|
||||
{
|
||||
Assert.Equal("A\rB\r\nC", MessageExpander.Expand("A{ENTER}B{ENTERLF}C", Session()));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheNameComesFromTheCallHistoryWhenTheContestHasNoNameBox()
|
||||
{
|
||||
|
||||
@@ -37,6 +37,57 @@ public class QtcMessagesTests
|
||||
Assert.Equal("TU 73", QtcMessages.Tu("TU 73", "QTC 3/10"));
|
||||
}
|
||||
|
||||
/// N1MM joins the three fields with hyphens on RTTY and offers no setting
|
||||
/// for it.
|
||||
[Fact]
|
||||
public void ARttyLineIsTheThreeFieldsJoinedWithHyphens()
|
||||
{
|
||||
Assert.Equal("1234-DL1ABC-123", QtcMessages.RttyLine(" 1234 ", " DL1ABC ", " 123 "));
|
||||
}
|
||||
|
||||
/// The shape is N1MM's, from `QTCWindow.cs:3609`: the heading, the spacing,
|
||||
/// then every line with a space and the spacing behind it, then the ending.
|
||||
/// The macros are left for the expander; `{QTC}` is the one filled in here.
|
||||
[Fact]
|
||||
public void SendAllReadsTheWholeSeriesOutInOneMessage()
|
||||
{
|
||||
string message = QtcMessages.SendAll(
|
||||
QtcMessages.DefaultSendAllHeading,
|
||||
QtcMessages.DefaultSendAllEnding,
|
||||
QtcMessages.DefaultRttySpacing,
|
||||
"QTC 3/10",
|
||||
["1234-DL1ABC-123", "1240-G3XYZ-124"]);
|
||||
|
||||
Assert.Equal(
|
||||
"{TX}{ENTERLF}QTC 3/10 QTC 3/10{ENTER}"
|
||||
+ "1234-DL1ABC-123 {ENTER}"
|
||||
+ "1240-G3XYZ-124 {ENTER}"
|
||||
+ "{ENTERLF}QSL?? BK DE {MYCALL} K{RX}",
|
||||
message);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SendAllWithNoLinesSendsNothing()
|
||||
{
|
||||
Assert.Equal(
|
||||
"",
|
||||
QtcMessages.SendAll(
|
||||
QtcMessages.DefaultSendAllHeading,
|
||||
QtcMessages.DefaultSendAllEnding,
|
||||
QtcMessages.DefaultRttySpacing,
|
||||
"QTC 3/10",
|
||||
[]));
|
||||
}
|
||||
|
||||
/// One line asked for again, which N1MM wraps in the spacing on both sides.
|
||||
[Fact]
|
||||
public void OneLineKeysAndDropsTheTransmitterOfItsOwn()
|
||||
{
|
||||
Assert.Equal(
|
||||
"{TX}{ENTER}1234-DL1ABC-123{ENTER}{RX}",
|
||||
QtcMessages.SendOne(QtcMessages.DefaultRttySpacing, "1234-DL1ABC-123"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WhatIsInTheBoxesIsTrimmed()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user