use of org.traccar.helper.Checksum.Algorithm in project traccar by tananaev.
the class NavisProtocolDecoder method sendFlexReply.
private void sendFlexReply(Channel channel, ByteBuf data) {
if (channel != null) {
ByteBuf cs = Unpooled.buffer(1);
cs.writeByte(Checksum.crc8(new Algorithm(8, 0x31, 0xFF, false, false, 0x00), data.nioBuffer()));
channel.writeAndFlush(new NetworkMessage(Unpooled.wrappedBuffer(data, cs), channel.remoteAddress()));
}
}
Aggregations