Files
serein-flow/Library/Network/Modbus/ModbusRequest.cs

26 lines
618 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Serein.Library.Network.Modbus;
using System.Threading.Tasks;
namespace Serein.Library.Network.Modbus
{
public class ModbusRequest
{
/// <summary>
/// 功能码
/// </summary>
public ModbusFunctionCode FunctionCode { get; set; }
/// <summary>
/// PDU (Protocol Data Unit) 数据不包括从站地址和CRC
/// </summary>
public byte[] PDU { get; set; }
/// <summary>
/// 异步任务完成源,用于等待响应
/// </summary>
public TaskCompletionSource<byte[]> Completion { get; set; }
}
}