aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-02-02 23:23:24 +1100
committerAnton Tananaev <anton.tananaev@gmail.com>2016-02-02 23:23:24 +1100
commit59f9f7dc90cd6bb6acad1254389406e21fbacc96 (patch)
tree7b924204629c8ca3abfb05a44e720158b3482e5f /src/org/traccar
parent4807127711bb934ab6dbcbbe5d92290a1e576166 (diff)
downloadtraccar-server-59f9f7dc90cd6bb6acad1254389406e21fbacc96.tar.gz
traccar-server-59f9f7dc90cd6bb6acad1254389406e21fbacc96.tar.bz2
traccar-server-59f9f7dc90cd6bb6acad1254389406e21fbacc96.zip
Add RFID support for GPS103 protocol
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java7
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();