diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-10-15 20:52:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 20:52:36 -0700 |
commit | d9a9ed473af9e9f163ee628a06993dbe2b001820 (patch) | |
tree | f40ab7a84db9913b5b114b3dd2d920acc9f88d0e /src/main | |
parent | 3c218ef8d2ff1474446e637e8abd9c97c4a47df1 (diff) | |
parent | b5acde4beda190efd63c1acfab7c38f6590f7bf1 (diff) | |
download | trackermap-server-d9a9ed473af9e9f163ee628a06993dbe2b001820.tar.gz trackermap-server-d9a9ed473af9e9f163ee628a06993dbe2b001820.tar.bz2 trackermap-server-d9a9ed473af9e9f163ee628a06993dbe2b001820.zip |
Merge pull request #4759 from jinzo/master
Totem - additional Alarm and Vehicle Status decoding
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/protocol/TotemProtocolDecoder.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java b/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java index 90a3db4c0..f7d0ffde7 100644 --- a/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/TotemProtocolDecoder.java @@ -227,8 +227,22 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { return Position.ALARM_GEOFENCE_EXIT; case 0x05: return Position.ALARM_GEOFENCE_ENTER; + case 0x06: + return Position.ALARM_TOW; + case 0x07: + return Position.ALARM_GPS_ANTENNA_CUT; + case 0x10: + return Position.ALARM_POWER_CUT; + case 0x11: + return Position.ALARM_POWER_RESTORED; + case 0x12: + return Position.ALARM_LOW_POWER; + case 0x13: + return Position.ALARM_LOW_BATTERY; case 0x40: return Position.ALARM_SHOCK; + case 0x41: + return Position.ALARM_IDLE; case 0x42: return Position.ALARM_ACCELERATION; case 0x43: @@ -357,6 +371,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_CHARGE, BitUtil.check(status, 32 - 4)); position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 5) ? Position.ALARM_GEOFENCE_EXIT : null); position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 6) ? Position.ALARM_GEOFENCE_ENTER : null); + position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 7) ? Position.ALARM_GPS_ANTENNA_CUT : null); position.set(Position.PREFIX_OUT + 1, BitUtil.check(status, 32 - 9)); position.set(Position.PREFIX_OUT + 2, BitUtil.check(status, 32 - 10)); position.set(Position.PREFIX_OUT + 3, BitUtil.check(status, 32 - 11)); @@ -365,6 +380,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { position.set(Position.PREFIX_IN + 3, BitUtil.check(status, 32 - 14)); position.set(Position.PREFIX_IN + 4, BitUtil.check(status, 32 - 15)); position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 16) ? Position.ALARM_SHOCK : null); + position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 17) ? Position.ALARM_IDLE : null); position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 18) ? Position.ALARM_LOW_BATTERY : null); position.set(Position.KEY_ALARM, BitUtil.check(status, 32 - 22) ? Position.ALARM_JAMMING : null); |