aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
index 737d30f10..8a9bf21a4 100644
--- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java
@@ -285,6 +285,22 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
driverId.release();
}
+ Long tcoDriverIdPart1 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 155);
+ Long tcoDriverIdPart2 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 156);
+ if (tcoDriverIdPart1 != null && tcoDriverIdPart2 != null) {
+ ByteBuf driverId = Unpooled.copyLong(tcoDriverIdPart1, tcoDriverIdPart2);
+ position.set(Position.KEY_DRIVER_UNIQUE_ID, driverId.toString(StandardCharsets.US_ASCII));
+ driverId.release();
+ }
+
+ Long bleBeaconIdPart1 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 760);
+ Long bleBeaconIdPart2 = (Long) position.getAttributes().remove(Position.PREFIX_IO + 761);
+ if (bleBeaconIdPart1 != null && bleBeaconIdPart2 != null) {
+ ByteBuf bleBeaconId = Unpooled.copyLong(bleBeaconIdPart1, bleBeaconIdPart2);
+ position.set("bleBeaconId", bleBeaconId.toString(StandardCharsets.US_ASCII));
+ bleBeaconId.release();
+ }
+
positions.add(position);
}