using MultiTerm.Protocols.Types; namespace MultiTerm.Protocols; /// /// Interface to interact with a Communication protocol. /// public interface ICommunicationProtocol { /// /// Indicates the protocol type of the implementing class. /// ProtocolType ProtocolType { get; } /// /// Contains settings that are required to connect and use this communication protocol. /// IProtocolSettings? Settings { get; } /// /// New data received from connected device. /// event EventHandler? ReceivedDataEvent; /// /// New data sent to the connected device. /// event EventHandler? SentDataEvent; /// /// Connect to the device. /// void Connect(); /// /// Disconnect from the device. Ends all internal activities. /// void Disconnect(); /// /// Send data to the connected device. /// /// data to send, as an array of bytes void SendBytes(byte[] bytes); }