Say when the entry has two signals on the air

N1MM blocks the transmitter when a multi-operator entry is about to break
its own class. This program does not touch the transmitter: a logger that
decides for itself when the operator may not send loses a contact every
time it is wrong, and it is wrong whenever it has stale information about
the other stations — which, on a network, is whenever a laptop has just
been unplugged.

So the entry window says so instead. While this station is transmitting
and the entry is over what it is allowed, a red box goes across the top of
the window naming the station and the band. It is above the frequency and
under the menu, so nothing it covers is anything the operator needs while
he is sending, and it is big enough to read from the other side of the
room.

`TransmitRules` is what it asks:

| Entry | Allowed |
|---|---|
| one transmitter | one signal |
| two transmitters | two signals, on different bands |
| anything else | one signal per band |

Two on one band is wrong in every multi-operator class, so it is checked
whatever the category says. A station that has not said which band it is on
counts as somewhere else: a guess there puts the box in front of an
operator doing nothing wrong.

This is also the first thing that sends `XMIT`. The message was written and
nothing called it, so the transmit column of everybody's network status
window stayed empty and no station knew when another was sending. The entry
window now says when its key goes down and what it is sending.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PdAYHcdRktqKry7nk414TU
This commit is contained in:
2026-09-03 23:23:46 +00:00
co-authored by Claude Opus 5
parent 0b92bfc6ee
commit 4eb8071d57
6 changed files with 291 additions and 4 deletions
+52 -1
View File
@@ -29,7 +29,27 @@ public sealed partial class EntryWindow : Window
private static readonly IBrush Dark = new SolidColorBrush(Color.FromArgb(0x33, 0x80, 0x80, 0x80));
private bool sending;
/// True while this station has its key down. Every station of the entry is
/// told, because two signals where the entry may have one is a contact the
/// sponsor takes back off both of them.
private bool sending
{
get;
set
{
if (field == value)
{
return;
}
field = value;
_ = session.Link?.SendTransmittingAsync(value, sendingWhat, session.IsRun2);
ShowTransmitWarning();
}
}
/// What is going out, which is what the other operators read in the
/// network status window.
private string sendingWhat = "";
private TextBlock? callMark;
private TextBox? nameBox;
private TextBox? commentBox;
@@ -1000,6 +1020,37 @@ public sealed partial class EntryWindow : Window
{
ClockText.Text = DateTime.UtcNow.ToString("HH:mm:ss") + "Z";
ShowBandTimer();
// another station keying up is not something this window is told about,
// so the box is worked out again every second as well
ShowTransmitWarning();
}
/// The red box: this station is transmitting and the entry is over the
/// signals it is allowed, or two of its stations are on one band. N1MM
/// blocks the transmitter for this; this program says so and leaves the
/// operator to stop, because a logger that decides for itself when an
/// operator may not send loses a contact every time it is wrong.
private void ShowTransmitWarning()
{
string? why = TransmitViolation();
TransmitWarning.IsVisible = why is not null;
TransmitWarningText.Text = why is null ? "" : $"STOP — {why}";
}
private string? TransmitViolation()
{
if (!sending || Logging is null || session.Link is not { } link)
{
return null;
}
List<Transmitter> others = link.Stations
.Where(s => !s.IsMine && s.IsTransmitting)
.Select(s => new Transmitter(s.ComputerName, s.Band, s.Mode?.Category))
.ToList();
return TransmitRules.Violation(
Logging.Log.Entry,
new Transmitter(link.ComputerName, Bands.ForFrequency(Logging.Frequency), Logging.Mode.Category),
others);
}
/// The countdown N1MM puts in its info window: how long the station still