点击或拖拽改变大小

NetworkDoubleBaseCheckReceiveDataComplete 方法

检查当前从网口接收的数据是否是完整的,如果是完整的,则需要返回 True,表示数据接收立即完成,默认返回 True
Check whether the data currently received from the network port is complete, and if it is complete, you need to return True, indicating that the data reception is completed immediately, and the default value is True

命名空间:  HslCommunication.Core.Net
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
protected virtual bool CheckReceiveDataComplete(
	byte[] send,
	MemoryStream ms
)

参数

send
类型:SystemByte
当前发送的数据信息
ms
类型:System.IOMemoryStream
目前已经接收到数据流

返回值

类型:Boolean
如果数据接收完成,则返回True, 否则返回False
备注
在默认情况下,网口在接收数据之后,直接认为本次的数据接收已经完成,如果碰到有结束标记的协议,则可以重写本方法,然后加入额外的验证信息,直到全部数据接收完成。
By default, after receiving data, the network port directly believes that the data reception has been completed, if it encounters a protocol with an end tag, you can override this method, and then add additional verification information until all data is received.
参见