From 932111062285ffdbb8f22a9c25e4946c893a6e71 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 29 Mar 2012 05:05:36 +0000 Subject: --- src/org/traccar/Server.java | 2 +- src/org/traccar/protocol/avl08/Avl08ProtocolDecoder.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/Server.java b/src/org/traccar/Server.java index 9f6d326c9..16c26b6d6 100644 --- a/src/org/traccar/Server.java +++ b/src/org/traccar/Server.java @@ -624,7 +624,7 @@ public class Server implements DataManager { if (serverCreator.isLoggerEnabled()) { pipeline.addLast("logger", new LoggingHandler("logger")); } - byte delimiter[] = { (byte) '$', (byte) '$' }; // probably use \r\n + byte delimiter[] = { (byte) '\r', (byte) '\n' }; pipeline.addLast("frameDecoder", new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter))); pipeline.addLast("stringDecoder", new StringDecoder()); diff --git a/src/org/traccar/protocol/avl08/Avl08ProtocolDecoder.java b/src/org/traccar/protocol/avl08/Avl08ProtocolDecoder.java index cc8a2efb7..382c9e998 100644 --- a/src/org/traccar/protocol/avl08/Avl08ProtocolDecoder.java +++ b/src/org/traccar/protocol/avl08/Avl08ProtocolDecoder.java @@ -24,6 +24,7 @@ import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandlerContext; import org.traccar.Position; import org.traccar.DataManager; +import org.traccar.Device; // DELME import org.traccar.GenericProtocolDecoder; /** @@ -42,7 +43,7 @@ public class Avl08ProtocolDecoder extends GenericProtocolDecoder { * Regular expressions pattern */ static private Pattern pattern = Pattern.compile( - ".{2}" + // Length + "\\$\\$.{2}" + // Length "(\\d{15})\\|" + // IMEI ".{2}" + // Alarm Type "\\$GPRMC," + -- cgit v1.2.3