点击或拖拽改变大小

VibrationSensorShortMessageGetContentLengthByHeadBytes 方法

从当前的头子节文件中提取出接下来需要接收的数据长度
Extract the length of the data to be received from the current header file

命名空间:  HslCommunication.Profinet.Geniitek
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法
public int GetContentLengthByHeadBytes()

返回值

类型:Int32
返回接下来的数据内容长度

实现

INetMessageGetContentLengthByHeadBytes
备注
如果剩余字节的长度小于0,则表示消息头数据还没有接收完整,还需要接收一定的长度(返回值的绝对值),然后再判断剩余字节长度是否小于0,直到结果大于等于0为止,最多判断的次数为16次,超过16次将返回失败
If the length of the remaining bytes is less than 0, it means that the message header data has not been received completely, and a certain length (absolute value of the return value) needs to be received, and then it is judged whether the length of the remaining bytes is less than 0 until the result is greater than or equal to 0, the maximum number of judgments is 16, more than 16 times will return failure
参见