NetSupportReadFromCoreServerAsync 方法 |
将多个数据报文按顺序发到设备,并从设备接收返回的数据内容,然后拼接成一个Byte[]信息,需要重写
UnpackResponseContent(Byte, Byte)方法才能返回正确的结果。
Send multiple data packets to the device in sequence, and receive the returned data content from the device, and then splicing them into a Byte[] message,
you need to rewrite
UnpackResponseContent(Byte, Byte) method to return the correct result.
命名空间:
HslCommunication.Core
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static Task<OperateResult<byte[]>> ReadFromCoreServerAsync(
IEnumerable<byte[]> send,
Func<byte[], Task<OperateResult<byte[]>>> funcRead
)
Public Shared Function ReadFromCoreServerAsync (
send As IEnumerable(Of Byte()),
funcRead As Func(Of Byte(), Task(Of OperateResult(Of Byte())))
) As Task(Of OperateResult(Of Byte()))
public:
static Task<OperateResult<array<unsigned char>^>^>^ ReadFromCoreServerAsync(
IEnumerable<array<unsigned char>^>^ send,
Func<array<unsigned char>^, Task<OperateResult<array<unsigned char>^>^>^>^ funcRead
)
static member ReadFromCoreServerAsync :
send : IEnumerable<byte[]> *
funcRead : Func<byte[], Task<OperateResult<byte[]>>> -> Task<OperateResult<byte[]>>
参数
- send
- 类型:System.Collections.GenericIEnumerableByte
发送的报文列表信息 - funcRead
- 类型:SystemFuncByte, TaskOperateResultByte
[缺少 "M:HslCommunication.Core.NetSupport.ReadFromCoreServerAsync(System.Collections.Generic.IEnumerable{System.Byte[]},System.Func{System.Byte[],System.Threading.Tasks.Task{HslCommunication.OperateResult{System.Byte[]}}})" 的 <param name="funcRead"/> 文档]
返回值
类型:
TaskOperateResultByte是否接收成功
参见