@Override
protected Object decode(ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception {
if (buf.readableBytes() < MESSAGE_MINIMUM_LENGTH) {
return null;
}
if (buf.getUnsignedShort(buf.readerIndex()) == 0xFAF8) {
ChannelBuffer heartbeat = buf.readBytes(12);
if (channel != null) {
channel.write(heartbeat);
}
}
return super.decode(ctx, channel, buf);
}
AlematicsFrameDecoder.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:traccar-service
作者:
评论列表
文章目录