Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class SerialLink : IDisposable
public event EventHandler? DataReceived;
public bool IsConnected => _isConnected;
public bool IsEnabled => _isEnabled;
public bool IsOpen => _serialPort?.IsOpen ?? false;
public bool HasData => _incomingData.Count > 0;

private const int MaxDataSize = 100;
Expand Down
4 changes: 2 additions & 2 deletions ThreeByte.LinkLib/ThreeByte.LinkLib.TcpLink/AsyncTcpLink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ private void ReadCallback(IAsyncResult asyncResult)
/// Fetches and removes (pops) the next available group of bytes as received on this link in order (FIFO)
/// </summary>
/// <returns>null if the link is not Enabled or there is no data currently queued to return, an array of bytes otherwise.</returns>
public byte[] GetMessage()
public byte[]? GetMessage()
{
if (_isDisposed)
{
Expand All @@ -404,7 +404,7 @@ public byte[] GetMessage()
return null;
}

byte[] newMessage = null;
byte[]? newMessage = null;
lock (_incomingData)
{
if (HasData)
Expand Down
Loading