diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-05-19 06:15:30 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-05-19 06:15:30 +1200 |
commit | f523e3b995f5f1895cf3dea700be34f4b74dccf9 (patch) | |
tree | 8d8665fef2a40a7f8a88f284ec2bded223dc0aef | |
parent | 92d00e9c9b50b438565896c05046674737c7ec62 (diff) | |
download | trackermap-server-f523e3b995f5f1895cf3dea700be34f4b74dccf9.tar.gz trackermap-server-f523e3b995f5f1895cf3dea700be34f4b74dccf9.tar.bz2 trackermap-server-f523e3b995f5f1895cf3dea700be34f4b74dccf9.zip |
Add GL200 geofence alarm
-rw-r--r-- | src/org/traccar/protocol/Gl200ProtocolDecoder.java | 3 | ||||
-rw-r--r-- | test/org/traccar/protocol/Gl200ProtocolDecoderTest.java | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java index 5f4dc3cbd..51e0a9789 100644 --- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java @@ -777,6 +777,9 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { case "STT": position.set(Position.KEY_ALARM, Position.ALARM_MOVEMENT); break; + case "SWG": + position.set(Position.KEY_ALARM, Position.ALARM_GEOFENCE); + break; case "TMP": case "TEM": position.set(Position.KEY_ALARM, Position.ALARM_TEMPERATURE); diff --git a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java index 55a5d93ca..90ecf8ef9 100644 --- a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class Gl200ProtocolDecoderTest extends ProtocolTest { Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(new Gl200Protocol()); verifyPosition(decoder, text( + "+RESP:GTSWG,110100,358688000000158,,1,0,2.1,0,27.1,121.390717,31.164424,20110901073917,0460,0000,1878,0873,,20110901154653,0015$")); + + verifyPosition(decoder, text( "+RESP:GTTMP,110100,358688000000158,,2,60,1,1,4.3,92,70.0,121.354335,31.222073,20110214013254,0460,0000,18d8,6141,00,80,20110214093254,000F$")); verifyPosition(decoder, text( |