aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/ItsProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-26 19:17:15 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-26 19:17:15 -0800
commita68b4ab19873de65145772b408b4db75da25484a (patch)
tree36ddf14bc830b02a8cf478da006d526ce96dc999 /src/org/traccar/protocol/ItsProtocolDecoder.java
parent728e55fc00a4b7b980d6e59f2ce8664859a5c848 (diff)
downloadtrackermap-server-a68b4ab19873de65145772b408b4db75da25484a.tar.gz
trackermap-server-a68b4ab19873de65145772b408b4db75da25484a.tar.bz2
trackermap-server-a68b4ab19873de65145772b408b4db75da25484a.zip
Update ITS protocol
Diffstat (limited to 'src/org/traccar/protocol/ItsProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/ItsProtocolDecoder.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/ItsProtocolDecoder.java b/src/org/traccar/protocol/ItsProtocolDecoder.java
index e2b1dc238..a200ff8b7 100644
--- a/src/org/traccar/protocol/ItsProtocolDecoder.java
+++ b/src/org/traccar/protocol/ItsProtocolDecoder.java
@@ -36,22 +36,22 @@ public class ItsProtocolDecoder extends BaseProtocolDecoder {
private static final Pattern PATTERN = new PatternBuilder()
.expression("[^$]*")
- .text("$,")
- .expression("[^,]+,") // event
+ .text("$")
+ .expression(",?[^,]+,") // event
.groupBegin()
.expression("[^,]+,") // vendor
.expression("[^,]+,") // firmware version
- .groupEnd("?")
.expression("[^,]+,") // type
- .groupBegin()
.number("d+,")
.expression("[LH],") // history
- .groupEnd("?")
+ .or()
+ .expression("[^,]+,") // type
+ .groupEnd()
.number("(d{15}),") // imei
.groupBegin()
.expression("(?:NM|SP),") // status
.or()
- .expression("[^,]+,") // vehicle registration
+ .expression("[^,]*,") // vehicle registration
.number("([01]),") // valid
.groupEnd()
.number("(dd),?(dd),?(dddd),") // date (ddmmyyyy)