Mirror a radio from another computer's broadcast data

Listen for Radio broadcast data from another Nonemm or N1MM computer and
record its frequency, mode and split as this computer's own radio. No
radio is controlled. The settings are in the Configure Radios dialog.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 05:16:27 +00:00
co-authored by Claude Sonnet 5.5
parent 75fc6c02d2
commit 072c04883e
13 changed files with 333 additions and 11 deletions
@@ -47,6 +47,32 @@ public class BroadcastTests
Assert.Equal("RUN-PC", root.Element("StationName")!.Value);
}
[Fact]
public void A_radio_message_is_read_back_in_hertz()
{
string xml = BroadcastMessages.Radio(
new RadioReport(2, 14_025_500, 14_030_000, "USB", "OK1ABC", "OK1ABC", true, 2, true, 2, false, "", true),
"RUN-PC");
RadioBroadcast? read = BroadcastMessages.ReadRadio(xml);
Assert.Equal("RUN-PC", read!.StationName);
Assert.Equal(2, read.Radio.RadioNumber);
Assert.Equal(14_025_500, read.Radio.Frequency);
Assert.Equal(14_030_000, read.Radio.TransmitFrequency);
Assert.Equal("USB", read.Radio.Mode);
Assert.True(read.Radio.IsSplit);
}
[Theory]
[InlineData("not xml")]
[InlineData("<spot><dxcall>DL1ABC</dxcall></spot>")]
[InlineData("<RadioInfo><RadioNr>1</RadioNr></RadioInfo>")]
public void Anything_but_a_radio_message_is_passed_over(string text)
{
Assert.Null(BroadcastMessages.ReadRadio(text));
}
[Fact]
public void A_deleted_spot_carries_no_comment_or_status()
{