| | |
| | | * @return com.sandu.ximon.dao.enums.DeviceRespStatusEnums |
| | | */ |
| | | public Integer controlBrightness(LightControlParam param) { |
| | | Light light = getById(param.getLightId()); |
| | | if(light == null){ |
| | | throw new BusinessException("找不到路灯"); |
| | | } |
| | | |
| | | A5LightBrightnessReqInnerFrame lightControlFrame = new A5LightBrightnessReqInnerFrame(param.getBrightness()); |
| | | A5Frame a5Frame = new A5Frame(A5OrderEnum.REQUEST_LIGHT_DATA.getCode(), lightControlFrame); |
| | | WrapResponseCommonFrame<A5LightBrightnessRespInnerFrame> frame = MainBoardInvokeSyncService.getInstance() |
| | | .sendRRPC(light.getDeviceCode(), a5Frame, A5LightBrightnessRespInnerFrame.class); |
| | | .sendRRPC(param.getDeviceCode(), a5Frame, A5LightBrightnessRespInnerFrame.class); |
| | | if(frame == null){ |
| | | throw new BusinessException("发送请求失败"); |
| | | } |