namespace Nonemm.Digital; /// A digital modem that decodes what is on the air and sends what is typed: /// MMTTY or 2Tone behind the Wine bridge today, fldigi later. The window above /// it works through this and does not know which one is running. public interface DigitalEngine : IDisposable { /// The modem is running and has told us its version. bool IsConnected { get; } bool IsTransmitting { get; } /// Text the modem has decoded, in the pieces it arrived in: usually one /// character. Raised on the reader thread, so a handler that touches the /// screen has to post. event EventHandler? Received; event EventHandler? TransmitChanged; event EventHandler? ConnectionChanged; /// Starts the modem and waits until it is connected. Throws if it does not /// come up. Task StartAsync(CancellationToken cancellation = default); /// Puts the text in the transmit buffer, which starts the transmission. Task SendAsync(string text, CancellationToken cancellation = default); /// Drops whatever has not gone out yet, which is what Escape does. Task AbortAsync(CancellationToken cancellation = default); }