1
0
mirror of https://github.com/DarthAffe/OBD.NET.git synced 2025-12-13 01:08:30 +00:00
Roman Lumetsberger 9dd42cba6f Moved common parts into ODB.NET.Common
re-factored SerialConnection to ISerialConnection interface and removed stuff which is not compatible with NetStandard
2017-05-07 09:25:57 +02:00

41 lines
997 B
C#

using System;
using System.Text;
using System.Threading;
namespace OBD.NET.Communication
{
/// <summary>
/// Serial connection interface
/// </summary>
/// <seealso cref="System.IDisposable" />
public interface ISerialConnection : IDisposable
{
/// <summary>
/// Gets a value indicating whether this instance is open.
/// </summary>
/// <value>
/// <c>true</c> if this instance is open; otherwise, <c>false</c>.
/// </value>
bool IsOpen { get; }
/// <summary>
/// Occurs when a full line was received
/// </summary>
event EventHandler<string> MessageReceived;
/// <summary>
/// Connects the serial port.
/// </summary>
void Connect();
/// <summary>
/// Writes the specified text to the serial connection
/// </summary>
/// <param name="text">The text.</param>
void Write(string text);
}
}