aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/TopinProtocolDecoder.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java b/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java
index 87db95946..7fd939caa 100644
--- a/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java
@@ -51,6 +51,9 @@ public class TopinProtocolDecoder extends BaseProtocolDecoder {
public static final int MSG_WIFI_OFFLINE = 0x17;
public static final int MSG_TIME_UPDATE = 0x30;
public static final int MSG_WIFI = 0x69;
+ public static final int MSG_VIBRATION_ON = 0x92;
+ public static final int MSG_VIBRATION_OFF = 0x93;
+ public static final int MSG_VIBRATION = 0x94;
private void sendResponse(Channel channel, int length, int type, ByteBuf content) {
if (channel != null) {
@@ -250,6 +253,17 @@ public class TopinProtocolDecoder extends BaseProtocolDecoder {
return position;
+ } else if (type == MSG_VIBRATION) {
+
+ Position position = new Position(getProtocolName());
+ position.setDeviceId(deviceSession.getDeviceId());
+
+ getLastLocation(position, null);
+
+ position.set(Position.KEY_ALARM, Position.ALARM_VIBRATION);
+
+ return position;
+
}
return null;