diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-04-02 21:39:42 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-04-02 21:39:42 -0700 |
commit | ab4f951c53e4e6ee15637d78943d538d0c68be51 (patch) | |
tree | 46d6d7b71f715b09d3e1790ab92ff1c58e78d686 /src | |
parent | 5aa36f9454caf68eb5f37022ef40980cc982d661 (diff) | |
download | trackermap-server-ab4f951c53e4e6ee15637d78943d538d0c68be51.tar.gz trackermap-server-ab4f951c53e4e6ee15637d78943d538d0c68be51.tar.bz2 trackermap-server-ab4f951c53e4e6ee15637d78943d538d0c68be51.zip |
Support Ruptela driver id
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index b043b6201..a9ab5f5fe 100644 --- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -194,6 +194,14 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { decodeParameter(position, id, buf, 8); } + Long driverIdPart1 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 126); + Long driverIdPart2 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 127); + if (driverIdPart1 != null && driverIdPart2 != null) { + ByteBuf driverId = Unpooled.copyLong(driverIdPart1, driverIdPart2); + position.set(Position.KEY_DRIVER_UNIQUE_ID, driverId.toString(StandardCharsets.US_ASCII)); + driverId.release(); + } + positions.add(position); } |