| | |
| | | this.currentPackage = 0 ; |
| | | this.currentRamAddr = 0 ; |
| | | this.lastDownDt = "" ; |
| | | this.lastDownDtAt = 0L ; |
| | | this.reTryTimes = 0 ; |
| | | this.isOver = false ; |
| | | } |
| | |
| | | this.currentPackage = 0 ; |
| | | this.currentRamAddr = 0 ; |
| | | this.lastDownDt = "" ; |
| | | this.lastDownDtAt = 0L ; |
| | | this.reTryTimes = 0 ; |
| | | this.isOver = false ; |
| | | } |
| | |
| | | if(code.equals(UpgradeCode.cd_9601)){ |
| | | //下发配置返回 |
| | | this.lastDownDt = DateTime.yyyy_MM_dd_HH_mm_ss() ; |
| | | this.lastDownDtAt = System.currentTimeMillis() ; |
| | | callbackCom.call(createCommand1602(protocolName, protocolVersion, currentPackage, currentRamAddr, softData));//下发数据包指令 |
| | | }else if(code.equals(UpgradeCode.cd_9602)){ |
| | | //下发数据包返回 |
| | |
| | | currentRamAddr += RAMADDRADD ; |
| | | if(currentPackage < totalPackage){ |
| | | this.lastDownDt = DateTime.yyyy_MM_dd_HH_mm_ss() ; |
| | | this.lastDownDtAt = System.currentTimeMillis() ; |
| | | callbackCom.call(createCommand1602(protocolName, protocolVersion, currentPackage, currentRamAddr, softData)); |
| | | }else{ |
| | | this.lastDownDt = DateTime.yyyy_MM_dd_HH_mm_ss() ; |
| | | this.lastDownDtAt = System.currentTimeMillis() ; |
| | | callbackCom.call(createCommand1603(protocolName, protocolVersion));//下发校验指令 |
| | | } |
| | | }else if(code.equals(UpgradeCode.cd_9603)){ |
| | |
| | | this.currentRamAddr = 0 ; |
| | | this.isOver = false ; |
| | | this.lastDownDt = DateTime.yyyy_MM_dd_HH_mm_ss() ; |
| | | this.lastDownDtAt = System.currentTimeMillis() ; |
| | | } |
| | | |
| | | /** |
| | |
| | | this.isOver = true ;//升级完成 |
| | | this.state = STATE_SUCCESS ; |
| | | this.lastDownDt = DateTime.yyyy_MM_dd_HH_mm_ss() ; |
| | | this.lastDownDtAt = System.currentTimeMillis() ; |
| | | } |
| | | |
| | | @Override |