From 59f9f7dc90cd6bb6acad1254389406e21fbacc96 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 2 Feb 2016 23:23:24 +1100 Subject: Add RFID support for GPS103 protocol --- src/org/traccar/protocol/Gps103ProtocolDecoder.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/org/traccar') 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(); -- cgit v1.2.3