HLSF use long as aloloc size

This commit is contained in:
Nitload
2026-02-23 12:32:15 +08:00
parent 4bd88ccbca
commit c155cab510
552 changed files with 154266 additions and 154330 deletions
+35 -35
View File
@@ -1,35 +1,35 @@
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace EM.LowLevel
{
/// <summary>
/// High-level transport abstraction for device communication. Derives from Stream and
/// encapsulates initialization/handshake and frame (header/tail/checksum) handling as needed
/// by the device. Implementations may wrap SerialPort, Sockets, USB, etc.
/// </summary>
public abstract class PortStream : Stream
{
/// <summary>
/// Optional bytes available hint if the transport can provide it.
/// </summary>
public virtual long? BytesAvailable => null;
/// <summary>
/// Close the underlying transport and release resources.
/// </summary>
public abstract override void Close();
/// <summary>
/// Ensure the port is opened and ready. Idempotent. May perform device-specific
/// handshakes.
/// </summary>
public abstract ValueTask OpenAsync(CancellationToken cancellationToken = default);
// Concrete transports must implement Stream's abstract members.
// Seek-related members are typically not supported and should throw NotSupportedException.
}
}
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace EM.LowLevel
{
/// <summary>
/// High-level transport abstraction for device communication. Derives from Stream and
/// encapsulates initialization/handshake and frame (header/tail/checksum) handling as needed
/// by the device. Implementations may wrap SerialPort, Sockets, USB, etc.
/// </summary>
public abstract class PortStream : Stream
{
/// <summary>
/// Optional bytes available hint if the transport can provide it.
/// </summary>
public virtual long? BytesAvailable => null;
/// <summary>
/// Close the underlying transport and release resources.
/// </summary>
public abstract override void Close();
/// <summary>
/// Ensure the port is opened and ready. Idempotent. May perform device-specific
/// handshakes.
/// </summary>
public abstract ValueTask OpenAsync(CancellationToken cancellationToken = default);
// Concrete transports must implement Stream's abstract members.
// Seek-related members are typically not supported and should throw NotSupportedException.
}
}