aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-05-28 07:33:34 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-05-28 07:33:34 -0700
commitfeb008442b63e5467b050e3cee3cf90a01dcb462 (patch)
tree71b06df3f7bb21445f2af19713c335be1902bdd9 /src/test/java
parent7d07898c52ab0442c78b4d068bf0b3922adc4a70 (diff)
downloadtraccar-server-feb008442b63e5467b050e3cee3cf90a01dcb462.tar.gz
traccar-server-feb008442b63e5467b050e3cee3cf90a01dcb462.tar.bz2
traccar-server-feb008442b63e5467b050e3cee3cf90a01dcb462.zip
Decode additional Atrack parameters
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/traccar/protocol/AtrackProtocolDecoderTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/AtrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/AtrackProtocolDecoderTest.java
index 0fe18640d..68e08443b 100644
--- a/src/test/java/org/traccar/protocol/AtrackProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/AtrackProtocolDecoderTest.java
@@ -99,4 +99,17 @@ public class AtrackProtocolDecoderTest extends ProtocolTest {
}
+ @Test
+ public void testDecodeCustom() throws Exception {
+
+ AtrackProtocolDecoder decoder = new AtrackProtocolDecoder(null);
+
+ decoder.setCustom(true);
+ decoder.setForm("%AT%BV%CD%CE%CM%CN%DT%GN%GQ%GS%GV%LC%ME%MV%RL%SA%SM%CS%HT%VN%PD%IA%MP%EL%ET%FC%FL%RP%ML%MF%TR%EH%CR%DL%EG%HA%HB%HC%IP%MT%PF");
+
+ verifyPositions(decoder, buffer(
+ "@P,DCCE,422,5818,357766091026083,1557904779,1557904780,1557904780,-121899644,37406291,129,2,21,10,0,0,0,0,,2000,2000,,13,40,8942310017000752067,21096194,295050910083206,310260,0,FF00001F0393FF01001E0395FF01001E0394FF01001F0393FF02001D0393FF00001F0394FF0100200394FF01001F0393FF02001F0395FF0100200394,20,10,002C005C03B4,14953,357766091026083,125,38,11,0,1,Device:Fail,JN8AZ1MU1BW066090,0,0,0,0,0,99,0,0,0,0,0,264,5,0,0,0,0,0,0,0,0\r\n"));
+
+ }
+
}