| | |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "A5Frame{" + |
| | | "orderType='" + orderType + '\'' + |
| | | ", payloadLength='" + payloadLength + '\'' + |
| | | ", payload='" + payload + '\'' + |
| | | '}'; |
| | | // return "A5Frame{" + |
| | | // "orderType='" + orderType + '\'' + |
| | | // ", payloadLength='" + payloadLength + '\'' + |
| | | // ", payload='" + payload + '\'' + |
| | | // '}'; |
| | | return MQTTConnectTypeEnum.SYNCHRONIZATION.getCode() |
| | | + FunctionCodeEnum.DATA_TRANSPORT_DATA.getCode() |
| | | + orderType + payloadLength + payload; |
| | | } |
| | | } |
| | |
| | | * @date 2021/12/3 16:50 |
| | | * åèï¼1 1 2 ä¸å®é¿ 4 |
| | | * åè½ç A å½ä»¤ç±»åA è´è·é¿åº¦A è´è·æ°æ®A å¸§æ ¡éªA |
| | | * |
| | | * <p> |
| | | * æ»ä½å¸§ |
| | | */ |
| | | @Data |
| | |
| | | */ |
| | | private boolean isValidate; |
| | | |
| | | @Override |
| | | public String toString() { |
| | | // return "CommonFrame{" + |
| | | // "connectType='" + connectType + '\'' + |
| | | // ", functionCode='" + functionCode + '\'' + |
| | | // ", orderType='" + orderType + '\'' + |
| | | // ", payloadLength='" + payloadLength + '\'' + |
| | | // ", payload='" + payload + '\'' + |
| | | // ", crc32='" + crc32 + '\'' + |
| | | // ", isValidate=" + isValidate + |
| | | // '}'; |
| | | return connectType + functionCode + orderType + payloadLength + payload + crc32; |
| | | } |
| | | } |
| | |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.utils.LogUtils; |
| | | import com.sandu.ximon.admin.utils.RedisUtils; |
| | | import com.sandu.ximon.admin.utils.StoreOperationRecordsUtils; |
| | | import com.sandu.ximon.admin.vo.EquipmentInfomation; |
| | | import com.sandu.ximon.dao.bo.C3ChargingBo; |
| | | import com.sandu.ximon.dao.domain.C3mCharging; |
| | |
| | | throw new BusinessException("C3å
çµæ¡©ç¡¬ä»¶mcu_udidä¸åå¨"); |
| | | } |
| | | CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(c3mCharging.getPoleDevicesCode(), a5Frame); |
| | | StoreOperationRecordsUtils.storeInnerFrameData(c3Mac, "C3帧-æ¥è¯¢å¿è·³å
é´éæ¶é´", a5Frame, commonFrame); |
| | | |
| | | System.out.println(commonFrame + " -----commonFrame"); |
| | | |
| | |
| | | * @param frame |
| | | * @param frameResult |
| | | */ |
| | | public void add(String deviceCode, String operation, String syncType, String frame, String frameResult) { |
| | | public void storeInnerFrameData(String deviceCode, String operation, String syncType, String frame, String frameResult) { |
| | | |
| | | InnerFrameData innerFrameData = new InnerFrameData(); |
| | | innerFrameData.setDeviceCode(deviceCode); |
| | |
| | | import com.sandu.ximon.admin.param.LightRemarkParam; |
| | | import com.sandu.ximon.admin.redis.LightKey; |
| | | import com.sandu.ximon.admin.security.SecurityUtils; |
| | | import com.sandu.ximon.admin.utils.StoreOperationRecordsUtils; |
| | | import com.sandu.ximon.admin.vo.ControlLightCommandVO; |
| | | import com.sandu.ximon.admin.vo.EquipmentInfomation; |
| | | import com.sandu.ximon.dao.bo.LightBo; |
| | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | try { |
| | | map.put("deviceCode", param.getDeviceCode()); |
| | | WrapResponseCommonFrame<A5LightBrightnessRespInnerFrame> frame = MainBoardInvokeSyncService.getInstance().sendRRPC(param.getDeviceCode(), a5Frame, A5LightBrightnessRespInnerFrame.class); |
| | | WrapResponseCommonFrame<A5LightBrightnessRespInnerFrame> frame |
| | | = MainBoardInvokeSyncService.getInstance().sendRRPC(param.getDeviceCode(), a5Frame, A5LightBrightnessRespInnerFrame.class); |
| | | StoreOperationRecordsUtils.storeInnerFrameData(param.getDeviceCode(), "åç¯å¸§-亮度æ§å¶", a5Frame, frame); |
| | | if (frame == null) { |
| | | map.put("status", DeviceRespStatusEnums.OTHER_ERROR.getCode()); |
| | | resultList.add(map); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.sandu.ximon.admin.utils; |
| | | |
| | | import com.sandu.common.util.SpringContextHolder; |
| | | import com.sandu.ximon.admin.manager.iot.frame.A5Frame; |
| | | import com.sandu.ximon.admin.manager.iot.rrpc.dto.CommonFrame; |
| | | import com.sandu.ximon.admin.service.InnerFrameDataService; |
| | | |
| | | /** |
| | | * @author ZZQ |
| | | * @date 2022/5/13 15:06 |
| | | */ |
| | | public class StoreOperationRecordsUtils { |
| | | public static void storeInnerFrameData(String mac, String innerFrameTpye, A5Frame a5Frame, CommonFrame commonFrame) { |
| | | String requstInnerFrame = a5Frame.getConnectType() + a5Frame.getFunctionCode() + a5Frame.getOrderType() + a5Frame.getPayloadLength() + a5Frame.getPayload(); |
| | | String reportInnerFrame = commonFrame.getConnectType() + commonFrame.getFunctionCode() + commonFrame.getOrderType() + commonFrame.getPayloadLength() + commonFrame.getPayload(); |
| | | String syncType; |
| | | if ("FE".equals(a5Frame.getConnectType())) { |
| | | syncType = "忥"; |
| | | } else { |
| | | syncType = "弿¥"; |
| | | } |
| | | SpringContextHolder.getBean(InnerFrameDataService.class).storeInnerFrameData(mac, innerFrameTpye, syncType, requstInnerFrame, reportInnerFrame); |
| | | |
| | | } |
| | | |
| | | public static void storeOperationData(String mac, String innerFrameTpye, String syncType, String requsetInnerFrame, String reportInnerFrame) { |
| | | //TODO |
| | | |
| | | } |
| | | } |