| | |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.enums.RemoteUpdateTypeEnum; |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.mainboard.MainBoardInvokeSyncService; |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.util.FileProcessingUtils; |
| | | import com.sandu.ximon.admin.utils.StoreOperationRecordsUtils; |
| | | import com.sandu.ximon.dao.domain.RemoteUpdateFile; |
| | | import com.sandu.ximon.dao.mapper.RemoteUpdateFileMapper; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | A5Frame a5Frame = new A5Frame(orderType, remoteStartUpdateReqInnerFrame); |
| | | System.out.println(a5Frame + " a5Frame"); |
| | | CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(mac, a5Frame); |
| | | StoreOperationRecordsUtils.storeInnerFrameData(mac, "固件升级-启动远程升级", a5Frame, commonFrame); |
| | | System.out.println(commonFrame + " -----commonFrame"); |
| | | |
| | | RemoteStartUpdateReportInnerFrame remoteStartUpdateReportInnerFrame |
| | |
| | | A5Frame a5Frame = new A5Frame(orderType, remoteSendFileReqInnerFrame); |
| | | System.out.println(a5Frame + " a5Frame"); |
| | | CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(mac, a5Frame); |
| | | StoreOperationRecordsUtils.storeInnerFrameData(mac, "固件升级-升级文件信息", a5Frame, commonFrame); |
| | | |
| | | System.out.println(commonFrame + " -----commonFrame"); |
| | | |
| | | RemoteUpdateFileInfoReportInnerFrame remoteUpdateFileInfoReportInnerFrame |
| | |
| | | CommonFrame commonFrame = null; |
| | | try { |
| | | commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(mac, a5Frame); |
| | | StoreOperationRecordsUtils.storeInnerFrameData(mac, "固件升级-升级包数据", a5Frame, commonFrame); |
| | | |
| | | System.out.println(commonFrame + " -----commonFrame"); |
| | | } catch (Exception e) { |
| | | System.out.println("发送数据超时或失败"); |
| | |
| | | A5Frame a5Frame = new A5Frame(orderType, remoteSearchLoseDataReqInnerFrame); |
| | | System.out.println(a5Frame + " a5Frame"); |
| | | CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(mac, a5Frame); |
| | | StoreOperationRecordsUtils.storeInnerFrameData(mac, "固件升级-查询漏包帧", a5Frame, commonFrame); |
| | | |
| | | System.out.println(commonFrame + " -----commonFrame"); |
| | | |
| | | RemoteSearchLoseDataReportInnerFrame remoteSearchLoseDataReportInnerFrame = new RemoteSearchLoseDataReportInnerFrame().transformFrame(commonFrame.getPayload()); |
| | |
| | | A5Frame a5Frame = new A5Frame(orderType, remoteFinishUpdateReqInnerFrame); |
| | | System.out.println(a5Frame + " a5Frame"); |
| | | CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(mac, a5Frame); |
| | | StoreOperationRecordsUtils.storeInnerFrameData(mac, "固件升级-升级结束", a5Frame, commonFrame); |
| | | |
| | | System.out.println(commonFrame + " -----commonFrame"); |
| | | |
| | | RemoteFinishUpdateReportInnerFrame remoteFinishUpdateReportInnerFrame = new RemoteFinishUpdateReportInnerFrame().transformFrame(commonFrame.getPayload()); |
| | |
| | | A5Frame a5Frame = new A5Frame(orderType, remoteSearchUpdateResultReqInnerFrame); |
| | | System.out.println(a5Frame + " a5Frame"); |
| | | CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(mac, a5Frame); |
| | | StoreOperationRecordsUtils.storeInnerFrameData(mac, "固件升级-升级结果查询", a5Frame, commonFrame); |
| | | |
| | | System.out.println(commonFrame + " -----commonFrame"); |
| | | |
| | | RemoteSearchUpdateResultReportInnerFrame innerFrame = new RemoteSearchUpdateResultReportInnerFrame().transformFrame(commonFrame.getPayload()); |
| | |
| | | A5Frame a5Frame = new A5Frame(orderType, remoteStopUpdateReqInnerFrame); |
| | | System.out.println(a5Frame + " a5Frame"); |
| | | CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(mac, a5Frame); |
| | | StoreOperationRecordsUtils.storeInnerFrameData(mac, "固件升级-紧急中断", a5Frame, commonFrame); |
| | | |
| | | System.out.println(commonFrame + " -----commonFrame"); |
| | | RemoteStopUpdateReportInnerFrame innerFrame = new RemoteStopUpdateReportInnerFrame().transformFrame(commonFrame.getPayload()); |
| | | |