OmronHostLinkUnpackResponseContent 方法 |
根据对方返回的报文命令,对命令进行基本的拆包,例如各种Modbus协议拆包为统一的核心报文,还支持对报文的验证
According to the message command returned by the other party, the command is basically unpacked, for example,
various Modbus protocols are unpacked into a unified core message, and the verification of the message is also supported
命名空间:
HslCommunication.Profinet.Omron
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public override OperateResult<byte[]> UnpackResponseContent(
byte[] send,
byte[] response
)
Public Overrides Function UnpackResponseContent (
send As Byte(),
response As Byte()
) As OperateResult(Of Byte())
public:
virtual OperateResult<array<unsigned char>^>^ UnpackResponseContent(
array<unsigned char>^ send,
array<unsigned char>^ response
) override
abstract UnpackResponseContent :
send : byte[] *
response : byte[] -> OperateResult<byte[]>
override UnpackResponseContent :
send : byte[] *
response : byte[] -> OperateResult<byte[]>
参数
- send
- 类型:SystemByte
发送的原始报文数据 - response
- 类型:SystemByte
设备方反馈的原始报文内容
返回值
类型:
OperateResultByte返回拆包之后的报文信息,默认不进行任何的拆包操作
备注
在实际解包的操作过程中,通常对状态码,错误码等消息进行判断,如果校验不通过,将携带错误消息返回
During the actual unpacking operation, the status code, error code and other messages are usually judged. If the verification fails, the error message will be returned.
参见