diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-02-02 23:23:24 +1100 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-02-02 23:23:24 +1100 |
commit | 59f9f7dc90cd6bb6acad1254389406e21fbacc96 (patch) | |
tree | 7b924204629c8ca3abfb05a44e720158b3482e5f /src/org/traccar/protocol | |
parent | 4807127711bb934ab6dbcbbe5d92290a1e576166 (diff) | |
download | trackermap-server-59f9f7dc90cd6bb6acad1254389406e21fbacc96.tar.gz trackermap-server-59f9f7dc90cd6bb6acad1254389406e21fbacc96.tar.bz2 trackermap-server-59f9f7dc90cd6bb6acad1254389406e21fbacc96.zip |
Add RFID support for GPS103 protocol
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolDecoder.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index f6cd57d9e..2c7397231 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -37,7 +37,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { .expression("([^,]+),") // alarm .number("(dd)/?(dd)/?(dd) ?") // local date .number("(dd):?(dd)(?:dd)?,") // local time - .expression("[^,]*,") + .expression("([^,]+)?,") // rfid .expression("[FL],") // full / low .groupBegin() .number("(dd)(dd)(dd).(d+)") // time utc (hhmmss.sss) @@ -147,6 +147,11 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { int localHours = parser.nextInt(); int localMinutes = parser.nextInt(); + String rfid = parser.next(); + if (alarm.equals("rfid")) { + position.set(Event.KEY_RFID, rfid); + } + String utcHours = parser.next(); String utcMinutes = parser.next(); |