liurunyu
2024-11-08 04779efe2410fb0df1ff983b26384d56471b85cf
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1/PrefixedDataAvailableV1.java
@@ -35,8 +35,8 @@
    */
   public PrefixedDataAvailableStatus forOnLine(IoBuffer in, 
         int remain,
         int minDataLength, //对应ProtocolConstantV2_0.onLineDataMinLength
         int maxDataLength //对应ProtocolConstant.errorMaxLength
         int minDataLength,
         int maxDataLength
         ) throws Exception {
      
      int oldPosition = in.position() ;
@@ -92,16 +92,15 @@
         return new PrefixedDataAvailableStatus().rubbish(remain) ;
      }
        CommonV1 parseCommon = new CommonV1();
      boolean isThisProtocolData = parseCommon.isThisProtocolHead(preByte) ;
      Boolean[] isThisProtocolData = parseCommon.isThisProtocolHead(preByte) ;
      if(!isThisProtocolData){
         //不是本协议数据
      if(isThisProtocolData == null || isThisProtocolData.length != 2 || !isThisProtocolData[0].booleanValue()){
         //不是本RTU的协议数据
         return null ;
      }
      Integer dataLen = parseCommon.parseFrameLen(preByte) ;
      Integer dataLen = parseCommon.parseFrameLen(preByte, isThisProtocolData[1]) ;
      if(dataLen == null){
         String headHex = ByteUtil.bytes2Hex(preByte, true) ;