mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 电单车协议
This commit is contained in:
@@ -64,7 +64,7 @@ public class ElectricBicyclesServerHandler extends ChannelInboundHandlerAdapter
|
||||
// 处理数据
|
||||
byte[] response = eBikeService.process(msg, ctx);
|
||||
if (Objects.nonNull(response)) {
|
||||
log.info("[响应数据]:{}", BytesUtil.binary(response, 16));
|
||||
log.info("[电单车===>响应数据]:{}", BytesUtil.binary(response, 16));
|
||||
// 响应客户端
|
||||
ByteBuf buffer = ctx.alloc().buffer().writeBytes(response);
|
||||
// this.channelWrite(channel.id(), buffer);
|
||||
|
||||
@@ -37,7 +37,7 @@ public class EBikeBusinessServiceImpl implements EBikeBusinessService {
|
||||
EBikeDataProtocol eBikeDataProtocol = new EBikeDataProtocol(msg);
|
||||
// 获取帧类型
|
||||
String command = YKCUtils.frameType2Str(eBikeDataProtocol.getCommand());
|
||||
log.info("收到消息, channelId:{}, 指令:{}, msg:{}", ctx.channel().id().toString(), command, BytesUtil.binary(msg, 16));
|
||||
log.info("电单车===>收到消息, channelId:{}, 指令:{}, msg:{}", ctx.channel().id().toString(), command, BytesUtil.binary(msg, 16));
|
||||
// 获取业务处理handler
|
||||
AbstractEBikeHandler invokeStrategy = EBikeOperateFactory.getInvokeStrategy(command);
|
||||
if (invokeStrategy != null) {
|
||||
|
||||
Reference in New Issue
Block a user