diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-23 16:57:02 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-23 16:57:02 +1200 |
commit | d997825008a0a1b0a6c29cc45e381cd239aa3572 (patch) | |
tree | f21c058b1cedb5ffe041f2ee199b4bd0e6329b93 /src/org/traccar/protocol/CarTrackProtocolDecoder.java | |
parent | 23b09f83989a4b012bc2387fb6e180baccf9a60c (diff) | |
download | trackermap-server-d997825008a0a1b0a6c29cc45e381cd239aa3572.tar.gz trackermap-server-d997825008a0a1b0a6c29cc45e381cd239aa3572.tar.bz2 trackermap-server-d997825008a0a1b0a6c29cc45e381cd239aa3572.zip |
Clean up code inspection issues
Diffstat (limited to 'src/org/traccar/protocol/CarTrackProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/CarTrackProtocolDecoder.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/org/traccar/protocol/CarTrackProtocolDecoder.java b/src/org/traccar/protocol/CarTrackProtocolDecoder.java index fc14b4668..a5089d227 100644 --- a/src/org/traccar/protocol/CarTrackProtocolDecoder.java +++ b/src/org/traccar/protocol/CarTrackProtocolDecoder.java @@ -23,8 +23,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelHandlerContext; - import org.traccar.BaseProtocolDecoder; import org.traccar.model.Event; import org.traccar.model.Position; @@ -38,9 +36,9 @@ public class CarTrackProtocolDecoder extends BaseProtocolDecoder { private static final Pattern pattern = Pattern.compile( "\\$\\$" + // Header "(\\d+)\\?*" + // Device ID - "\\&A" + + "&A" + "(\\d{4})" + // Command - 2 - "\\&B" + + "&B" + "(\\d{2})(\\d{2})(\\d{2})\\.(\\d{3})," + // HHMMSS.DDD "([AV])," + // STATUS : A= Valid, V = Invalid "(\\d{2})(\\d{2}\\.\\d{4})," + // Lat : XXMM.DDDDD @@ -51,10 +49,10 @@ public class CarTrackProtocolDecoder extends BaseProtocolDecoder { "(\\d+.\\d*)?," + // Heading "(\\d{2})(\\d{2})(\\d{2})" + // DDMMYY ".*" + - "\\&C(.*)" + // IO Port Data - "\\&D(.*)" + // Mile Meter Data - "\\&E(.*)" + // Alarm Data - "(?:\\&Y)?(.*)"); // AD Input Data + "&C(.*)" + // IO Port Data + "&D(.*)" + // Mile Meter Data + "&E(.*)" + // Alarm Data + "(?:&Y)?(.*)"); // AD Input Data @Override protected Object decode( |