|  |  | 
 |  |  |       return rtuAddrBCD + rtuAddrStr ; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |    /** | 
 |  |  |     * 分析Rtu地址 | 
 |  |  |     * @param bs 上行字节数组 | 
 |  |  |     * @param index 启始位 | 
 |  |  |     * @return 控制器地址 | 
 |  |  |     * @throws Exception 异常 | 
 |  |  |     */ | 
 |  |  |    public String parseRtuAddr(byte[] bs, int index)throws Exception{ | 
 |  |  |       String rtuAddrBCD = "" + ByteUtil.BCD2Long_BE(bs, index, index + 2) ; | 
 |  |  |       String rtuAddrStr = "" + ByteUtilUnsigned.bytes2Short_BE(bs, index + 3) ; | 
 |  |  |       while(rtuAddrStr.length() < 4){ | 
 |  |  |          rtuAddrStr = "0" + rtuAddrStr ; | 
 |  |  |       } | 
 |  |  |       return rtuAddrBCD + rtuAddrStr ; | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |    /** | 
 |  |  |     * 分析功能码 | 
 |  |  |     * @param bs 上行字节数组 | 
 |  |  | 
 |  |  |          case 7 -> "紧急关阀"; | 
 |  |  |          case 8 -> "用户远程开阀"; | 
 |  |  |          case 9 -> "用户远程关阀"; | 
 |  |  |          case 16 -> "管道无水自动关阀"; | 
 |  |  |          default -> "未知"; | 
 |  |  |       }; | 
 |  |  |    } |