| | |
| | | if(taskVo.softStartAddr == null || taskVo.softStartAddr.trim().length() != 8){ |
| | | throw new Exception("程序覆盖起始地址不合法,必须是8字符(十六进制)的字符串") ; |
| | | } |
| | | if(taskVo.softFileData == null || taskVo.softFileData.length <= 0){ |
| | | if(taskVo.softFileData64 == null || taskVo.softFileData64.trim().length() == 0){ |
| | | throw new Exception("升级程序内容必须提供") ; |
| | | } |
| | | if(taskVo.softBytesCalculate == null){ |
| | |
| | | this.taskVo = taskVo ; |
| | | |
| | | this.upgradeRtus = new HashMap<>(); |
| | | if(taskVo.softFileData != null && taskVo.softFileData.length >0){ |
| | | if(taskVo.softFileData64 != null && taskVo.softFileData64.trim().equals("")){ |
| | | taskVo.softFileData = Base64.getDecoder().decode(taskVo.softFileData64); |
| | | List<byte[]> listBytes = new HexFileParse().splitBytesByUnit512(taskVo.softFileData); |
| | | this.softFileDataGrp = listBytes.toArray(new byte[0][]); |
| | | for(String rtuAddr : this.taskVo.rtuAddrList){ |