| | |
| | | A5LightErrorCodeReportInnerFrame codeRespInnerFrame = new A5LightErrorCodeReportInnerFrame().transformFrame(frame.getPayload()); |
| | | log.info(codeRespInnerFrame.isValidate() + "是否通过校验"); |
| | | log.info(codeRespInnerFrame.getErrorCode() + "故障码"); |
| | | if (codeRespInnerFrame.isValidate() && (codeRespInnerFrame.getErrorCode() != 0)) { |
| | | if (codeRespInnerFrame.isValidate()) { |
| | | SpringContextHolder.getBean(LightReportErrorService.class).saveReportError(deviceName, codeRespInnerFrame); |
| | | } |
| | | //0000 表示没有故障,发送清除故障指令 |
| | | if (codeRespInnerFrame.getErrorCode() == 0) { |
| | | System.out.println("清除故障操作!"); |
| | | SpringContextHolder.getBean(LightReportErrorService.class).cleanErrorCode(deviceName, codeRespInnerFrame.getDestinationAddress()); |
| | | } |
| | | } |
| | | } |
| | | } |