点击或拖拽改变大小

MelsecMcNetUnpackResponseContent 方法

根据对方返回的报文命令,对命令进行基本的拆包,例如各种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.Melsec
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法
public override OperateResult<byte[]> UnpackResponseContent(
	byte[] send,
	byte[] response
)

参数

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.
参见