/// <summary> /// 从原始数据筛选报文 /// </summary> /// <param name="raw">原始数据</param> /// <returns>是否继续(即是否未得到报文)</returns> public bool Filter(byte[] raw) { if (TempBuffer != null) { var temp = raw; raw = TempBuffer.Concat(temp).ToArray(); TempBuffer = null; } int index = CommondFilter.Length == 1 ? FilterSingleCMD(raw) : FilterDoubleCMD(raw); if (index + 1 < raw.Length) { TempBuffer = raw.Skip(index + 1).ToArray(); } return(FillIndex < 4 || FillIndex != LengthByte); }