aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Tk102ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/Tk102ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Tk102ProtocolDecoder.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/org/traccar/protocol/Tk102ProtocolDecoder.java b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
index b02a424e0..e9fb86cc2 100644
--- a/src/org/traccar/protocol/Tk102ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
@@ -31,22 +31,22 @@ public class Tk102ProtocolDecoder extends BaseProtocolDecoder {
}
private static final Pattern PATTERN = new PatternBuilder()
- .txt("[")
- .xpr(".")
- .num("d{10}")
- .xpr(".")
- .txt("(")
- .xpr("[A-Z]+")
- .num("(dd)(dd)(dd)") // Time (HHMMSS)
- .xpr("([AV])") // Validity
- .num("(dd)(dd.dddd)([NS])") // Latitude (DDMM.MMMM)
- .num("(ddd)(dd.dddd)([EW])") // Longitude (DDDMM.MMMM)
- .num("(ddd.ddd)") // Speed
- .num("(dd)(dd)(dd)") // Date (DDMMYY)
- .num("d+")
+ .text("[")
+ .expression(".")
+ .number("d{10}")
+ .expression(".")
+ .text("(")
+ .expression("[A-Z]+")
+ .number("(dd)(dd)(dd)") // time
+ .expression("([AV])") // validity
+ .number("(dd)(dd.dddd)([NS])") // latitude
+ .number("(ddd)(dd.dddd)([EW])") // longitude
+ .number("(ddd.ddd)") // Speed
+ .number("(dd)(dd)(dd)") // date (ddmmyy)
+ .number("d+")
.any()
- .txt(")")
- .opt("]")
+ .text(")")
+ .text("]").optional()
.compile();
@Override