liurunyu
2024-05-30 c929083f415ef98765afec91d5a8c88be4450f5b
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V202404/CommonV202404.java
@@ -15,14 +15,22 @@
    public Boolean isThisProtocolHead(byte[] bs) throws Exception{
        if(bs == null){
            return null ;
        }else if(bs.length >= (ProtocolConstantV206V202404.ctrlIndex - 1)
        }else if(bs.length >= ProtocolConstantV206V202404.ctrlIndex
                && bs[0] == ProtocolConstantV206V202404.P_Head_Byte){
            if(bs[2] == ProtocolConstantV206V202404.P_Head_Byte){
                return true ;
                if(bs[3] == (byte)0x80 || bs[3] == (byte)0x81){
                    return true ;
                }else{
                    return false ;
                }
            }else if((byte)(bs[2] & 0xF8) == ProtocolConstantV206V202404.P_Head_Byte){
                //如果控制域、地址域、用户数据域(应用层)的字节总数大于255,则通过扩展第二个开始字符0x68的低3位作为长L的高位扩展
                //0xF8二进制: 11111000
                return true ;
                if(bs[3] == (byte)0x80 || bs[3] == (byte)0x81){
                    return true ;
                }else{
                    return false ;
                }
            }else{
                return false ;
            }