diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-07-27 10:24:58 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-07-27 10:24:58 -0700 |
commit | 9fb2e1f44a49f088f7239b2a2fcf0ff4533aa99c (patch) | |
tree | 157dabe32e5cb28023b42240949e11b51c294a9f /src | |
parent | c49139eae68ac2fe3fa15614e1e4bd6442e36b25 (diff) | |
download | traccar-server-9fb2e1f44a49f088f7239b2a2fcf0ff4533aa99c.tar.gz traccar-server-9fb2e1f44a49f088f7239b2a2fcf0ff4533aa99c.tar.bz2 traccar-server-9fb2e1f44a49f088f7239b2a2fcf0ff4533aa99c.zip |
Decode new message types
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java | 5 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/Gl200TextProtocolDecoderTest.java | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java index 5a0ff4197..6596d8764 100644 --- a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 - 2018 Anton Tananaev (anton@traccar.org) + * Copyright 2012 - 2019 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1224,8 +1224,11 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { case "CAN": result = decodeCan(channel, remoteAddress, sentence); break; + case "CTN": case "FRI": case "GEO": + case "RTL": + case "DOG": case "STR": result = decodeFri(channel, remoteAddress, sentence); break; diff --git a/src/test/java/org/traccar/protocol/Gl200TextProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gl200TextProtocolDecoderTest.java index 35a96a6cf..3e5de0854 100644 --- a/src/test/java/org/traccar/protocol/Gl200TextProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/Gl200TextProtocolDecoderTest.java @@ -12,6 +12,10 @@ public class Gl200TextProtocolDecoderTest extends ProtocolTest { Gl200TextProtocolDecoder decoder = new Gl200TextProtocolDecoder(null); verifyAttribute(decoder, buffer( + "+RESP:GTCTN,440200,866427030007379,NOKIA3,0,0,2,,9,1,0.1,174,48.7,-1.061812,51.435270,20190717080549,0234,0015,0025,145A,,,0000,20190717081008,1D3B$"), + Position.KEY_BATTERY_LEVEL, 9); + + verifyAttribute(decoder, buffer( "+RESP:GTHBM,4B0101,135790246811220,,,10,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"), Position.KEY_ALARM, Position.ALARM_BRAKING); @@ -203,7 +207,7 @@ public class Gl200TextProtocolDecoderTest extends ProtocolTest { verifyPositions(decoder, buffer( "+RESP:GTFRI,210102,A10000499AEF9B,,0,1,1,9,0.5,0,288.0,-76.902364,39.578828,20161101134124,,,,,00,73,20161101134123,009D$")); - verifyAttributes(decoder, buffer( + verifyPositions(decoder, buffer( "+RESP:GTRTL,210102,A10000499AEF9B,,0,0,1,10,0.2,0,305.4,-76.902274,39.578517,20161101155001,,,,,00,73,20161101155001,00A6$")); verifyAttributes(decoder, buffer( |