CommunicationPipeReadFromCoreServerHelperAsync 方法 |
将数据发送到当前的管道里,并从管道接收相关的数据信息,可以指定消息类型,发送数据,是否有数据响应,休眠时间
To send data to the current pipeline and receive relevant data information from the pipeline, you can specify the message type,
the data sent, whether there is a data response, and the sleep time
命名空间:
HslCommunication.Core.Pipe
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 protected Task<OperateResult<byte[]>> ReadFromCoreServerHelperAsync(
INetMessage netMessage,
byte[] sendValue,
bool hasResponseData,
int sleep,
Action<byte[]> logMessage = null
)
Protected Function ReadFromCoreServerHelperAsync (
netMessage As INetMessage,
sendValue As Byte(),
hasResponseData As Boolean,
sleep As Integer,
Optional logMessage As Action(Of Byte()) = Nothing
) As Task(Of OperateResult(Of Byte()))
protected:
Task<OperateResult<array<unsigned char>^>^>^ ReadFromCoreServerHelperAsync(
INetMessage^ netMessage,
array<unsigned char>^ sendValue,
bool hasResponseData,
int sleep,
Action<array<unsigned char>^>^ logMessage = nullptr
)
member ReadFromCoreServerHelperAsync :
netMessage : INetMessage *
sendValue : byte[] *
hasResponseData : bool *
sleep : int *
?logMessage : Action<byte[]>
(* Defaults:
let _logMessage = defaultArg logMessage null
*)
-> Task<OperateResult<byte[]>>
参数
- netMessage
- 类型:HslCommunication.Core.IMessageINetMessage
当前接收的消息体信息 - sendValue
- 类型:SystemByte
等待发送的数据 - hasResponseData
- 类型:SystemBoolean
是否有数据返回 - sleep
- 类型:SystemInt32
休眠时间 - logMessage (Optional)
- 类型:SystemActionByte
用于消息记录的日志信息
返回值
类型:
TaskOperateResultByte读取的结果对象
参见