From 0cd2d9e4d78fd586f71027e4eab486b047a7383e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 26 Mar 2020 20:51:13 -0700 Subject: Update binary frame decoding --- src/main/java/org/traccar/protocol/Gl200FrameDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/protocol/Gl200FrameDecoder.java b/src/main/java/org/traccar/protocol/Gl200FrameDecoder.java index c192cc28d..4ce243425 100644 --- a/src/main/java/org/traccar/protocol/Gl200FrameDecoder.java +++ b/src/main/java/org/traccar/protocol/Gl200FrameDecoder.java @@ -31,7 +31,7 @@ public class Gl200FrameDecoder extends BaseFrameDecoder { private static final int MINIMUM_LENGTH = 11; private static final Set BINARY_HEADERS = new HashSet<>( - Arrays.asList("+RSP", "+BSP", "+EVT", "+BVT", "+INF", "+BNF", "+HBD", "+CRD", "+BRD")); + Arrays.asList("+RSP", "+BSP", "+EVT", "+BVT", "+INF", "+BNF", "+HBD", "+CRD", "+BRD", "+LGN")); public static boolean isBinary(ByteBuf buf) { String header = buf.toString(buf.readerIndex(), 4, StandardCharsets.US_ASCII); @@ -66,6 +66,7 @@ public class Gl200FrameDecoder extends BaseFrameDecoder { break; case "+CRD": case "+BRD": + case "+LGN": length = buf.getUnsignedShort(buf.readerIndex() + 6); break; default: -- cgit v1.2.3