diff options
author | Anton Tananaev <anton@traccar.org> | 2023-07-14 07:41:31 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-07-14 07:41:31 -0700 |
commit | 007b4007e063cfb966a4024ef267992a4f1f9ccb (patch) | |
tree | 1da8afd24255bd7376fe6d08074c7cc1cf3eccf5 | |
parent | 104e8a4a7829b4b4a4723a715cc2b15899fa8b9f (diff) | |
download | trackermap-server-007b4007e063cfb966a4024ef267992a4f1f9ccb.tar.gz trackermap-server-007b4007e063cfb966a4024ef267992a4f1f9ccb.tar.bz2 trackermap-server-007b4007e063cfb966a4024ef267992a4f1f9ccb.zip |
Trackology Tracker Type-A protocol
-rw-r--r-- | src/main/java/org/traccar/protocol/TopinProtocolDecoder.java | 7 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/TopinProtocolDecoderTest.java | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java b/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java index a1d5481db..b5dd3c4b9 100644 --- a/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/TopinProtocolDecoder.java @@ -48,7 +48,11 @@ public class TopinProtocolDecoder extends BaseProtocolDecoder { public static final int MSG_GPS = 0x10; public static final int MSG_GPS_OFFLINE = 0x11; public static final int MSG_STATUS = 0x13; + public static final int MSG_SLEEP = 0x14; + public static final int MSG_FACTORY_RESET = 0x15; public static final int MSG_WIFI_OFFLINE = 0x17; + public static final int MSG_LBS_WIFI = 0x18; + public static final int MSG_LBS_WIFI_OFFLINE = 0x19; public static final int MSG_TIME_UPDATE = 0x30; public static final int MSG_SOS_NUMBER = 0x41; public static final int MSG_WIFI = 0x69; @@ -216,7 +220,8 @@ public class TopinProtocolDecoder extends BaseProtocolDecoder { return position; - } else if (type == MSG_WIFI || type == MSG_WIFI_OFFLINE) { + } else if (type == MSG_WIFI || type == MSG_WIFI_OFFLINE + || type == MSG_LBS_WIFI || type == MSG_LBS_WIFI_OFFLINE) { Position position = new Position(getProtocolName()); position.setDeviceId(deviceSession.getDeviceId()); diff --git a/src/test/java/org/traccar/protocol/TopinProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/TopinProtocolDecoderTest.java index 763c4f2da..b55e12e9d 100644 --- a/src/test/java/org/traccar/protocol/TopinProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/TopinProtocolDecoderTest.java @@ -17,6 +17,9 @@ public class TopinProtocolDecoderTest extends ProtocolTest { verifyNull(decoder, binary( "78780d0103593390754169634d0d0a")); + verifyNotNull(decoder, binary( + "787803181604130318491475905bd30e25001e10bbf7635d14759006e626560401cc00000028660090df425f000028660090df576c00002866009487566700002866009ca15667000d0a")); + verifyAttribute(decoder, binary( "7878006921120412565802010601071e4a9764071e4a9864010d0a"), Position.KEY_ALARM, Position.ALARM_VIBRATION); |