aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-03-09 14:27:13 -0800
committerAnton Tananaev <anton@traccar.org>2024-03-09 14:27:13 -0800
commit823878d4f797cf2fb8e2c6e3b466b3316613d886 (patch)
treebf8106413d991e3d2b6757575aab609793bd2446 /src/main/java/org/traccar/protocol
parent165a6c76e8127bae7bdf16a9e9a4a24247f1dec4 (diff)
downloadtrackermap-server-823878d4f797cf2fb8e2c6e3b466b3316613d886.tar.gz
trackermap-server-823878d4f797cf2fb8e2c6e3b466b3316613d886.tar.bz2
trackermap-server-823878d4f797cf2fb8e2c6e3b466b3316613d886.zip
Expand GV355CEU CAN support
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
index 2e5ffa8d6..7a8d67cf9 100644
--- a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java
@@ -468,7 +468,6 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
index += 1; // report type
index += 1; // can bus state
long reportMask = Long.parseLong(v[index++], 16);
- long reportMaskExt = 0;
if (BitUtil.check(reportMask, 0)) {
position.set(Position.KEY_VIN, v[index++]);
@@ -572,6 +571,8 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
index += 1; // electric report mask
}
}
+
+ long reportMaskExt = 0;
if (BitUtil.check(reportMask, 29) && !v[index++].isEmpty()) {
reportMaskExt = Long.parseLong(v[index - 1], 16);
}
@@ -647,6 +648,41 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
if (BitUtil.check(reportMaskExt, 23)) {
index += 1; // engine torque
}
+ if (BitUtil.check(reportMaskExt, 24)) {
+ index += 1; // service distance
+ }
+ if (BitUtil.check(reportMaskExt, 25)) {
+ index += 1; // ambient temperature
+ }
+ if (BitUtil.check(reportMaskExt, 26)) {
+ index += 1; // tachograph driver1 working time mask
+ }
+ if (BitUtil.check(reportMaskExt, 27)) {
+ index += 1; // tachograph driver2 working time mask
+ }
+ if (BitUtil.check(reportMaskExt, 28)) {
+ index += 1; // dtc codes
+ }
+ if (BitUtil.check(reportMaskExt, 29)) {
+ index += 1; // gaseous fuel level
+ }
+ if (BitUtil.check(reportMaskExt, 30)) {
+ index += 1; // tachograph information expand
+ }
+
+ long reportMaskCan = 0;
+ if (BitUtil.check(reportMaskExt, 31) && !v[index++].isEmpty()) {
+ reportMaskCan = Long.parseLong(v[index - 1], 16);
+ }
+ if (BitUtil.check(reportMaskCan, 0)) {
+ index += 1; // retarder usage
+ }
+ if (BitUtil.check(reportMaskCan, 1)) {
+ index += 1; // power mode
+ }
+ if (BitUtil.check(reportMaskCan, 2)) {
+ index += 1; // tachograph timestamp
+ }
DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));