aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
index a80e84728..bd485ca70 100644
--- a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java
@@ -254,7 +254,8 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder {
String type = values[index++].substring(5);
- if (!type.equals("STT") && !type.equals("EMG") && !type.equals("EVT") && !type.equals("ALT")) {
+ if (!type.equals("STT") && !type.equals("EMG") && !type.equals("EVT")
+ && !type.equals("ALT") && !type.equals("UEX")) {
return null;
}
@@ -322,6 +323,17 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder {
case "ALT":
position.set(Position.KEY_ALARM, decodeAlert(Integer.parseInt(values[index++])));
break;
+ case "UEX":
+ int remaining = Integer.parseInt(values[index++]);
+ while (remaining > 0) {
+ String value = values[index++];
+ String[] pair = value.split("=");
+ if (pair.length >= 2) {
+ position.set(pair[0].toLowerCase(), pair[1].trim());
+ }
+ remaining -= value.length() + 1;
+ }
+ break;
default:
break;
}