mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update 预约充电
This commit is contained in:
@@ -77,8 +77,8 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
log.error("push命令[{}]失败, 桩号:{}无法获取到长连接, 请检查充电桩连接状态!", value, pileSn);
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* 拼接报文
|
||||
/*
|
||||
拼接报文
|
||||
*/
|
||||
// 起始标志
|
||||
byte[] head = new byte[]{0x68};
|
||||
@@ -100,11 +100,12 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
|
||||
// 帧校验域
|
||||
byte[] crc = BytesUtil.intToBytes(CRC16Util.calcCrc16(temp));
|
||||
|
||||
// 返回报文
|
||||
byte[] writeMsg = Bytes.concat(head, length, temp, crc);
|
||||
|
||||
// 返回完整的报文 string类型
|
||||
String wholeMsg = BytesUtil.binary(writeMsg, 16);
|
||||
// log.info("[" + channel.remoteAddress() + "] 主动发送push请求信息:{}", wholeMsg);
|
||||
ByteBuf byteBuf = channel.alloc().buffer().writeBytes(writeMsg);
|
||||
ChannelFuture channelFuture = channel.writeAndFlush(byteBuf);
|
||||
channelFuture.addListener((ChannelFutureListener) channelFutureListener -> {
|
||||
|
||||
Reference in New Issue
Block a user