| | |
| | | */ |
| | | 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 多个路灯定时指令, |
| | |
| | | } else { |
| | | destinationAddress = lightAddress; |
| | | } |
| | | payload = destinationAddress + framePayload; |
| | | this.payloadLength = SupplementUtils.suppleZero(Integer.toHexString((payload.length() / 2)).toUpperCase(), 4); |
| | | payload = destinationAddress + framePayload ; |
| | | // 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()); |
| | | } |
| | | |