Files
jsowell-charger-web/jsowell-netty/src/main/java/com/jsowell/netty/handler/RemoteRestartHandler.java
2023-03-04 16:29:55 +08:00

42 lines
1.2 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.jsowell.netty.handler;
import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.core.domain.ykc.YKCDataProtocol;
import com.jsowell.common.core.domain.ykc.YKCFrameTypeCode;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.netty.factory.YKCOperateFactory;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* 远程重启
*
* 重启充电桩,应对部分问题,如卡死
* 这个属于平台主动下发的指令
* @author JS-ZZA
* @date 2022/9/19 15:49
*/
@Slf4j
@Component
@Deprecated
public class RemoteRestartHandler extends AbstractHandler{
private final String type = YKCUtils.frameType2Str(YKCFrameTypeCode.REMOTE_RESTART_CODE.getBytes());
@Override
public void afterPropertiesSet() throws Exception {
YKCOperateFactory.register(type, this);
}
@Override
public byte[] supplyProcess(YKCDataProtocol ykcDataProtocol, Channel channel) {
log.info("[===远程重启===] param:{}, channel:{}", JSONObject.toJSONString(ykcDataProtocol), channel.toString());
// 下发
// 桩编号
// 执行控制 0x01立即执行 0x02空闲执行
return null;
}
}