Add the session, radio control, bandmap and cluster

Nonemm.Session holds what the operator is typing, what the log says about it and
what happens on Enter, with no UI toolkit behind it. Nonemm.Rig talks to
hamlib's rigctld and reconnects on its own. Nonemm.Spotting reads DX cluster
lines into a bandmap that drops spots after an hour.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Erik
2026-08-27 10:39:53 +00:00
parent ef631f1dc4
commit ffeeb2cdc1
25 changed files with 1416 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using Nonemm.Core;
namespace Nonemm.Spotting.Tests;
public class SpotLineTests
{
private static readonly DateTime Now = new(2026, 5, 30, 12, 40, 0, DateTimeKind.Utc);
[Fact]
public void ANodeSpotIsReadIntoItsParts()
{
Spot? spot = SpotLine.Parse(
"DX de W3LPL: 14025.0 DL1ABC CW 20 dB 25 WPM CQ 1234Z",
Now);
Assert.NotNull(spot);
Assert.Equal("DL1ABC", spot.Call.Text);
Assert.Equal(14_025_000, spot.Frequency.Hertz);
Assert.Equal("W3LPL", spot.Spotter);
Assert.Equal(new DateTime(2026, 5, 30, 12, 34, 0, DateTimeKind.Utc), spot.AtUtc);
Assert.DoesNotContain("1234Z", spot.Comment);
}
[Fact]
public void OtherTrafficIsNotASpot() =>
Assert.Null(SpotLine.Parse("WWV de VE7CC <18Z> : SFI=142, A=7, K=2", Now));
[Fact]
public void ASpotTimedAfterNowCameInYesterday()
{
Spot? spot = SpotLine.Parse("DX de W3LPL: 14025.0 DL1ABC CQ 2350Z", Now);
Assert.Equal(new DateTime(2026, 5, 29, 23, 50, 0, DateTimeKind.Utc), spot?.AtUtc);
}
}