2021与蓝度共同重构项目,服务端
ximon-admin/src/main/java/com/sandu/ximon/admin/manager/iot/frame/inner/request/A5LightTimerReqInnerFrame.java
@@ -18,9 +18,7 @@
 */
public class A5LightTimerReqInnerFrame implements IRequestInnerFrame {
    private final String payload;
    private final String functionCode = A5LightDataEnum.LightTimer.getCode();
    private final String payloadLength;
    private String payload;
    /**
     * @param framePayload 多个路灯定时指令,
@@ -33,12 +31,17 @@
            destinationAddress = lightAddress;
        }
        payload = destinationAddress + framePayload;
        this.payloadLength = SupplementUtils.suppleZero(Integer.toHexString((payload.length() / 2)).toUpperCase(), 4);
//        payload = getEncodeFrame();
    }
    @Override
    public String getEncodeFrame() {
        String functionCode = A5LightDataEnum.LightTimer.getCode();
        String payloadLength = SupplementUtils.suppleZero(Integer.toHexString((payload.length() / 2)).toUpperCase(), 4);
        String frame = functionCode + payloadLength + payload;
        return MQTTConnectTypeEnum.SYNCHRONIZATION.getCode() + frame.toUpperCase() + CRC32Utils.getCRC32(frame.toUpperCase());
    }