diff options
author | Abyss777 <abyss@fox5.ru> | 2017-07-12 14:22:03 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-07-12 15:20:07 +0500 |
commit | b19f1a505f7088ff48f467b32b5f1c207aa3be01 (patch) | |
tree | 663ef14ec15af04e5d9062c2185cd020fb5b9e42 /src/org/traccar/protocol | |
parent | 4f3830d844dd0542e9e7b09e7a6c17ffbb796264 (diff) | |
download | traccar-server-b19f1a505f7088ff48f467b32b5f1c207aa3be01.tar.gz traccar-server-b19f1a505f7088ff48f467b32b5f1c207aa3be01.tar.bz2 traccar-server-b19f1a505f7088ff48f467b32b5f1c207aa3be01.zip |
- Handle rfid attributes and populate driverUniqueId
- Add Driver Name to Trip report
Diffstat (limited to 'src/org/traccar/protocol')
4 files changed, 7 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java index eb8d77011..448cd94fc 100644 --- a/src/org/traccar/protocol/AplicomProtocolDecoder.java +++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java @@ -263,7 +263,8 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder { } if ((selector & 0x0200) != 0) { - position.set(Position.KEY_RFID, (((long) buf.readUnsignedShort()) << 32) + buf.readUnsignedInt()); + position.set(Position.KEY_RFID, + String.valueOf(((long) buf.readUnsignedShort()) << 32) + buf.readUnsignedInt()); } if ((selector & 0x0400) != 0) { diff --git a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java index 44e01d5e0..77e117262 100644 --- a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java +++ b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java @@ -253,7 +253,7 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder { } if (parser.hasNext()) { - position.set(Position.KEY_RFID, parser.nextHexInt(0)); + position.set(Position.KEY_RFID, String.valueOf(parser.nextHexInt(0))); } return position; diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index 15f6f40b8..20cd54b2f 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -128,6 +128,9 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder { case "batt": position.set(Position.KEY_BATTERY_LEVEL, Double.parseDouble(value)); break; + case "rfid": + position.set(Position.KEY_RFID, value); + break; default: try { position.set(entry.getKey(), Double.parseDouble(value)); diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java index 3f5b68f67..f1fd55d98 100644 --- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java +++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java @@ -114,7 +114,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { position.set(Position.PREFIX_TEMP + 3, readValue(buf, length, true) * 0.1); break; case 78: - position.set(Position.KEY_RFID, readValue(buf, length, false)); + position.set(Position.KEY_RFID, String.valueOf(readValue(buf, length, false))); break; case 182: position.set(Position.KEY_HDOP, readValue(buf, length, false) * 0.1); |