aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/gl200
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2011-11-18 13:48:09 +0000
committerAnton Tananaev <anton.tananaev@gmail.com>2011-11-18 13:48:09 +0000
commit8b6816289e5c7a4db1cb7ddda5e49e4ace050fa1 (patch)
tree12a69c8f0791d1333aa220e1a2cce02901dd72e3 /src/org/traccar/protocol/gl200
parent91a8d2558644293758c93d2c1df21487cd387993 (diff)
downloadtrackermap-server-8b6816289e5c7a4db1cb7ddda5e49e4ace050fa1.tar.gz
trackermap-server-8b6816289e5c7a4db1cb7ddda5e49e4ace050fa1.tar.bz2
trackermap-server-8b6816289e5c7a4db1cb7ddda5e49e4ace050fa1.zip
Diffstat (limited to 'src/org/traccar/protocol/gl200')
-rw-r--r--src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java
index 410477d19..a6daa141a 100644
--- a/src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/gl200/Gl200ProtocolDecoder.java
@@ -62,9 +62,10 @@ public class Gl200ProtocolDecoder extends OneToOneDecoder {
"\\d{6}," + // Protocol version
"(\\d{15})," + // IMEI
"[^,]*," + // Device name
- "\\d," + // Report ID
- "\\d," + // Report type
- "\\d*," + // Number
+ "(?:(?:\\d," + // Report ID / Geo mode
+ "\\d*," + // Report type / Geo radius
+ "\\d*)|" + // Number / Geo check interval
+ "(?:[^,]*))," + // Call number
"(\\d*)," + // GPS accuracy
"(\\d+.\\d)," + // Speed
"(\\d+)," + // Course
@@ -73,7 +74,7 @@ public class Gl200ProtocolDecoder extends OneToOneDecoder {
"(-?\\d+.\\d+)," + // Latitude
"(\\d{4})(\\d{2})(\\d{2})" + // Date (YYYYMMDD)
"(\\d{2})(\\d{2})(\\d{2})," + // Time (HHMMSS)
- "[^$]*");
+ ".*");
/**
* Decode message
@@ -83,7 +84,7 @@ public class Gl200ProtocolDecoder extends OneToOneDecoder {
throws Exception {
String sentence = (String) msg;
-
+
// Parse message
Matcher parser = pattern.matcher(sentence);
if (!parser.matches()) {